Skip to content

Commit ff819a6

Browse files
committed
test(cuda.core): gate register() IPC guard test on mempool support
test_register_rejects_non_ipc_memory_resource constructed a DeviceMemoryResource from a bare Device(), which raises CUDA_ERROR_NOT_SUPPORTED on devices without memory pool support. Every win-64 TCC job in CI failed there before reaching the assertion under test. Take the mempool_device fixture instead, matching how the other mempool-dependent tests are gated. The fixture skips when memory_pools_supported is false and already makes the device current, so the manual Device()/set_current() pair is dropped.
1 parent ecb4ecf commit ff819a6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cuda_core/tests/memory_ipc/test_errors.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ def test_ipc_allocation_handle_rejects_negative_fd():
5353

5454

5555
@pytest.mark.human_authored
56-
def test_register_rejects_non_ipc_memory_resource():
56+
def test_register_rejects_non_ipc_memory_resource(mempool_device):
5757
"""register() on a resource without IPC enabled raises instead of dereferencing None."""
58-
device = Device()
59-
device.set_current()
60-
mr = DeviceMemoryResource(device)
58+
mr = DeviceMemoryResource(mempool_device)
6159
assert not mr.is_ipc_enabled
6260

6361
key = uuid.uuid4()

0 commit comments

Comments
 (0)