From 628682645b711552d19e2f38860573eae9b078ec Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Wed, 16 Oct 2024 09:08:53 -0500 Subject: [PATCH] [SWDEV-491466] Fix throttle metrics CLI on VM Signed-off-by: Maisam Arif Change-Id: I41166df4d155ec1d7d5f30b51dd9e0e02e655eb9 [ROCm/amdsmi commit: 9a0d56fea806f64cdf0fc6ee44058ae1797d6370] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 02bcc45f35..8e450d2c3d 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -1249,10 +1249,9 @@ class AMDSMICommands(): args.temperature = temperature if pcie: args.pcie = pcie - if throttle: - args.throttle = throttle - current_platform_args += ["usage", "power", "clock", "temperature", "pcie", "throttle"] - current_platform_values += [args.usage, args.power, args.clock, args.temperature, args.pcie, args.throttle] + current_platform_args += ["usage", "power", "clock", "temperature", "pcie"] + current_platform_values += [args.usage, args.power, args.clock, + args.temperature, args.pcie] # Only args that are applicable to Hypervisors and BM Linux if self.helpers.is_hypervisor() or (self.helpers.is_baremetal() and self.helpers.is_linux()): @@ -1276,8 +1275,12 @@ class AMDSMICommands(): args.xgmi_err = xgmi_err if energy: args.energy = energy - current_platform_args += ["fan", "voltage_curve", "overdrive", "perf_level", "xgmi_err", "energy"] - current_platform_values += [args.fan, args.voltage_curve, args.overdrive, args.perf_level, args.xgmi_err, args.energy] + if throttle: + args.throttle = throttle + current_platform_args += ["fan", "voltage_curve", "overdrive", "perf_level", + "xgmi_err", "energy", "throttle"] + current_platform_values += [args.fan, args.voltage_curve, args.overdrive, + args.perf_level, args.xgmi_err, args.energy, args.throttle] if self.helpers.is_hypervisor(): if schedule: @@ -1291,7 +1294,8 @@ class AMDSMICommands(): if xgmi: args.xgmi = xgmi current_platform_args += ["schedule", "guard", "guest_data", "fb_usage", "xgmi"] - current_platform_values += [args.schedule, args.guard, args.guest_data, args.fb_usage, args.xgmi] + current_platform_values += [args.schedule, args.guard, args.guest_data, + args.fb_usage, args.xgmi] # Handle No GPU passed if args.gpu == None: