ROCm SMI CLI: Fix setClockRange Error

This patch changes the error handling for setClockRange.

When a device does not support modifying a clock type (sclk/mclk),
an error message is printed through the python CLI.

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I37d9ea4189b1ca81e5deaab5efa6cfa4901b89b3


[ROCm/amdsmi commit: 2b8d0ad70f]
Этот коммит содержится в:
Ori Messinger
2022-05-31 06:13:56 -04:00
родитель cff55d1a6f
Коммит 99b2e41906
+3 -1
Просмотреть файл
@@ -772,11 +772,13 @@ def setClockRange(deviceList, clkType, minvalue, maxvalue, autoRespond):
printLogSpacer(' Set Valid %s Range ' % (clkType))
for device in deviceList:
ret = rocmsmi.rsmi_dev_clk_range_set(device, int(minvalue), int(maxvalue), rsmi_clk_names_dict[clkType])
if rsmi_ret_ok(ret, device):
if rsmi_ret_ok(ret, device, silent=True):
printLog(device, 'Successfully set %s from %s(MHz) to %s(MHz)' % (clkType, minvalue, maxvalue), None)
else:
printErrLog(device, 'Unable to set %s from %s(MHz) to %s(MHz)' % (clkType, minvalue, maxvalue))
RETCODE = 1
if ret == rsmi_status_t.RSMI_STATUS_NOT_SUPPORTED:
printLog(device, 'Setting %s range is not supported for this device.' % (clkType), None)
def setVoltageCurve(deviceList, point, clk, volt, autoRespond):