Skip to content
Open
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
16 changes: 15 additions & 1 deletion cuda_core/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

import multiprocessing
Expand Down Expand Up @@ -286,6 +286,20 @@ def mempool_device_x3():
return _mempool_device_impl(3)


@pytest.fixture
def ipc_mempool_device_x2(mempool_device_x2):
"""Fixture that provides two IPC-capable mempool devices, or skips."""
from helpers import IS_WSL, supports_ipc_mempool

if not all(device.properties.handle_type_posix_file_descriptor_supported for device in mempool_device_x2):
pytest.skip("Device does not support IPC")

if IS_WSL or not all(supports_ipc_mempool(device) for device in mempool_device_x2):
pytest.skip("Driver rejects IPC-enabled mempool creation on this platform")

return mempool_device_x2


@pytest.fixture(
params=[
pytest.param((DeviceMemoryResource, DeviceMemoryResourceOptions), id="DeviceMR"),
Expand Down
8 changes: 4 additions & 4 deletions cuda_core/tests/memory_ipc/test_peer_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class TestPeerAccessNotPreservedOnImport:
"""

@pytest.mark.flaky(reruns=2)
def test_main(self, mempool_device_x2):
dev0, dev1 = mempool_device_x2
def test_main(self, ipc_mempool_device_x2):
dev0, dev1 = ipc_mempool_device_x2

# Parent Process - Create and Configure MR
dev1.set_current()
Expand Down Expand Up @@ -61,8 +61,8 @@ class TestBufferPeerAccessAfterImport:

@pytest.mark.flaky(reruns=2)
@pytest.mark.parametrize("grant_access_in_parent", [True, False])
def test_main(self, mempool_device_x2, grant_access_in_parent):
dev0, dev1 = mempool_device_x2
def test_main(self, ipc_mempool_device_x2, grant_access_in_parent):
dev0, dev1 = ipc_mempool_device_x2

# Parent Process - Create MR and Buffer
dev1.set_current()
Expand Down
Loading