From 3a11b92287b5bc92e4085615c6fb1ceed2290e37 Mon Sep 17 00:00:00 2001 From: Divya Shikre Date: Thu, 15 Apr 2021 17:03:17 -0400 Subject: [PATCH] Fix for cli errors - extra args in perf_determinism, undefined variable in setClocks Signed-off-by: Divya Shikre Change-Id: Id138cfcbea4384f520537cc045d358024177b1ac [ROCm/amdsmi commit: d9f7bd0ff41d83a62baebd431090512e0d1cc39e] --- projects/amdsmi/python_smi_tools/rocm_smi.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/amdsmi/python_smi_tools/rocm_smi.py b/projects/amdsmi/python_smi_tools/rocm_smi.py index e52aa3ad38..7d46148bd8 100755 --- a/projects/amdsmi/python_smi_tools/rocm_smi.py +++ b/projects/amdsmi/python_smi_tools/rocm_smi.py @@ -854,7 +854,7 @@ def setClocks(deviceList, clktype, clk): RETCODE = 1 return if clktype not in validClockNames: - printErrLog(device, 'Unable to set clock level') + printErrLog(None, 'Unable to set clock level') logging.error('Invalid clock type %s', clktype) RETCODE = 1 return @@ -870,7 +870,7 @@ def setClocks(deviceList, clktype, clk): freq_bitmask = 0 for bit in clk: if bit > 63: - printErrLog(device, 'Invalid clock frequency') + printErrLog(None, 'Invalid clock frequency') logging.error('Invalid frequency: %s', bit) RETCODE = 1 return @@ -920,9 +920,8 @@ def setPerfDeterminism(deviceList, clkvalue): logging.error('%s is not an integer', clkvalue) RETCODE = 1 return - clklevel = c_uint32(1) for device in deviceList: - ret = rocmsmi.rsmi_perf_determinism_mode_set(device, clklevel, int(clkvalue)) + ret = rocmsmi.rsmi_perf_determinism_mode_set(device, int(clkvalue)) if rsmi_ret_ok(ret, device): printLog(device, 'Successfully enabled performance determinism and set GFX clock frequency', str(clkvalue)) else: