[SWDEV-495169] Update ROCm SMI CLI and Error handling (#3)

Issues include:

Update ROCm SMI displaying None or Not Supported to N/A
Update ROCm SMI displaying err msg to instead log err

Signed-off-by: Juan Castillo juan.castillo@amd.com
Change-Id: I1a2ce6e4f329666b5666664a7d7b4475d6c1cbc7
This commit is contained in:
Galantsev, Dmitrii
2025-01-14 17:15:18 -06:00
zatwierdzone przez Charis Poag
rodzic fdc8d73c64
commit 898ae4ffc1
2 zmienionych plików z 15 dodań i 7 usunięć
+9 -3
Wyświetl plik
@@ -1980,22 +1980,28 @@ def showAllConcise(deviceList):
+ getComputePartition(device, silent)
+ ", " + getPartitionId(device, silent))
sclk = showCurrentClocks([device], 'sclk', concise=silent)
if not sclk:
sclk = 'N/A'
mclk = showCurrentClocks([device], 'mclk', concise=silent)
if not mclk:
mclk = 'N/A'
(retCode, fanLevel, fanSpeed) = getFanSpeed(device, silent)
fan = str(fanSpeed) + '%'
if getPerfLevel(device, silent) != -1:
perf = getPerfLevel(device, silent)
else:
perf = 'Unsupported'
perf = 'N/A'
if getMaxPower(device, silent) != -1:
pwrCap = str(getMaxPower(device, silent)) + 'W'
else:
pwrCap = 'Unsupported'
pwrCap = 'N/A'
if getGpuUse(device, silent) != -1:
gpu_busy = str(getGpuUse(device, silent)) + '%'
else:
gpu_busy = 'Unsupported'
gpu_busy = 'N/A'
allocated_mem_percent = getAllocatedMemoryPercent(device)
if allocated_mem_percent['ret'] != rsmi_status_t.RSMI_STATUS_SUCCESS:
allocated_mem_percent['combined'] = 'N/A'
# Top Row - per device data
values['card%s' % (str(device))] = [device, getNodeId(device),