From 8c41a911b4c505cfc00ef916392af543eb3dc1b6 Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Thu, 13 Jul 2023 08:28:53 -0500 Subject: [PATCH] rocm-smi --showevents shows wrong gpuID Use the gpuid returned from the event data instead. Change-Id: I7f286cc105f7ea12985223e603504f0ef3d9724e [ROCm/rocm_smi_lib commit: 0aeb6025bdc08444c0c297824e3d77e39ab69203] --- projects/rocm-smi-lib/python_smi_tools/rocm_smi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index 5c12624142..2fe68ab518 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -537,7 +537,7 @@ def printEventList(device, delay, eventList): data = rsmi_evt_notification_data_t(1) rocmsmi.rsmi_event_notification_get(delay, byref(num_elements), byref(data)) if len(data.message) > 0: - print2DArray([['\rGPU[%d]:\t' % (device), ctime().split()[3], notification_type_names[data.event.value - 1], + print2DArray([['\rGPU[%d]:\t' % (data.dv_ind), ctime().split()[3], notification_type_names[data.event.value - 1], data.message.decode('utf8') + '\r']]) def printLog(device, metricName, value=None, extraSpace=False):