Skip to content

Commit bbe82c8

Browse files
committed
do not require cuda_python_test_helpers to be pre-installed for now
1 parent d8b0a46 commit bbe82c8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

cuda_core/tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ def ipc_device():
8787
pytest.skip("Device does not support IPC")
8888

8989
# Skip on WSL or if driver rejects IPC-enabled mempool creation on this platform/device
90-
from cuda_python_test_helpers import IS_WSL, supports_ipc_mempool
91-
92-
if IS_WSL or not supports_ipc_mempool(device):
90+
if helpers.IS_WSL or not helpers.supports_ipc_mempool(device):
9391
pytest.skip("Driver rejects IPC-enabled mempool creation on this platform")
9492

9593
return device

cuda_core/tests/helpers.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
import os
5+
import pathlib
6+
import sys
57

68
CUDA_PATH = os.environ.get("CUDA_PATH")
79
CUDA_INCLUDE_PATH = None
@@ -14,3 +16,18 @@
1416
path = os.path.join(path, "cccl")
1517
if os.path.isdir(path):
1618
CCCL_INCLUDE_PATHS = (path,) + CCCL_INCLUDE_PATHS
19+
20+
21+
try:
22+
import cuda_python_test_helpers
23+
except ImportError:
24+
# Import shared platform helpers for tests across repos
25+
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2] / "cuda_python_test_helpers"))
26+
import cuda_python_test_helpers
27+
28+
29+
IS_WSL = cuda_python_test_helpers.IS_WSL
30+
supports_ipc_mempool = cuda_python_test_helpers.supports_ipc_mempool
31+
32+
33+
del cuda_python_test_helpers

0 commit comments

Comments
 (0)