diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index f0ead15102..305b305f5d 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -5001,6 +5001,9 @@ class AMDSMICommands(): # Error if no subcommand args are passed if self.helpers.is_baremetal(): + is_gpu_set = False + is_cpu_set = False + is_core_set = False try: is_gpu_set = any([ args.gpu is not None, @@ -5019,7 +5022,7 @@ class AMDSMICommands(): ]) except AttributeError: # If attribute error for gpu, then we could be another subcommand - is_gpu_set = False + pass try: is_cpu_set = any([ @@ -5037,12 +5040,13 @@ class AMDSMICommands(): ]) except AttributeError: # If attribute error for cpu, then we could be another subcommand - is_cpu_set = False - - if args.core_boost_limit: - is_core_set = True - else: - is_core_set = False + pass + try: + if args.core_boost_limit: + is_core_set = True + except AttributeError: + # If attribute error for core, then we could be another subcommand + pass if not (is_gpu_set or is_cpu_set or is_core_set): # if neither GPU / CPU / or Core args are provided, then raise error message diff --git a/projects/amdsmi/rocm_smi/src/rocm_smi.cc b/projects/amdsmi/rocm_smi/src/rocm_smi.cc index db95372899..e735f4c204 100644 --- a/projects/amdsmi/rocm_smi/src/rocm_smi.cc +++ b/projects/amdsmi/rocm_smi/src/rocm_smi.cc @@ -6661,7 +6661,7 @@ rsmi_dev_memory_partition_set(uint32_t dv_ind, rsmi_status_t status = amd::smi::ErrnoToRsmiStatus(ret); if (status != RSMI_STATUS_SUCCESS) { - if (status == EACCES) { + if (status == RSMI_STATUS_PERMISSION) { status = RSMI_STATUS_NOT_SUPPORTED; // already verified permissions } ss << __PRETTY_FUNCTION__