Skip to content

Commit 1476822

Browse files
authored
[FEA]: Add support for pathfinder.find_bitcode_lib("nvshmem_device") (#1828)
* Add support for find_bitcode_lib("nvshmem_device") (site-packages, Conda) x (cu12, cu13) * Exclude Windows-unavailable bitcode libs from SUPPORTED_BITCODE_LIBS nvshmem wheels are not published for Windows, so the nvshmem_device entry must be filtered out on that platform. This adds an `available_on_windows` key to _BitcodeLibInfo and uses it to build SUPPORTED_BITCODE_LIBS, which controls test parametrization. Made-with: Cursor
1 parent 900cd2e commit 1476822

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cuda_pathfinder/cuda/pathfinder/_static_libs/find_bitcode_lib.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class _BitcodeLibInfo(TypedDict):
2929
filename: str
3030
rel_path: str
3131
site_packages_dirs: tuple[str, ...]
32+
available_on_windows: bool
3233

3334

3435
_SUPPORTED_BITCODE_LIBS_INFO: dict[str, _BitcodeLibInfo] = {
@@ -39,11 +40,22 @@ class _BitcodeLibInfo(TypedDict):
3940
"nvidia/cu13/nvvm/libdevice",
4041
"nvidia/cuda_nvcc/nvvm/libdevice",
4142
),
43+
"available_on_windows": True,
44+
},
45+
"nvshmem_device": {
46+
"filename": "libnvshmem_device.bc",
47+
"rel_path": "lib",
48+
"site_packages_dirs": ("nvidia/nvshmem/lib",),
49+
"available_on_windows": False,
4250
},
4351
}
4452

4553
# Public API: just the supported library names
46-
SUPPORTED_BITCODE_LIBS: tuple[str, ...] = tuple(sorted(_SUPPORTED_BITCODE_LIBS_INFO.keys()))
54+
SUPPORTED_BITCODE_LIBS: tuple[str, ...] = tuple(
55+
sorted(
56+
name for name, info in _SUPPORTED_BITCODE_LIBS_INFO.items() if not IS_WINDOWS or info["available_on_windows"]
57+
)
58+
)
4759

4860

4961
def _no_such_file_in_dir(dir_path: str, filename: str, error_messages: list[str], attachments: list[str]) -> None:

0 commit comments

Comments
 (0)