2
0

Print log when PIDs dont use any GPU device.

showpidgpus prints 'none' when no GPU devices are
being used by the running process. Adding a fix
to print a relevant message.

Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I165a6644a76c8e1c3c3cad676dcfd41eb1c4724f


[ROCm/amdsmi commit: dcab886394]
Este cometimento está contido em:
Divya Shikre
2022-05-31 16:17:42 -04:00
ascendente ccf3ac2b15
cometimento fdeb60d881
+4 -1
Ver ficheiro
@@ -1613,7 +1613,10 @@ def showGpusByPid(pidList):
if rsmi_ret_ok(ret): if rsmi_ret_ok(ret):
metricName = 'PID %s is using %s DRM device(s)' % (pid, str(num_devices.value)) metricName = 'PID %s is using %s DRM device(s)' % (pid, str(num_devices.value))
printListLog(metricName, list(dv_indices)) if (num_devices.value):
printListLog(metricName, list(dv_indices))
else:
printLog(None, metricName, None)
else: else:
print(None, 'Unable to get list of KFD PIDs. A kernel update may be needed', None) print(None, 'Unable to get list of KFD PIDs. A kernel update may be needed', None)
printLogSpacer() printLogSpacer()