Cleanup & rev_id fix
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I497037939b3f13b4f835762f2cdd42261e7f26f4
Signed-off-by: Maisam Arif <maisarif@amd.com>
[ROCm/amdsmi commit: 482930eee3]
This commit is contained in:
@@ -620,7 +620,7 @@ ASIC:
|
|||||||
SUBVENDOR_ID: 0
|
SUBVENDOR_ID: 0
|
||||||
DEVICE_ID: 0x74a0
|
DEVICE_ID: 0x74a0
|
||||||
REV_ID: 0x0
|
REV_ID: 0x0
|
||||||
ASIC_SERIAL: 0x71660a3c71d5f817
|
ASIC_SERIAL: 0x71660A3C71D5F817
|
||||||
OAM_ID: 0
|
OAM_ID: 0
|
||||||
BUS:
|
BUS:
|
||||||
BDF: 0000:01:00.0
|
BDF: 0000:01:00.0
|
||||||
@@ -731,7 +731,7 @@ ASIC:
|
|||||||
SUBVENDOR_ID: 0
|
SUBVENDOR_ID: 0
|
||||||
DEVICE_ID: 0x74a0
|
DEVICE_ID: 0x74a0
|
||||||
REV_ID: 0x0
|
REV_ID: 0x0
|
||||||
ASIC_SERIAL: 0xb4b2fa0be8628b1a
|
ASIC_SERIAL: 0xB4B2FA0BE8628B1A
|
||||||
OAM_ID: 1
|
OAM_ID: 1
|
||||||
BUS:
|
BUS:
|
||||||
BDF: 0001:01:00.0
|
BDF: 0001:01:00.0
|
||||||
@@ -842,7 +842,7 @@ ASIC:
|
|||||||
SUBVENDOR_ID: 0
|
SUBVENDOR_ID: 0
|
||||||
DEVICE_ID: 0x74a0
|
DEVICE_ID: 0x74a0
|
||||||
REV_ID: 0x0
|
REV_ID: 0x0
|
||||||
ASIC_SERIAL: 0xa9073066a98ba4a6
|
ASIC_SERIAL: 0xA9073066A98BA4A6
|
||||||
OAM_ID: 2
|
OAM_ID: 2
|
||||||
BUS:
|
BUS:
|
||||||
BDF: 0002:01:00.0
|
BDF: 0002:01:00.0
|
||||||
@@ -953,7 +953,7 @@ ASIC:
|
|||||||
SUBVENDOR_ID: 0
|
SUBVENDOR_ID: 0
|
||||||
DEVICE_ID: 0x74a0
|
DEVICE_ID: 0x74a0
|
||||||
REV_ID: 0x0
|
REV_ID: 0x0
|
||||||
ASIC_SERIAL: 0x53a0a1ff3830f499
|
ASIC_SERIAL: 0x53A0A1FF3830F499
|
||||||
OAM_ID: 3
|
OAM_ID: 3
|
||||||
BUS:
|
BUS:
|
||||||
BDF: 0003:01:00.0
|
BDF: 0003:01:00.0
|
||||||
|
|||||||
@@ -1574,7 +1574,7 @@ def amdsmi_get_gpu_asic_info(
|
|||||||
"vendor_name": asic_info_struct.vendor_name.decode("utf-8"),
|
"vendor_name": asic_info_struct.vendor_name.decode("utf-8"),
|
||||||
"subvendor_id": asic_info_struct.subvendor_id,
|
"subvendor_id": asic_info_struct.subvendor_id,
|
||||||
"device_id": asic_info_struct.device_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"),
|
"asic_serial": asic_info_struct.asic_serial.decode("utf-8"),
|
||||||
"oam_id": asic_info_struct.oam_id
|
"oam_id": asic_info_struct.oam_id
|
||||||
}
|
}
|
||||||
@@ -1584,16 +1584,18 @@ def amdsmi_get_gpu_asic_info(
|
|||||||
if not asic_info[value]:
|
if not asic_info[value]:
|
||||||
asic_info[value] = "N/A"
|
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:
|
for value in hex_values:
|
||||||
if asic_info[value]:
|
if asic_info[value]:
|
||||||
asic_info[value] = hex(asic_info[value])
|
asic_info[value] = hex(asic_info[value])
|
||||||
else:
|
else:
|
||||||
asic_info[value] = "N/A"
|
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"]:
|
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:
|
else:
|
||||||
asic_info["asic_serial"] = "N/A"
|
asic_info["asic_serial"] = "N/A"
|
||||||
|
|
||||||
|
|||||||
Viittaa uudesa ongelmassa
Block a user