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]
Этот коммит содержится в:
Divya Shikre
2022-05-31 16:17:42 -04:00
родитель ccf3ac2b15
Коммит fdeb60d881
+4 -1
Просмотреть файл
@@ -1613,7 +1613,10 @@ def showGpusByPid(pidList):
if rsmi_ret_ok(ret):
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:
print(None, 'Unable to get list of KFD PIDs. A kernel update may be needed', None)
printLogSpacer()