From d76502adca00b488248a21676a4356e0bd3f0b69 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 16 Aug 2026 18:22:42 -0700 Subject: [PATCH] Guard unsupported NVML clock-domain queries Treat per-domain clock queries as independently optional. Individual domains may reject minimum, maximum, or current clock queries even on newer devices. --- cuda_core/tests/system/test_system_device.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index d3ba71d1ad4..2663e207beb 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -590,7 +590,10 @@ def test_clock(subtests): with unsupported_before(device, None): pstate = device.performance_state - min_, max_ = clock.get_min_max_clock_of_pstate_mhz(pstate) + # Individual queries may be unsupported for a clock domain even + # on newer devices. + with unsupported_before(device, None): + min_, max_ = clock.get_min_max_clock_of_pstate_mhz(pstate) assert isinstance(min_, int) assert min_ >= 0 assert isinstance(max_, int) @@ -601,7 +604,7 @@ def test_clock(subtests): assert isinstance(max_mhz, int) assert max_mhz >= 0 - with unsupported_before(device, DeviceArch.KEPLER): + with unsupported_before(device, None): current_mhz = clock.get_current_mhz() assert isinstance(current_mhz, int) assert current_mhz >= 0