From bb9d92af6f1b497edbaf03a2dd1abd51ac8afa59 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Mon, 4 Mar 2024 18:50:54 +0100 Subject: [PATCH] Fix pyamdgpuinfo GPU core clock unit --- library/sensors/sensors_python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/sensors/sensors_python.py b/library/sensors/sensors_python.py index cbbb90c0..2156717a 100644 --- a/library/sensors/sensors_python.py +++ b/library/sensors/sensors_python.py @@ -339,9 +339,11 @@ def fan_percent() -> float: @staticmethod def frequency() -> float: if pyamdgpuinfo: - return pyamdgpuinfo.get_gpu(0).query_sclk() + return pyamdgpuinfo.get_gpu(0).query_sclk() / 1000000 elif pyadl: return pyadl.ADLManager.getInstance().getDevices()[0].getCurrentEngineClock() + else: + return math.nan @staticmethod def is_available() -> bool: