Skip to content

Commit

Permalink
better handle WS cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricks-Lab committed May 5, 2023
1 parent 9e00b08 commit 54abb20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions GPUmodules/GPUmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2254,9 +2254,6 @@ def set_gpu_list(self, clinfo_flag: bool = False) -> bool:
try:
with open(pp_od_clk_voltage_file, 'r', encoding='utf-8') as file_ptr:
pp_od_file_details = file_ptr.read()
if not pp_od_file_details.strip():
self[gpu_uuid].disable_param_read('pp_od_clk_voltage')
writable = False
except OSError as except_err:
pp_od_file_details = '{} not readable'.format(pp_od_clk_voltage_file)
self[gpu_uuid].disable_param_read(('pp_od_clk_voltage', 'sclk_f_range',
Expand All @@ -2268,7 +2265,7 @@ def set_gpu_list(self, clinfo_flag: bool = False) -> bool:
writable = False
else:
LOGGER.debug('%s exists, opened, and read.', pp_od_clk_voltage_file)
if not pp_od_file_details:
if not pp_od_file_details.strip().strip('\n'):
self[gpu_uuid].disable_param_read(('pp_od_clk_voltage', 'sclk_f_range',
'mclk_f_range', 'vddc_range'))
LOGGER.debug('%s exists, but empty on read.', pp_od_clk_voltage_file)
Expand Down

0 comments on commit 54abb20

Please sign in to comment.