File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import pytest
99
1010try :
11- from cuda .bindings import driver , runtime
11+ from cuda .bindings import driver
1212except ImportError :
1313 from cuda import cuda as driver
14- from cuda import cudart as runtime
1514
16- from cuda .core import Device , system
15+ from cuda .core import system
1716from cuda .core ._utils .cuda_utils import handle_return
1817
1918from .conftest import skip_if_nvml_unsupported
@@ -40,15 +39,6 @@ def test_kernel_mode_driver_version():
4039 assert 0 <= ver_patch [0 ] <= 99
4140
4241
43- def test_devices ():
44- devices = Device .get_all_devices ()
45- expected_num_devices = handle_return (runtime .cudaGetDeviceCount ())
46- expected_devices = tuple (Device (device_id ) for device_id in range (expected_num_devices ))
47- assert len (devices ) == len (expected_devices ), "Number of devices does not match expected value"
48- for device , expected_device in zip (devices , expected_devices ):
49- assert device .device_id == expected_device .device_id , "Device ID does not match expected value"
50-
51-
5242def test_kernel_mode_driver_version_requires_nvml ():
5343 if system .CUDA_BINDINGS_NVML_IS_COMPATIBLE :
5444 pytest .skip ("NVML is available, cannot test the error path" )
You can’t perform that action at this time.
0 commit comments