rocm_smi.py: Fix gpu reset error
Since device is a list, we need to pass a single item to the isAmdGpu function. Fixes:17bdc065a1"rocm_smi.py: Don't try to reset non-AMD GPUs" Signed-off-by: Kent Russell <kent.russell@amd.com> Change-Id: I19a74377636ff4589f11d092f41e1d35c1acb307 [ROCm/rocm_smi_lib commit:242d94a668]
This commit is contained in:
@@ -961,11 +961,11 @@ def resetGpu(device):
|
||||
logging.error('GPU Reset can only be performed on one GPU per call')
|
||||
RETCODE = 1
|
||||
return
|
||||
if not isAmdDevice(device):
|
||||
resetDev = int(device[0])
|
||||
if not isAmdDevice(resetDev):
|
||||
logging.error('GPU Reset can only be performed on an AMD GPU')
|
||||
RETCODE = 1
|
||||
return
|
||||
resetDev = int(device[0])
|
||||
ret = rocmsmi.rsmi_dev_gpu_reset(resetDev)
|
||||
if rsmi_ret_ok(ret, resetDev):
|
||||
printLog(resetDev, 'Successfully reset GPU %d' % (resetDev), None)
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user