diff --git a/projects/amdsmi/amdsmi_cli/README.md b/projects/amdsmi/amdsmi_cli/README.md index 966baae543..470d8de6eb 100644 --- a/projects/amdsmi/amdsmi_cli/README.md +++ b/projects/amdsmi/amdsmi_cli/README.md @@ -620,7 +620,7 @@ ASIC: SUBVENDOR_ID: 0 DEVICE_ID: 0x74a0 REV_ID: 0x0 - ASIC_SERIAL: 0x71660a3c71d5f817 + ASIC_SERIAL: 0x71660A3C71D5F817 OAM_ID: 0 BUS: BDF: 0000:01:00.0 @@ -731,7 +731,7 @@ ASIC: SUBVENDOR_ID: 0 DEVICE_ID: 0x74a0 REV_ID: 0x0 - ASIC_SERIAL: 0xb4b2fa0be8628b1a + ASIC_SERIAL: 0xB4B2FA0BE8628B1A OAM_ID: 1 BUS: BDF: 0001:01:00.0 @@ -842,7 +842,7 @@ ASIC: SUBVENDOR_ID: 0 DEVICE_ID: 0x74a0 REV_ID: 0x0 - ASIC_SERIAL: 0xa9073066a98ba4a6 + ASIC_SERIAL: 0xA9073066A98BA4A6 OAM_ID: 2 BUS: BDF: 0002:01:00.0 @@ -953,7 +953,7 @@ ASIC: SUBVENDOR_ID: 0 DEVICE_ID: 0x74a0 REV_ID: 0x0 - ASIC_SERIAL: 0x53a0a1ff3830f499 + ASIC_SERIAL: 0x53A0A1FF3830F499 OAM_ID: 3 BUS: BDF: 0003:01:00.0 diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 5def0d6a31..8dd3f11936 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1574,7 +1574,7 @@ def amdsmi_get_gpu_asic_info( "vendor_name": asic_info_struct.vendor_name.decode("utf-8"), "subvendor_id": asic_info_struct.subvendor_id, "device_id": asic_info_struct.device_id, - "rev_id": asic_info_struct.rev_id, + "rev_id": hex(asic_info_struct.rev_id), "asic_serial": asic_info_struct.asic_serial.decode("utf-8"), "oam_id": asic_info_struct.oam_id } @@ -1584,16 +1584,18 @@ def amdsmi_get_gpu_asic_info( if not asic_info[value]: asic_info[value] = "N/A" - hex_values = ["vendor_id", "subvendor_id", "device_id", "rev_id"] + hex_values = ["vendor_id", "subvendor_id", "device_id"] for value in hex_values: if asic_info[value]: asic_info[value] = hex(asic_info[value]) else: asic_info[value] = "N/A" - # Ensure hex output for asic_serial + # Convert asic serial (hex string) to hex output format if asic_info["asic_serial"]: - asic_info["asic_serial"] = str.format("0x{:016X}", int(asic_info["asic_serial"], base=16)) + asic_serial_string = asic_info["asic_serial"] + asic_serial_hex = int(asic_serial_string, base=16) + asic_info["asic_serial"] = str.format("0x{:016X}", asic_serial_hex) else: asic_info["asic_serial"] = "N/A"