or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

device-discovery.mderror-handling-ras.mdevent-monitoring.mdhardware-information.mdindex.mdlibrary-management.mdmemory-management.mdpcie-connectivity.mdperformance-control.mdperformance-counters.mdperformance-monitoring.mdprocess-system-info.md

hardware-information.mddocs/

0

# Hardware Information

1

2

Static hardware information including ASIC details, board information, firmware versions, driver information, and VBIOS details for AMD GPU devices.

3

4

## Capabilities

5

6

### ASIC Information

7

8

Get detailed ASIC (Application-Specific Integrated Circuit) information including product identification, vendor details, and hardware identifiers.

9

10

```c { .api }

11

amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_t *info);

12

```

13

14

**Parameters:**

15

- `processor_handle`: Handle to the GPU processor

16

- `info`: Pointer to receive ASIC information structure

17

18

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

19

20

**Usage Example:**

21

22

```c

23

amdsmi_asic_info_t asic_info;

24

amdsmi_status_t ret = amdsmi_get_gpu_asic_info(processor, &asic_info);

25

if (ret == AMDSMI_STATUS_SUCCESS) {

26

printf("GPU ASIC Information:\n");

27

printf(" Market Name: %s\n", asic_info.market_name);

28

printf(" Vendor ID: 0x%04x\n", asic_info.vendor_id);

29

printf(" Subvendor ID: 0x%04x\n", asic_info.subvendor_id);

30

printf(" Device ID: 0x%04llx\n", asic_info.device_id);

31

printf(" Revision ID: 0x%02x\n", asic_info.rev_id);

32

printf(" ASIC Serial: %s\n", asic_info.asic_serial);

33

}

34

```

35

36

### Board Information

37

38

Get board-specific information including model numbers, serial numbers, and manufacturer details.

39

40

```c { .api }

41

amdsmi_status_t amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board_info_t *info);

42

```

43

44

**Parameters:**

45

- `processor_handle`: Handle to the GPU processor

46

- `info`: Pointer to receive board information structure

47

48

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

49

50

**Usage Example:**

51

52

```c

53

amdsmi_board_info_t board_info;

54

amdsmi_status_t ret = amdsmi_get_gpu_board_info(processor, &board_info);

55

if (ret == AMDSMI_STATUS_SUCCESS) {

56

printf("GPU Board Information:\n");

57

printf(" Product Name: %s\n", board_info.product_name);

58

printf(" Model Number: %s\n", board_info.model_number);

59

printf(" Product Serial: %s\n", board_info.product_serial);

60

printf(" FRU ID: %s\n", board_info.fru_id);

61

printf(" Manufacturer: %s\n", board_info.manufacturer_name);

62

printf(" Serial Number: %llu\n", board_info.serial_number);

63

printf(" Is Master: %s\n", board_info.is_master ? "Yes" : "No");

64

}

65

```

66

67

### Firmware Information

68

69

Get firmware version information for all firmware blocks on the GPU.

70

71

```c { .api }

72

amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle, amdsmi_fw_info_t *info);

73

```

74

75

**Parameters:**

76

- `processor_handle`: Handle to the GPU processor

77

- `info`: Pointer to receive firmware information structure

78

79

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

80

81

**Usage Example:**

82

83

```c

84

amdsmi_fw_info_t fw_info;

85

amdsmi_status_t ret = amdsmi_get_fw_info(processor, &fw_info);

86

if (ret == AMDSMI_STATUS_SUCCESS) {

87

printf("Firmware Information (%u blocks):\n", fw_info.num_fw_info);

88

for (uint8_t i = 0; i < fw_info.num_fw_info; i++) {

89

printf(" Block %d (ID %d): Version 0x%llx\n",

90

i, fw_info.fw_info_list[i].fw_id,

91

fw_info.fw_info_list[i].fw_version);

92

}

93

}

94

```

95

96

### VBIOS Information

97

98

Get VBIOS (Video BIOS) information including version, build date, and part numbers.

99

100

```c { .api }

101

amdsmi_status_t amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios_info_t *info);

102

```

103

104

**Parameters:**

105

- `processor_handle`: Handle to the GPU processor

106

- `info`: Pointer to receive VBIOS information structure

107

108

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

109

110

**Usage Example:**

111

112

```c

113

amdsmi_vbios_info_t vbios_info;

114

amdsmi_status_t ret = amdsmi_get_gpu_vbios_info(processor, &vbios_info);

115

if (ret == AMDSMI_STATUS_SUCCESS) {

116

printf("VBIOS Information:\n");

117

printf(" Name: %s\n", vbios_info.name);

118

printf(" Version: %s\n", vbios_info.version);

119

printf(" Build Date: %s\n", vbios_info.build_date);

120

printf(" Part Number: %s\n", vbios_info.part_number);

121

}

122

```

123

124

### Driver Version

125

126

Get the GPU driver version string.

127

128

```c { .api }

129

amdsmi_status_t amdsmi_get_gpu_driver_version(amdsmi_processor_handle processor_handle, int *length, char *version);

130

```

131

132

**Parameters:**

133

- `processor_handle`: Handle to the GPU processor

134

- `length`: As input, length of version buffer. As output, actual string length.

135

- `version`: Buffer to receive driver version string

136

137

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

138

139

**Usage Example:**

140

141

```c

142

char driver_version[256];

143

int length = sizeof(driver_version);

144

amdsmi_status_t ret = amdsmi_get_gpu_driver_version(processor, &length, driver_version);

145

if (ret == AMDSMI_STATUS_SUCCESS) {

146

printf("GPU Driver Version: %s\n", driver_version);

147

}

148

```

149

150

### Power Cap Information

151

152

Get power cap configuration and limits for the GPU.

153

154

```c { .api }

155

amdsmi_status_t amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_cap_info_t *info);

156

```

157

158

**Parameters:**

159

- `processor_handle`: Handle to the GPU processor

160

- `sensor_ind`: 0-based sensor index (usually 0)

161

- `info`: Pointer to receive power cap information

162

163

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

164

165

**Usage Example:**

166

167

```c

168

amdsmi_power_cap_info_t power_cap;

169

amdsmi_status_t ret = amdsmi_get_power_cap_info(processor, 0, &power_cap);

170

if (ret == AMDSMI_STATUS_SUCCESS) {

171

printf("Power Cap Information:\n");

172

printf(" Current Power Cap: %llu W\n", power_cap.power_cap);

173

printf(" Default Power Cap: %llu W\n", power_cap.default_power_cap);

174

printf(" DPM Cap: %llu W\n", power_cap.dpm_cap);

175

printf(" Min Power Cap: %llu W\n", power_cap.min_power_cap);

176

printf(" Max Power Cap: %llu W\n", power_cap.max_power_cap);

177

}

178

```

179

180

### XGMI Information

181

182

Get XGMI (Infinity Fabric) connectivity information for multi-GPU systems.

183

184

```c { .api }

185

amdsmi_status_t amdsmi_get_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t *info);

186

```

187

188

**Parameters:**

189

- `processor_handle`: Handle to the GPU processor

190

- `info`: Pointer to receive XGMI information

191

192

**Returns:** `amdsmi_status_t` - AMDSMI_STATUS_SUCCESS on success, error code on failure

193

194

**Usage Example:**

195

196

```c

197

amdsmi_xgmi_info_t xgmi_info;

198

amdsmi_status_t ret = amdsmi_get_xgmi_info(processor, &xgmi_info);

199

if (ret == AMDSMI_STATUS_SUCCESS) {

200

printf("XGMI Information:\n");

201

printf(" XGMI Lanes: %u\n", xgmi_info.xgmi_lanes);

202

printf(" XGMI Hive ID: 0x%llx\n", xgmi_info.xgmi_hive_id);

203

printf(" XGMI Node ID: 0x%llx\n", xgmi_info.xgmi_node_id);

204

printf(" Index: %u\n", xgmi_info.index);

205

}

206

```

207

208

## Python API

209

210

### ASIC Information

211

212

```python { .api }

213

def amdsmi_get_gpu_asic_info(processor_handle):

214

"""

215

Get ASIC information for a GPU.

216

217

Args:

218

processor_handle: GPU processor handle

219

220

Returns:

221

dict: ASIC info with keys 'market_name', 'vendor_id', 'subvendor_id',

222

'device_id', 'rev_id', 'asic_serial'

223

224

Raises:

225

AmdSmiException: If ASIC info query fails

226

"""

227

```

228

229

### Board Information

230

231

```python { .api }

232

def amdsmi_get_gpu_board_info(processor_handle):

233

"""

234

Get board information for a GPU.

235

236

Args:

237

processor_handle: GPU processor handle

238

239

Returns:

240

dict: Board info with keys 'product_name', 'model_number',

241

'product_serial', 'fru_id', 'manufacturer_name',

242

'serial_number', 'is_master'

243

244

Raises:

245

AmdSmiException: If board info query fails

246

"""

247

```

248

249

### Firmware Information

250

251

```python { .api }

252

def amdsmi_get_fw_info(processor_handle):

253

"""

254

Get firmware information for a GPU.

255

256

Args:

257

processor_handle: GPU processor handle

258

259

Returns:

260

dict: Firmware info with 'num_fw_info' and 'fw_info_list' containing

261

list of firmware blocks with 'fw_id' and 'fw_version'

262

263

Raises:

264

AmdSmiException: If firmware info query fails

265

"""

266

```

267

268

### VBIOS Information

269

270

```python { .api }

271

def amdsmi_get_gpu_vbios_info(processor_handle):

272

"""

273

Get VBIOS information for a GPU.

274

275

Args:

276

processor_handle: GPU processor handle

277

278

Returns:

279

dict: VBIOS info with keys 'name', 'version', 'build_date', 'part_number'

280

281

Raises:

282

AmdSmiException: If VBIOS info query fails

283

"""

284

```

285

286

### Driver Version

287

288

```python { .api }

289

def amdsmi_get_gpu_driver_version(processor_handle):

290

"""

291

Get GPU driver version.

292

293

Args:

294

processor_handle: GPU processor handle

295

296

Returns:

297

str: Driver version string

298

299

Raises:

300

AmdSmiException: If driver version query fails

301

"""

302

```

303

304

**Python Usage Example:**

305

306

```python

307

import amdsmi

308

309

# Initialize and get GPU handle

310

amdsmi.amdsmi_init()

311

312

try:

313

sockets = amdsmi.amdsmi_get_socket_handles()

314

processors = amdsmi.amdsmi_get_processor_handles(sockets[0])

315

gpu = processors[0]

316

317

# Get ASIC information

318

asic_info = amdsmi.amdsmi_get_gpu_asic_info(gpu)

319

print(f"GPU: {asic_info['market_name']}")

320

print(f"Vendor ID: 0x{asic_info['vendor_id']:04x}")

321

print(f"Device ID: 0x{asic_info['device_id']:04x}")

322

print(f"ASIC Serial: {asic_info['asic_serial']}")

323

324

# Get board information

325

board_info = amdsmi.amdsmi_get_gpu_board_info(gpu)

326

print(f"Board: {board_info['product_name']}")

327

print(f"Model: {board_info['model_number']}")

328

print(f"Manufacturer: {board_info['manufacturer_name']}")

329

330

# Get driver version

331

driver_version = amdsmi.amdsmi_get_gpu_driver_version(gpu)

332

print(f"Driver Version: {driver_version}")

333

334

# Get VBIOS information

335

vbios_info = amdsmi.amdsmi_get_gpu_vbios_info(gpu)

336

print(f"VBIOS: {vbios_info['name']} v{vbios_info['version']}")

337

print(f"VBIOS Build Date: {vbios_info['build_date']}")

338

339

# Get power cap information

340

power_cap = amdsmi.amdsmi_get_power_cap_info(gpu, 0)

341

print(f"Power Cap: {power_cap['power_cap']}W "

342

f"(Range: {power_cap['min_power_cap']}-{power_cap['max_power_cap']}W)")

343

344

finally:

345

amdsmi.amdsmi_shut_down()

346

```

347

348

## Types

349

350

### ASIC Information Structure

351

352

```c { .api }

353

typedef struct {

354

char market_name[AMDSMI_MAX_STRING_LENGTH]; // Market name of the GPU

355

uint32_t vendor_id; // Vendor ID

356

uint32_t subvendor_id; // Subsystem vendor ID

357

uint64_t device_id; // Device ID

358

uint32_t rev_id; // Revision ID

359

char asic_serial[AMDSMI_NORMAL_STRING_LENGTH]; // ASIC serial number

360

uint32_t reserved[3]; // Reserved for future use

361

} amdsmi_asic_info_t;

362

```

363

364

### Board Information Structure

365

366

```c { .api }

367

typedef struct {

368

uint64_t serial_number; // Board serial number

369

bool is_master; // Is master device

370

char model_number[AMDSMI_NORMAL_STRING_LENGTH]; // Model number

371

char product_serial[AMDSMI_NORMAL_STRING_LENGTH]; // Product serial

372

char fru_id[AMDSMI_NORMAL_STRING_LENGTH]; // FRU identifier

373

char product_name[AMDSMI_PRODUCT_NAME_LENGTH]; // Product name

374

char manufacturer_name[AMDSMI_NORMAL_STRING_LENGTH]; // Manufacturer name

375

} amdsmi_board_info_t;

376

```

377

378

### Firmware Information Structure

379

380

```c { .api }

381

typedef struct {

382

uint8_t num_fw_info; // Number of firmware info entries

383

struct {

384

amdsmi_fw_block_t fw_id; // Firmware block ID

385

uint64_t fw_version; // Firmware version

386

uint64_t reserved[2]; // Reserved

387

} fw_info_list[FW_ID__MAX]; // Array of firmware info

388

uint32_t reserved[7]; // Reserved for future use

389

} amdsmi_fw_info_t;

390

```

391

392

### VBIOS Information Structure

393

394

```c { .api }

395

typedef struct {

396

char name[AMDSMI_MAX_STRING_LENGTH]; // VBIOS name

397

char build_date[AMDSMI_MAX_DATE_LENGTH]; // Build date

398

char part_number[AMDSMI_MAX_STRING_LENGTH]; // Part number

399

char version[AMDSMI_NORMAL_STRING_LENGTH]; // Version string

400

uint32_t reserved[16]; // Reserved for future use

401

} amdsmi_vbios_info_t;

402

```

403

404

### Power Cap Information Structure

405

406

```c { .api }

407

typedef struct {

408

uint64_t power_cap; // Current power cap in watts

409

uint64_t default_power_cap; // Default power cap in watts

410

uint64_t dpm_cap; // DPM power cap in watts

411

uint64_t min_power_cap; // Minimum power cap in watts

412

uint64_t max_power_cap; // Maximum power cap in watts

413

uint64_t reserved[3]; // Reserved for future use

414

} amdsmi_power_cap_info_t;

415

```

416

417

### XGMI Information Structure

418

419

```c { .api }

420

typedef struct {

421

uint8_t xgmi_lanes; // Number of XGMI lanes

422

uint64_t xgmi_hive_id; // XGMI hive identifier

423

uint64_t xgmi_node_id; // XGMI node identifier

424

uint32_t index; // Device index in hive

425

uint32_t reserved[9]; // Reserved for future use

426

} amdsmi_xgmi_info_t;

427

```

428

429

### Firmware Block Types

430

431

```c { .api }

432

typedef enum {

433

FW_ID_SMU = 1, // System Management Unit

434

FW_ID_CP_CE, // Command Processor Constant Engine

435

FW_ID_CP_PFP, // Command Processor Pre-Fetch Parser

436

FW_ID_CP_ME, // Command Processor Micro Engine

437

FW_ID_CP_MEC_JT1, // Command Processor MEC Jump Table 1

438

FW_ID_CP_MEC_JT2, // Command Processor MEC Jump Table 2

439

FW_ID_CP_MEC1, // Command Processor MEC 1

440

FW_ID_CP_MEC2, // Command Processor MEC 2

441

FW_ID_RLC, // Run List Controller

442

FW_ID_SDMA0, // System DMA 0

443

FW_ID_SDMA1, // System DMA 1

444

FW_ID_SDMA2, // System DMA 2

445

FW_ID_SDMA3, // System DMA 3

446

FW_ID_SDMA4, // System DMA 4

447

FW_ID_SDMA5, // System DMA 5

448

FW_ID_SDMA6, // System DMA 6

449

FW_ID_SDMA7, // System DMA 7

450

FW_ID_VCN, // Video Core Next

451

FW_ID_UVD, // Unified Video Decoder

452

FW_ID_VCE, // Video Compression Engine

453

FW_ID_ISP, // Image Signal Processor

454

// ... additional firmware block types

455

FW_ID__MAX // Maximum firmware ID

456

} amdsmi_fw_block_t;

457

```

458

459

## Constants

460

461

```c { .api }

462

#define AMDSMI_MAX_STRING_LENGTH 64 // Maximum string length

463

#define AMDSMI_NORMAL_STRING_LENGTH 32 // Normal string length

464

#define AMDSMI_PRODUCT_NAME_LENGTH 128 // Product name length

465

#define AMDSMI_MAX_DATE_LENGTH 32 // Date string length

466

#define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80 // Driver version length

467

```

468

469

## Important Notes

470

471

1. **Static Information**: All hardware information functions return static data that doesn't change during runtime.

472

473

2. **String Buffers**: Ensure sufficient buffer sizes when calling functions that return string data.

474

475

3. **Firmware Blocks**: Different GPU generations may have different firmware blocks available.

476

477

4. **Serial Numbers**: Serial numbers and identifiers are useful for inventory management and support.

478

479

5. **Power Caps**: Power cap information is essential for understanding thermal and power limits.

480

481

6. **XGMI**: XGMI information is only relevant for multi-GPU systems with Infinity Fabric connections.

482

483

7. **Version Tracking**: Driver and VBIOS versions are critical for compatibility and support issues.