From a25f55aa0f552818eb6da77002095b9ad335dff5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Dec 2025 17:50:47 -0800 Subject: [PATCH] ... --- lib/classes/device_installer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/classes/device_installer.py b/lib/classes/device_installer.py index 1ebe5527..35df05cb 100644 --- a/lib/classes/device_installer.py +++ b/lib/classes/device_installer.py @@ -485,13 +485,13 @@ class DeviceInstaller(): if libcudart.cudaRuntimeGetVersion(ctypes.byref(version)) == 0: device_count = ctypes.c_int() if libcudart.cudaGetDeviceCount(ctypes.byref(device_count)) == 0: + v = version.value + major = v // 1000 + minor = (v % 1000) // 10 if device_count.value > 0: - v = version.value - major = v // 1000 - minor = (v % 1000) // 10 version_out = f"{major}.{minor}" else: - msg = f'Runtime present ({version.value}) but no devices' + msg = f'Runtime present ({major}.{minor}) but no devices.' except (OSError, AttributeError): pass # CUDA TOOLKIT detection (fallback only) @@ -517,8 +517,8 @@ class DeviceInstaller(): version_out = f.read() break if not version_out: - if msg == '': - msg = 'CUDA runtime detected but NVIDIA CUDA Toolkit or Runtime not installed.' + if not msg: + msg = 'CUDA Toolkit or Runtime not installed or hardware not detected.' else: version_str = toolkit_version_parse(version_out) cmp = toolkit_version_compare(version_str, cuda_version_range)