diff --git a/amdsmi_cli/amdsmi_commands.py b/amdsmi_cli/amdsmi_commands.py index 1168b5f963..5f28c4a172 100644 --- a/amdsmi_cli/amdsmi_commands.py +++ b/amdsmi_cli/amdsmi_commands.py @@ -801,7 +801,7 @@ class AMDSMICommands(): cpu_attributes = ["smu", "interface_ver"] for attr in cpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): cpu_args_enabled = True break @@ -812,7 +812,7 @@ class AMDSMICommands(): "dfc_ucode", "fb_info", "num_vf"] for attr in gpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): gpu_args_enabled = True break @@ -2256,7 +2256,7 @@ class AMDSMICommands(): "guard", "guest_data", "fb_usage", "xgmi"] for attr in gpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): gpu_args_enabled = True break @@ -2269,7 +2269,7 @@ class AMDSMICommands(): "cpu_dimm_pow_consumption", "cpu_dimm_thermal_sensor"] for attr in cpu_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): cpu_args_enabled = True break @@ -2278,7 +2278,7 @@ class AMDSMICommands(): core_attributes = ["core_boost_limit", "core_curr_active_freq_core_limit", "core_energy"] for attr in core_attributes: if hasattr(args, attr): - if getattr(args, attr) is not None: + if getattr(args, attr): core_args_enabled = True break @@ -3315,13 +3315,18 @@ class AMDSMICommands(): cpu_args_enabled = False cpu_attributes = ["cpu_pwr_limit", "cpu_xgmi_link_width", "cpu_lclk_dpm_level", "cpu_pwr_eff_mode", "cpu_gmi3_link_width", "cpu_pcie_link_rate", "cpu_df_pstate_range", - "cpu_enable_apb", "cpu_disable_apb", "soc_boost_limit"] + "cpu_disable_apb", "soc_boost_limit"] for attr in cpu_attributes: if hasattr(args, attr): if getattr(args, attr) is not None: cpu_args_enabled = True break + # Check if CPU set argument with store_true has been passed + if hasattr(args, "cpu_enable_apb"): + if getattr(args, attr): + cpu_args_enabled = True + # Check if a Core argument has been set core_args_enabled = False core_attributes = ["core_boost_limit"]