diff --git a/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py b/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py index 9b1e5e23a7..65f5140b39 100644 --- a/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py +++ b/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py @@ -8,6 +8,7 @@ import pytest from cuda.bindings import nvml +from cuda.bindings._internal.utils import FunctionNotFoundError as NvmlSymbolNotFoundError @cache @@ -49,9 +50,10 @@ def unsupported_before(device: int, expected_device_arch: nvml.DeviceArch | str try: yield - except nvml.NotSupportedError: - # The API call raised NotSupportedError, so we skip the test, but - # don't fail it + except (nvml.NotSupportedError, nvml.FunctionNotFoundError, NvmlSymbolNotFoundError): + # The API call raised NotSupportedError, NVML status FunctionNotFoundError, + # or NvmlSymbolNotFoundError (symbol absent from the loaded NVML DLL), so we + # skip the test but don't fail it pytest.skip( f"Unsupported call for device architecture {nvml.DeviceArch(device_arch).name} " f"on device '{nvml.device_get_name(device)}'" diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index 83a71a13ec..2a094d8211 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -586,7 +586,7 @@ def test_clock(): with unsupported_before(device, DeviceArch.MAXWELL): try: offsets = clock.get_offsets(pstate) - except system.InvalidArgumentError: + except (system.InvalidArgumentError, system.NotFoundError): pass else: assert isinstance(offsets, system.ClockOffsets)