diff --git a/projects/amdsmi/CHANGELOG.md b/projects/amdsmi/CHANGELOG.md index 575341c36d..ff45dc48ae 100644 --- a/projects/amdsmi/CHANGELOG.md +++ b/projects/amdsmi/CHANGELOG.md @@ -47,6 +47,10 @@ Full documentation for amd_smi_lib is available at [https://rocm.docs.amd.com/pr ... ``` +### Resolved issues + +- **Deduplicated GPU IDs when receiving events using the `amd-smi event` command**. + ## amd_smi_lib for ROCm 6.4.1 ### Added diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 4534133262..48cb58a84e 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -6184,7 +6184,7 @@ class AMDSMICommands(): item_list = item.split(": ") message_dict.update({item_list[0]: item_list[1]}) values_dict["message"] = message_dict - commands.logger.store_output(device, 'values', values_dict) + commands.logger.store_output(event['processor_handle'], 'values', values_dict) commands.logger.print_output() except amdsmi_exception.AmdSmiLibraryException as e: if e.err_code != amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NO_DATA: diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index cec33d2f1f..321e5e7c62 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -536,9 +536,10 @@ class AmdSmiEventReader: unique_event_values = set(event.value for event in AmdSmiEvtNotificationType) if self.event_info[i].event in unique_event_values: if AmdSmiEvtNotificationType(self.event_info[i].event).name != "NONE": + processor_handle = amdsmi_wrapper.amdsmi_processor_handle(self.event_info[i].processor_handle) ret.append( { - "processor_handle": self.event_info[i].processor_handle, + "processor_handle": processor_handle, "event": AmdSmiEvtNotificationType(self.event_info[i].event).name, "message": self.event_info[i].message.decode("utf-8"), }