Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cuda_bindings/cuda/bindings/_test_helpers/arch_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pytest

from cuda.bindings import nvml
from cuda.bindings._internal.utils import FunctionNotFoundError as NvmlSymbolNotFoundError


@cache
Expand Down Expand Up @@ -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)}'"
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/tests/system/test_system_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading