Revert "rocm_smi.py: Don't try to print absent clock files"
This reverts commit b931380f02.
DRM device id does not always match GPU ID in the rocm_smi.py. This leads to cases where wrong device is checked by os.path.isfile().
Change-Id: Ib6f2b9be123b7eb64334d3feec57f63d7eb37d6f
Este commit está contenido en:
cometido por
Elena Sakhnovitch
padre
9d7fd34d2b
commit
be66d67ef2
@@ -1401,10 +1401,6 @@ def showClocks(deviceList):
|
||||
for device in deviceList:
|
||||
for clk_type in sorted(rsmi_clk_names_dict):
|
||||
freq_list = []
|
||||
if not os.path.isfile(
|
||||
os.path.join('/sys/class/drm', 'card%d' % (device), 'device', 'pp_dpm_%s' % clk_type)):
|
||||
logging.debug('No clock file for %s on card%d' % (clk_type, device))
|
||||
continue
|
||||
if rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], byref(freq))
|
||||
if rsmi_ret_ok(ret, device, clk_type, True):
|
||||
@@ -1466,10 +1462,6 @@ def showCurrentClocks(deviceList, clk_defined=None, concise=False):
|
||||
|
||||
else: # if clk is not defined, will display all current clk
|
||||
for clk_type in sorted(rsmi_clk_names_dict):
|
||||
if not os.path.isfile(
|
||||
os.path.join('/sys/class/drm', 'card%d' % (device), 'device', 'pp_dpm_%s' % clk_type)):
|
||||
logging.debug('No clock file for %s on card%d' % (clk_type, device))
|
||||
continue
|
||||
if rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], byref(freq))
|
||||
if rsmi_ret_ok(ret, device, clk_type, True):
|
||||
|
||||
Referencia en una nueva incidencia
Block a user