From 7f98d0acf66b9f11da7049914d24291a38387624 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 15 May 2026 16:57:00 -0700 Subject: [PATCH] test: xfail pinned NUMA mempool constructor OOM Route pinned NUMA-ID constructor tests through the existing Windows MCDM mempool OOM helper so they stay focused on NUMA semantics instead of failing on the known constructor flake. --- cuda_core/tests/test_memory.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cuda_core/tests/test_memory.py b/cuda_core/tests/test_memory.py index 579c2c52775..13519522d64 100644 --- a/cuda_core/tests/test_memory.py +++ b/cuda_core/tests/test_memory.py @@ -1474,11 +1474,11 @@ def test_pinned_mr_numa_id_default_no_ipc(init_cuda): device = Device() skip_if_pinned_memory_unsupported(device) - mr = PinnedMemoryResource(PinnedMemoryResourceOptions()) + mr = create_pinned_memory_resource_or_xfail(PinnedMemoryResourceOptions(), xfail_device=device) assert mr.numa_id == -1 mr.close() - mr = PinnedMemoryResource(PinnedMemoryResourceOptions(ipc_enabled=False)) + mr = create_pinned_memory_resource_or_xfail(PinnedMemoryResourceOptions(ipc_enabled=False), xfail_device=device) assert mr.numa_id == -1 mr.close() @@ -1497,7 +1497,9 @@ def test_pinned_mr_numa_id_default_with_ipc(init_cuda): if expected_numa_id < 0: pytest.skip("System does not support NUMA") - mr = PinnedMemoryResource(PinnedMemoryResourceOptions(ipc_enabled=True, max_size=POOL_SIZE)) + mr = create_pinned_memory_resource_or_xfail( + PinnedMemoryResourceOptions(ipc_enabled=True, max_size=POOL_SIZE), xfail_device=device + ) assert mr.numa_id == expected_numa_id mr.close() @@ -1511,7 +1513,7 @@ def test_pinned_mr_numa_id_explicit(init_cuda): if host_numa_id < 0: pytest.skip("System does not support NUMA") - mr = PinnedMemoryResource(PinnedMemoryResourceOptions(numa_id=host_numa_id)) + mr = create_pinned_memory_resource_or_xfail(PinnedMemoryResourceOptions(numa_id=host_numa_id), xfail_device=device) assert mr.numa_id == host_numa_id mr.close() @@ -1520,7 +1522,10 @@ def test_pinned_mr_numa_id_explicit(init_cuda): if not supports_ipc_mempool(device): pytest.skip("Driver rejects IPC-enabled mempool creation on this platform") - mr = PinnedMemoryResource(PinnedMemoryResourceOptions(ipc_enabled=True, numa_id=host_numa_id, max_size=POOL_SIZE)) + mr = create_pinned_memory_resource_or_xfail( + PinnedMemoryResourceOptions(ipc_enabled=True, numa_id=host_numa_id, max_size=POOL_SIZE), + xfail_device=device, + ) assert mr.numa_id == host_numa_id mr.close()