[rocm_smi.py] --showpower error bugfix

Fix error message in -P for secondary die

Signed-off-by: Elena Sakhnovitch
Change-Id: Ica3c0a83b565d2231fad23389b9378056a0f56b3


[ROCm/rocm_smi_lib commit: 6a01b6b2ec]
这个提交包含在:
Elena Sakhnovitch 编写, Bill(Shuzhou) Liu 于 2021-07-30 15:20:21 -04:00 提交
1 父节点 6496488d1d
当前提交 63d9a19053
1 个文件已更改
+4 -1
@@ -1845,7 +1845,10 @@ def showPower(deviceList):
"""
printLogSpacer(' Power Consumption ')
for device in deviceList:
if str(getPower(device)) != '0.0':
if checkIfSecondaryDie(device):
printLog(device, 'Average Graphics Package Power (W)', "Secondary die")
printLog(None, "\t\tPrimary die above shows total (primary + secondary) socket power information", None)
elif str(getPower(device)) != '0.0':
printLog(device, 'Average Graphics Package Power (W)', getPower(device))
else:
printErrLog(device, 'Unable to get Average Graphics Package Power Consumption')