Added xgmi physical id to static --asic
Signed-off-by: Maisam Arif <maisarif@amd.com> Change-Id: I9e9f5929da635d22495aa394f2a9e5e6ce441706
This commit is contained in:
@@ -209,7 +209,8 @@ class AMDSMICommands():
|
||||
asic_info['rev_id'] = hex(asic_info['rev_id'])
|
||||
if asic_info['asic_serial'] != '':
|
||||
asic_info['asic_serial'] = hex(int(asic_info['asic_serial'], base=16))
|
||||
|
||||
if asic_info['xgmi_physical_id'] == 0xFFFF: # uint 16 max
|
||||
asic_info['xgmi_physical_id'] = "N/A"
|
||||
static_dict['asic'] = asic_info
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
static_dict['asic'] = "N/A"
|
||||
|
||||
@@ -351,6 +351,7 @@ Field | Content
|
||||
`device_id` | device id
|
||||
`rev_id` | revision id
|
||||
`asic_serial` | asic serial
|
||||
`xgmi_physical_id` | xgmi physical id
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_asic_info` function:
|
||||
|
||||
@@ -370,9 +371,11 @@ try:
|
||||
asic_info = amdsmi_get_gpu_asic_info(device)
|
||||
print(asic_info['market_name'])
|
||||
print(hex(asic_info['vendor_id']))
|
||||
print(asic_info['vendor_name'])
|
||||
print(hex(asic_info['device_id']))
|
||||
print(hex(asic_info['rev_id']))
|
||||
print(asic_info['asic_serial'])
|
||||
print(asic_info['xgmi_physical_id'])
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
@@ -644,6 +644,7 @@ def amdsmi_get_gpu_asic_info(
|
||||
"device_id": asic_info.device_id,
|
||||
"rev_id": asic_info.rev_id,
|
||||
"asic_serial": asic_info.asic_serial.decode("utf-8"),
|
||||
"xgmi_physical_id": asic_info.xgmi_physical_id
|
||||
}
|
||||
|
||||
|
||||
|
||||
Referens i nytt ärende
Block a user