Skip to content

Commit

Permalink
Merge amd-staging into amd-master 20230106
Browse files Browse the repository at this point in the history
Signed-off-by: Hao Zhou <[email protected]>
Change-Id: Ie0c9c44a7fb39ecdcd56158d501c738ceb64096c
  • Loading branch information
Hao Zhou authored and Hao Zhou committed Jan 6, 2023
2 parents cd31d17 + 5c478e9 commit afa6e80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python_smi_tools/rocm_smi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2052,8 +2052,11 @@ def showProductName(deviceList):
# Retrieve the device SKU as a substring from VBIOS
ret = rocmsmi.rsmi_dev_vbios_version_get(device, vbios, 256)
if rsmi_ret_ok(ret, device) and vbios.value.decode():
# Device SKU is just 6 characters after the first occurance of '-' in vbios_version
device_sku = vbios.value.decode().split('-')[1][:6]
# Device SKU is just the characters in between the two '-' in vbios_version
if vbios.value.decode().count('-') == 2 and len(str(vbios.value.decode().split('-')[1])) > 1:
device_sku = vbios.value.decode().split('-')[1]
else:
device_sku = 'unknown'
printLog(device, 'Card SKU', '\t\t' + device_sku)
else:
printLog(device, 'Incompatible device.\n' \
Expand Down

0 comments on commit afa6e80

Please sign in to comment.