We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4808994 commit 8effcd9Copy full SHA for 8effcd9
library/sensors/sensors_python.py
@@ -386,12 +386,15 @@ def fan_percent() -> float:
386
387
@staticmethod
388
def frequency() -> float:
389
- if pyamdgpuinfo:
390
- pyamdgpuinfo.detect_gpus()
391
- return pyamdgpuinfo.get_gpu(0).query_sclk() / 1000000
392
- elif pyadl:
393
- return pyadl.ADLManager.getInstance().getDevices()[0].getCurrentEngineClock()
394
- else:
+ try:
+ if pyamdgpuinfo:
+ pyamdgpuinfo.detect_gpus()
+ return pyamdgpuinfo.get_gpu(0).query_sclk() / 1000000
+ elif pyadl:
+ return pyadl.ADLManager.getInstance().getDevices()[0].getCurrentEngineClock()
395
+ else:
396
+ return math.nan
397
+ except:
398
return math.nan
399
400
0 commit comments