Skip to content

Commit a649e7d

Browse files
committed
Update EXPECTED_LIB_SYMBOLS for nvJitLink to cleanly support CTK versions 12.0, 12.1, 12.2
1 parent 211164d commit a649e7d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

cuda_bindings/cuda/bindings/_path_finder/supported_libs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ def is_suppressed_dll_file(path_basename: str) -> bool:
353353

354354
# Based on nm output for Linux x86_64 /usr/local/cuda (12.8.1)
355355
EXPECTED_LIB_SYMBOLS = {
356-
"nvJitLink": ("nvJitLinkVersion",),
356+
"nvJitLink": (
357+
"__nvJitLinkCreate_12_0", # 12.0 through 12.8 (at least)
358+
"nvJitLinkVersion", # 12.3 and up
359+
),
357360
"nvrtc": ("nvrtcVersion",),
358361
"nvvm": ("nvvmVersion",),
359362
"cudart": ("cudaRuntimeGetVersion",),

cuda_bindings/tests/test_path_finder.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ def test_all_libnames_expected_lib_symbols_consistency():
3535
assert tuple(sorted(ALL_LIBNAMES)) == tuple(sorted(supported_libs.EXPECTED_LIB_SYMBOLS.keys()))
3636

3737

38-
def _check_nvjitlink_usable():
39-
from cuda.bindings._internal import nvjitlink as inner_nvjitlink
40-
41-
return inner_nvjitlink._inspect_function_pointer("__nvJitLinkVersion") != 0
42-
43-
4438
def _build_subprocess_failed_for_libname_message(libname, result):
4539
return (
4640
f"Subprocess failed for {libname=!r} with exit code {result.returncode}\n"
@@ -52,9 +46,6 @@ def _build_subprocess_failed_for_libname_message(libname, result):
5246
@pytest.mark.parametrize("api", ("find", "load"))
5347
@pytest.mark.parametrize("libname", TEST_FIND_OR_LOAD_LIBNAMES)
5448
def test_find_or_load_nvidia_dynamic_library(info_summary_append, api, libname):
55-
if libname == "nvJitLink" and not _check_nvjitlink_usable():
56-
pytest.skip(f"{libname=!r} not usable")
57-
5849
if api == "find":
5950
code = f"""\
6051
from cuda.bindings._path_finder.find_nvidia_dynamic_library import find_nvidia_dynamic_library

0 commit comments

Comments
 (0)