diff --git a/amdsmi_cli/amdsmi_commands.py b/amdsmi_cli/amdsmi_commands.py index a243adfd74..76f1d20c9a 100644 --- a/amdsmi_cli/amdsmi_commands.py +++ b/amdsmi_cli/amdsmi_commands.py @@ -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" diff --git a/py-interface/README.md b/py-interface/README.md index 72f9f843fd..bf7d547809 100644 --- a/py-interface/README.md +++ b/py-interface/README.md @@ -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) ``` diff --git a/py-interface/amdsmi_interface.py b/py-interface/amdsmi_interface.py index 9c439e3104..a3b1b4127b 100644 --- a/py-interface/amdsmi_interface.py +++ b/py-interface/amdsmi_interface.py @@ -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 }