Adjusted throttle unit logic in amdsmi_commands.py

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Icce949ff93f45c9751f43df0a80614fd377318fa
Ta zmiana jest zawarta w:
%! (template.HTML=Maisam Arif)złożyło 2024-09-27 13:26:58 -05:00
1 rodzic 3a4abbd8c0
złożenie 2c8e2060cb
Plik 1 zmieniony
+5 -7
+5 -7
Wyświetl plik
@@ -2145,15 +2145,13 @@ class AMDSMICommands():
logging.debug("Failed to get violation status' for gpu %s | %s", gpu_id, e.get_error_info())
for key, value in throttle_status.items():
if ("active" in key) and (value is True):
throttle_status[key] = "ACTIVE"
continue
elif ("active" in key) and (value is False):
if "active" in key:
throttle_status[key] = "NOT ACTIVE"
if value:
throttle_status[key] = "ACTIVE"
continue
if "percent" in key:
True # continue with rest of logic
else:
if "percent" not in key:
continue
activity_unit = '%'