rocm-smi --showevents shows wrong gpuID

Use the gpuid returned from the event data instead.

Change-Id: I7f286cc105f7ea12985223e603504f0ef3d9724e


[ROCm/rocm_smi_lib commit: 0aeb6025bd]
This commit is contained in:
Bill(Shuzhou) Liu
2023-07-13 08:28:53 -05:00
parent 48712cbeb5
commit 8c41a911b4
@@ -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):