From df05b17f5a6e33daa1f2ca0ddc9760b64bfa30dd Mon Sep 17 00:00:00 2001 From: Ralf Juengling Date: Mon, 23 Nov 2026 13:56:42 -0800 Subject: [PATCH] test(cuda.core): do not require a wrong-class pool import to succeed without the location query (#3540) The fallback test for drivers before 13.2 imported the pool with the other class and expected success. Without the pool kind check, a pinned import of a device pool grants every device access to a pool that lives on one GPU, which needs peer access and fails with CUDA_ERROR_PEER_ACCESS_UNSUPPORTED on dual-GPU machines without it. The test now checks only that importing with the exporter's class works without the location query. --- cuda_core/tests/memory_ipc/test_ipc_pool_kind.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cuda_core/tests/memory_ipc/test_ipc_pool_kind.py b/cuda_core/tests/memory_ipc/test_ipc_pool_kind.py index f86a833474c2..333453dcc2e5 100644 --- a/cuda_core/tests/memory_ipc/test_ipc_pool_kind.py +++ b/cuda_core/tests/memory_ipc/test_ipc_pool_kind.py @@ -158,12 +158,11 @@ def child_import_without_location_query(mr_type, alloc_handle, descriptor): device.set_current() stream = device.default_stream - # The pool's kind is not checked, so the other class's import succeeds, as - # it did before #3502 was fixed. - with assert_no_cuda_warning(): - other = import_pool_resource(_other_class(mr_type), device, int(alloc_handle)) - other.close() - + # Importing with the exporter's class must not need the location query. A + # wrong-class import is not tested here: without the pool kind check it + # runs the other class's initialization on the wrong kind of pool, which + # can fail on some topologies (a pinned import of a device pool grants + # every device access, which needs peer access; #3540). mr = import_pool_resource(mr_type, device, int(alloc_handle)) if mr_type is PinnedMemoryResource: # Without the location query the pool's node is unknown (see numa_id). @@ -212,7 +211,7 @@ def test_matching_import_works(self, pool_resource, exported_buffer): class TestIpcPoolImportWithoutLocationQuery(_IpcPoolFixtures): - """With a driver before 13.2, imports skip the pool kind check and behave as before.""" + """With a driver before 13.2, importing with the exporter's class works without the pool kind check.""" @pytest.mark.agent_authored(model="claude-opus-5-5") def test_import_without_location_query(self, pool_resource, exported_buffer):