ROCm SMI CLI: Fix --showproductname bug
This patch fixes a --showproductname bug, which is related to the
device's SKU. If a device with a VBIOS value that cannot be decoded
is used, that device's SKU cannot be parsed out of the VBIOS string.
Now, when the VBIOS value cannot be decoded, an error will be
printed instead of crashing with an 'UnboundLocalError' message.
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I680a182e94107e782235b8a2477ab165988f7703
[ROCm/rocm_smi_lib commit: 56f9d6bfc0]
이 커밋은 다음에 포함됨:
1 부모
37cfd53304
커밋
58d4fd4edb
1 파일이 변경됨
+3
-1
@@ -2069,7 +2069,9 @@ def showProductName(deviceList):
|
||||
device_sku = vbios.value.decode().split('-')[1]
|
||||
else:
|
||||
device_sku = 'unknown'
|
||||
printLog(device, 'Card SKU', '\t\t' + device_sku)
|
||||
printLog(device, 'Card SKU', '\t\t' + device_sku)
|
||||
else:
|
||||
printErrLog(device, "Unable to decode VBIOS value for device SKU")
|
||||
else:
|
||||
printLog(device, 'Incompatible device.\n' \
|
||||
'GPU[%s]\t\t: Expected vendor name: Advanced Micro Devices, Inc. [AMD/ATI]\n' \
|
||||
|
||||
새 이슈에서 참조
사용자 차단