Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kernel_tuner/observers/tegra.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_temp_path(self):
for zone in Path("/sys/class/thermal").iterdir():
with open(zone / Path("type")) as fp:
name = fp.read().strip()
if name == "GPU-therm":
if name in ("GPU-therm", "gpu-thermal"):
gpu_temp_path = str(zone)
break

Expand Down Expand Up @@ -118,7 +118,7 @@ def _read_clock_file(self, fname):
if len(raw_data) > 1:
data = raw_data.astype(int)
else:
data = int(raw_data)
data = int(raw_data[0])
return data

def _write_clock_file(self, fname, value):
Expand Down Expand Up @@ -168,7 +168,7 @@ def reset_clock(self):

def __del__(self):
# restore original core clocks, if changed
if self.has_changed_clocks:
if hasattr(self, "has_changed_clocks") and self.has_changed_clocks:
self.reset_clock()

def read_gpu_temp(self):
Expand Down Expand Up @@ -294,7 +294,7 @@ def get_results(self):

def get_tegra_gr_clocks(n=None, quiet=False):
"""Get tunable parameter for Tegra graphics clock, n is desired number of values."""
d = tegra()
d = tegra(power_path="", temp_path="")
gr_clocks = d.supported_gr_clocks

if n and (len(gr_clocks) > n):
Expand Down
Loading