Skip to content

Commit 6a93fe7

Browse files
committed
if libname == "nvshmem" and IS_WINDOWS: return None
1 parent a98de70 commit 6a93fe7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cuda_bindings/cuda/bindings/_path_finder/find_nvidia_headers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ def find_nvidia_header_directory(libname: str) -> str:
1414
if libname != "nvshmem":
1515
raise RuntimeError(f"UNKNOWN {libname=}")
1616

17-
assert not IS_WINDOWS
17+
if libname == "nvshmem" and IS_WINDOWS:
18+
# nvshmem has no Windows support.
19+
return None
1820

1921
# Installed from a wheel
2022
nvidia_sub_dirs = ("nvidia", "nvshmem", "include")

cuda_bindings/tests/test_path_finder_find_headers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ def test_find_nvidia_header_directory(info_summary_append):
1111
find_nvidia_headers.find_nvidia_header_directory("unknown-libname")
1212

1313
hdr_dir = find_nvidia_headers.find_nvidia_header_directory("nvshmem")
14+
# TODO: Find ways to test more meaningfully, and how to avoid HARD-WIRED PATHS in particular.
1415
assert hdr_dir in [
1516
# pip install nvidia-nvshmem-cu12
1617
"/home/rgrossekunst/forked/cuda-python/venvs/scratch/lib/python3.12/site-packages/nvidia/nvshmem/include",
18+
#
1719
# conda create -y -n nvshmem python=3.12
1820
# conda activate nvshmem
1921
# conda install -y conda-forge::libnvshmem3 conda-forge::libnvshmem-dev
2022
"/home/rgrossekunst/miniforge3/envs/nvshmem/include",
23+
#
2124
# sudo apt install libnvshmem3-cuda-12 libnvshmem3-dev-cuda-12
2225
"/usr/include/nvshmem_12",
26+
#
27+
# nvshmem not available
28+
None,
2329
]
2430
info_summary_append(f"{hdr_dir=!r}")

0 commit comments

Comments
 (0)