Skip to content

Commit b365264

Browse files
authored
Guard unsupported NVML clock-domain queries (#2651)
Treat per-domain clock queries as independently optional. Individual domains may reject minimum, maximum, or current clock queries even on newer devices.
1 parent f693ae6 commit b365264

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎cuda_core/tests/system/test_system_device.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,10 @@ def test_clock(subtests):
590590
with unsupported_before(device, None):
591591
pstate = device.performance_state
592592

593-
min_, max_ = clock.get_min_max_clock_of_pstate_mhz(pstate)
593+
# Individual queries may be unsupported for a clock domain even
594+
# on newer devices.
595+
with unsupported_before(device, None):
596+
min_, max_ = clock.get_min_max_clock_of_pstate_mhz(pstate)
594597
assert isinstance(min_, int)
595598
assert min_ >= 0
596599
assert isinstance(max_, int)
@@ -601,7 +604,7 @@ def test_clock(subtests):
601604
assert isinstance(max_mhz, int)
602605
assert max_mhz >= 0
603606

604-
with unsupported_before(device, DeviceArch.KEPLER):
607+
with unsupported_before(device, None):
605608
current_mhz = clock.get_current_mhz()
606609
assert isinstance(current_mhz, int)
607610
assert current_mhz >= 0

0 commit comments

Comments
 (0)