or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

cpu-management.mddevice-info.mdevents.mdgpu-performance.mdindex.mdinitialization.mdmemory.mdperformance-control.mdpower-thermal.mdtopology-ras.md

device-info.mddocs/

0

# Device Information and Properties

1

2

Hardware identification, driver versions, firmware information, and device capabilities. Essential for device discovery, compatibility checking, and system inventory.

3

4

## Capabilities

5

6

### Device Identification

7

8

Get basic device identification information including name, vendor, and model.

9

10

```cpp { .api }

11

amdsmi_status_t amdsmi_get_gpu_device_name(amdsmi_processor_handle processor_handle,

12

char* name,

13

size_t len);

14

```

15

16

**Usage Example:**

17

```cpp

18

char device_name[AMDSMI_MAX_STRING_LENGTH];

19

amdsmi_status_t status = amdsmi_get_gpu_device_name(gpu_handle,

20

device_name,

21

sizeof(device_name));

22

23

if (status == AMDSMI_STATUS_SUCCESS) {

24

printf("GPU Device: %s\n", device_name);

25

}

26

```

27

28

### Device UUID

29

30

Get unique device identifier for tracking specific GPU instances.

31

32

```cpp { .api }

33

amdsmi_status_t amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle,

34

unsigned int* uuid_length,

35

char* uuid);

36

```

37

38

**Usage Example:**

39

```cpp

40

char uuid[AMDSMI_GPU_UUID_SIZE];

41

unsigned int uuid_len = sizeof(uuid);

42

amdsmi_status_t status = amdsmi_get_gpu_device_uuid(gpu_handle, &uuid_len, uuid);

43

44

if (status == AMDSMI_STATUS_SUCCESS) {

45

printf("GPU UUID: %s\n", uuid);

46

}

47

```

48

49

### Device PCI Information

50

51

Get PCI bus information for device location and topology understanding.

52

53

```cpp { .api }

54

amdsmi_status_t amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle,

55

amdsmi_bdf_t* bdf);

56

```

57

58

**PCI BDF Structure:**

59

```cpp { .api }

60

typedef struct {

61

uint32_t domain_number; // PCI domain

62

uint8_t bus_number; // PCI bus number

63

uint8_t device_number; // PCI device number

64

uint8_t function_number; // PCI function number

65

} amdsmi_bdf_t;

66

```

67

68

**Usage Example:**

69

```cpp

70

amdsmi_bdf_t bdf;

71

amdsmi_status_t status = amdsmi_get_gpu_device_bdf(gpu_handle, &bdf);

72

73

if (status == AMDSMI_STATUS_SUCCESS) {

74

printf("PCI Location: %04X:%02X:%02X.%X\n",

75

bdf.domain_number, bdf.bus_number,

76

bdf.device_number, bdf.function_number);

77

}

78

```

79

80

### Driver Information

81

82

Get detailed driver version and compatibility information.

83

84

```cpp { .api }

85

amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle,

86

amdsmi_driver_info_t* info);

87

```

88

89

**Driver Information Structure:**

90

```cpp { .api }

91

typedef struct {

92

char driver_version[AMDSMI_MAX_DRIVER_VERSION_LENGTH]; // Driver version string

93

char driver_date[AMDSMI_MAX_DATE_LENGTH]; // Driver build date

94

char driver_name[AMDSMI_MAX_STRING_LENGTH]; // Driver name

95

} amdsmi_driver_info_t;

96

```

97

98

**Usage Example:**

99

```cpp

100

amdsmi_driver_info_t driver_info;

101

amdsmi_status_t status = amdsmi_get_gpu_driver_info(gpu_handle, &driver_info);

102

103

if (status == AMDSMI_STATUS_SUCCESS) {

104

printf("Driver Information:\n");

105

printf(" Name: %s\n", driver_info.driver_name);

106

printf(" Version: %s\n", driver_info.driver_version);

107

printf(" Date: %s\n", driver_info.driver_date);

108

}

109

```

110

111

### VBIOS Information

112

113

Get video BIOS version and part number information.

114

115

```cpp { .api }

116

amdsmi_status_t amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle,

117

amdsmi_vbios_info_t* info);

118

```

119

120

**VBIOS Information Structure:**

121

```cpp { .api }

122

typedef struct {

123

char vbios_version[AMDSMI_MAX_STRING_LENGTH]; // VBIOS version string

124

char vbios_date[AMDSMI_MAX_DATE_LENGTH]; // VBIOS build date

125

char vbios_part_number[AMDSMI_MAX_STRING_LENGTH]; // VBIOS part number

126

} amdsmi_vbios_info_t;

127

```

128

129

### Firmware Information

130

131

Get firmware versions for various GPU components.

132

133

```cpp { .api }

134

amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle,

135

amdsmi_fw_block_t fw_block,

136

amdsmi_fw_info_t* fw_info);

137

```

138

139

**Firmware Blocks:**

140

```cpp { .api }

141

typedef enum {

142

AMDSMI_FW_ID_ASD, // ASD firmware

143

AMDSMI_FW_ID_CE, // CE firmware

144

AMDSMI_FW_ID_DMCU, // DMCU firmware

145

AMDSMI_FW_ID_MC, // Memory Controller firmware

146

AMDSMI_FW_ID_ME, // ME firmware

147

AMDSMI_FW_ID_MEC, // MEC firmware

148

AMDSMI_FW_ID_MEC2, // MEC2 firmware

149

AMDSMI_FW_ID_PFP, // PFP firmware

150

AMDSMI_FW_ID_RLC, // RLC firmware

151

AMDSMI_FW_ID_RLC_SRLC, // RLC SRLC firmware

152

AMDSMI_FW_ID_RLC_SRLG, // RLC SRLG firmware

153

AMDSMI_FW_ID_RLC_SRLS, // RLC SRLS firmware

154

AMDSMI_FW_ID_SDMA, // SDMA firmware

155

AMDSMI_FW_ID_SDMA2, // SDMA2 firmware

156

AMDSMI_FW_ID_SMC, // SMC firmware

157

AMDSMI_FW_ID_SOS, // SOS firmware

158

AMDSMI_FW_ID_TA_RAS, // TA RAS firmware

159

AMDSMI_FW_ID_TA_XGMI, // TA XGMI firmware

160

AMDSMI_FW_ID_UVD, // UVD firmware

161

AMDSMI_FW_ID_VCE, // VCE firmware

162

AMDSMI_FW_ID_VCN // VCN firmware

163

} amdsmi_fw_block_t;

164

```

165

166

**Firmware Information Structure:**

167

```cpp { .api }

168

typedef struct {

169

uint64_t fw_version; // Firmware version

170

uint64_t fw_date; // Firmware date

171

char fw_name[AMDSMI_MAX_STRING_LENGTH]; // Firmware name

172

} amdsmi_fw_info_t;

173

```

174

175

**Usage Example:**

176

```cpp

177

// Get SMC firmware information

178

amdsmi_fw_info_t fw_info;

179

amdsmi_status_t status = amdsmi_get_fw_info(gpu_handle, AMDSMI_FW_ID_SMC, &fw_info);

180

181

if (status == AMDSMI_STATUS_SUCCESS) {

182

printf("SMC Firmware:\n");

183

printf(" Name: %s\n", fw_info.fw_name);

184

printf(" Version: 0x%lX\n", fw_info.fw_version);

185

}

186

```

187

188

### Device Brand and Series

189

190

Get marketing name and brand information for the device.

191

192

```cpp { .api }

193

amdsmi_status_t amdsmi_get_gpu_device_brand(amdsmi_processor_handle processor_handle,

194

char* brand,

195

uint32_t len);

196

```

197

198

```cpp { .api }

199

amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle,

200

amdsmi_asic_info_t* info);

201

```

202

203

**ASIC Information Structure:**

204

```cpp { .api }

205

typedef struct {

206

char market_name[AMDSMI_MAX_STRING_LENGTH]; // Marketing name

207

char vendor_name[AMDSMI_MAX_STRING_LENGTH]; // Vendor name

208

char subvendor_name[AMDSMI_MAX_STRING_LENGTH]; // Subvendor name

209

uint64_t device_id; // Device ID

210

uint64_t rev_id; // Revision ID

211

uint64_t vendor_id; // Vendor ID

212

uint64_t subvendor_id; // Subvendor ID

213

uint64_t subsys_id; // Subsystem ID

214

} amdsmi_asic_info_t;

215

```

216

217

### Device Board Information

218

219

Get board-level information including part numbers and manufacturing details.

220

221

```cpp { .api }

222

amdsmi_status_t amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle,

223

amdsmi_board_info_t* info);

224

```

225

226

**Board Information Structure:**

227

```cpp { .api }

228

typedef struct {

229

char model_number[AMDSMI_MAX_STRING_LENGTH]; // Board model number

230

char product_serial[AMDSMI_MAX_STRING_LENGTH]; // Product serial number

231

char fru_id[AMDSMI_MAX_STRING_LENGTH]; // FRU ID

232

char product_name[AMDSMI_MAX_STRING_LENGTH]; // Product name

233

char manufacturer_name[AMDSMI_MAX_STRING_LENGTH]; // Manufacturer name

234

} amdsmi_board_info_t;

235

```

236

237

## Language Interface Examples

238

239

### Python

240

```python

241

import amdsmi

242

243

gpu_handles = amdsmi.amdsmi_get_processor_handles(amdsmi.AmdSmiProcessorType.AMD_GPU)

244

if gpu_handles:

245

gpu_handle = gpu_handles[0]

246

247

# Get device name

248

device_name = amdsmi.amdsmi_get_gpu_device_name(gpu_handle)

249

print(f"Device: {device_name}")

250

251

# Get device UUID

252

uuid = amdsmi.amdsmi_get_gpu_device_uuid(gpu_handle)

253

print(f"UUID: {uuid}")

254

255

# Get PCI information

256

bdf = amdsmi.amdsmi_get_gpu_device_bdf(gpu_handle)

257

print(f"PCI: {bdf['domain_number']:04X}:{bdf['bus_number']:02X}:{bdf['device_number']:02X}.{bdf['function_number']:X}")

258

259

# Get driver information

260

driver_info = amdsmi.amdsmi_get_gpu_driver_info(gpu_handle)

261

print(f"Driver: {driver_info['driver_name']} v{driver_info['driver_version']}")

262

263

# Get VBIOS information

264

vbios_info = amdsmi.amdsmi_get_gpu_vbios_info(gpu_handle)

265

print(f"VBIOS: {vbios_info['vbios_version']}")

266

267

# Get ASIC information

268

asic_info = amdsmi.amdsmi_get_gpu_asic_info(gpu_handle)

269

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

270

print(f"Vendor: {asic_info['vendor_name']}")

271

```

272

273

### Go

274

```go

275

import "github.com/ROCm/amdsmi"

276

277

// Get device information for each GPU

278

for i := 0; i < int(goamdsmi.GO_gpu_num_monitor_devices()); i++ {

279

// Get device name

280

deviceName := goamdsmi.GO_gpu_dev_name_get(i)

281

fmt.Printf("GPU %d: %s\n", i, C.GoString(deviceName))

282

283

// Get device UUID

284

uuid := goamdsmi.GO_gpu_dev_uuid_get(i)

285

fmt.Printf("UUID: %s\n", C.GoString(uuid))

286

287

// Get PCI ID

288

pciId := goamdsmi.GO_gpu_dev_pci_id_get(i)

289

fmt.Printf("PCI ID: 0x%X\n", pciId)

290

291

// Get vendor information

292

vendor := goamdsmi.GO_gpu_dev_vendor_name_get(i)

293

fmt.Printf("Vendor: %s\n", C.GoString(vendor))

294

}

295

```

296

297

### Rust

298

```rust

299

use amdsmi::{get_gpu_device_name, get_gpu_device_uuid, get_gpu_device_bdf};

300

use amdsmi::{get_gpu_driver_info, get_gpu_asic_info};

301

302

// Get comprehensive device information

303

let device_name = get_gpu_device_name(gpu_handle)?;

304

println!("Device: {}", device_name);

305

306

let uuid = get_gpu_device_uuid(gpu_handle)?;

307

println!("UUID: {}", uuid);

308

309

let bdf = get_gpu_device_bdf(gpu_handle)?;

310

println!("PCI: {:04X}:{:02X}:{:02X}.{:X}",

311

bdf.domain_number, bdf.bus_number,

312

bdf.device_number, bdf.function_number);

313

314

let driver_info = get_gpu_driver_info(gpu_handle)?;

315

println!("Driver: {} v{}", driver_info.driver_name, driver_info.driver_version);

316

317

let asic_info = get_gpu_asic_info(gpu_handle)?;

318

println!("Market Name: {}", asic_info.market_name);

319

```

320

321

## Device Information Best Practices

322

323

1. **Unique Identification**: Use UUID for persistent device tracking across reboots

324

2. **Compatibility Checks**: Verify driver versions for feature availability

325

3. **Inventory Management**: Collect comprehensive device information for system inventory

326

4. **Support Information**: Include firmware versions when reporting issues

327

5. **PCI Topology**: Use BDF information for understanding multi-GPU configurations