From 5d7c30ee38d45a99e51d743d9843afed8547149f Mon Sep 17 00:00:00 2001 From: Elena Sakhnovitch Date: Thu, 10 Feb 2022 10:50:32 -0500 Subject: [PATCH] [rocm_smi.py]: fix input error type for --setclock signed-off-by: Elena Sakhnovitch Change-Id: I9626978780f360c591fb8908f5b759f2289dff0b --- python_smi_tools/rocm_smi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_smi_tools/rocm_smi.py b/python_smi_tools/rocm_smi.py index ebbc1ee5..57606eee 100755 --- a/python_smi_tools/rocm_smi.py +++ b/python_smi_tools/rocm_smi.py @@ -2915,7 +2915,7 @@ def save(deviceList, savefilepath): groupAction.add_argument('--resetperfdeterminism', help='Disable performance determinism', action='store_true') groupAction.add_argument('--setclock', help='Set Clock Frequency Level(s) for specified clock (requires manual Perf level)', - type=str, metavar='LEVEL', nargs=2) + metavar=('TYPE','LEVEL'), nargs=2) groupAction.add_argument('--setsclk', help='Set GPU Clock Frequency Level(s) (requires manual Perf level)', type=int, metavar='LEVEL', nargs='+') groupAction.add_argument('--setmclk', help='Set GPU Memory Clock Frequency Level(s) (requires manual Perf level)', @@ -3173,7 +3173,7 @@ def save(deviceList, savefilepath): if args.showenergycounter: showEnergy(deviceList) if args.setclock: - setClocks(deviceList, args.setclock[0], args.setclock[1]) + setClocks(deviceList, args.setclock[0], [int(args.setclock[1])]) if args.setsclk: setClocks(deviceList, 'sclk', args.setsclk) if args.setmclk: