From c8da426b9809270d5ac5b01c32d78f77c1404656 Mon Sep 17 00:00:00 2001 From: Harkirat Gill Date: Mon, 23 Sep 2024 13:11:45 -0400 Subject: [PATCH] Updated error message when driver modules not loaded Small change to add sudo modprobe amdgpu/amd_hsmp suggestion if modules are not loaded. Requested per Maisam, will close https://github.com/ROCm/amdsmi/issues/45 Change-Id: Ia7ffcc99df18296c5c682f2082ff8dd8f007d557 [ROCm/amdsmi commit: 3660724a08fc0bd66a22184c29e6a9a93863234c] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 6bd534413f..880fd66788 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -64,7 +64,7 @@ class AMDSMICommands(): if len(self.device_handles) == 0: # No GPU's found post amdgpu driver initialization - logging.error('Unable to detect any GPU devices, check amdgpu version and module status') + logging.error('Unable to detect any GPU devices, check amdgpu version and module status (sudo modprobe amdgpu)') exit_flag = True if self.helpers.is_amd_hsmp_initialized(): @@ -73,7 +73,7 @@ class AMDSMICommands(): except amdsmi_exception.AmdSmiLibraryException as e: if e.err_code in (amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NOT_INIT, amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NO_DRV): - logging.info('Unable to get CPU devices, amd_hsmp driver not loaded') + logging.info('Unable to detect any CPU devices, check amd_hsmp version and module status (sudo modprobe amd_hsmp)') else: raise e @@ -83,13 +83,13 @@ class AMDSMICommands(): except amdsmi_exception.AmdSmiLibraryException as e: if e.err_code in (amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NOT_INIT, amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NO_DRV): - logging.info('Unable to get CORE devices, amd_hsmp driver not loaded') + logging.info('Unable to get CORE devices, amd_hsmp driver not loaded (sudo modprobe amd_hsmp)') else: raise e if len(self.cpu_handles) == 0 and len(self.core_handles) == 0: # No CPU's found post amd_hsmp driver initialization - logging.error('Unable to detect any CPU devices, check amd_hsmp version and module status') + logging.error('Unable to detect any CPU devices, check amd_hsmp version and module status (sudo modprobe amd_hsmp)') exit_flag = True if exit_flag: