From df6b8386cf2e05ddc33a30c7e1ca313a678c9f2e Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Thu, 18 Jul 2024 13:12:03 -0500 Subject: [PATCH] Fix amd-smi event from reading NONE event type Signed-off-by: Maisam Arif Change-Id: I7acf91eb682b3f0873ca34a98191eafd3925a344 [ROCm/amdsmi commit: 8f15c2260621547b09e722cc30bb5be06206d943] --- projects/amdsmi/py-interface/amdsmi_interface.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 391a742238..1b3cb3ec6d 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -442,13 +442,14 @@ class AmdSmiEventReader: for i in range(0, num_elem): unique_event_values = set(event.value for event in AmdSmiEvtNotificationType) if self.event_info[i].event in unique_event_values: - ret.append( - { - "processor_handle": self.event_info[i].processor_handle, - "event": AmdSmiEvtNotificationType(self.event_info[i].event).name, - "message": self.event_info[i].message.decode("utf-8"), - } - ) + if AmdSmiEvtNotificationType(self.event_info[i].event).name != "NONE": + ret.append( + { + "processor_handle": self.event_info[i].processor_handle, + "event": AmdSmiEvtNotificationType(self.event_info[i].event).name, + "message": self.event_info[i].message.decode("utf-8"), + } + ) return ret