Skip to content

Commit 7be2b78

Browse files
committed
Add names of all CTK 12.8.1 x86_64-linux libraries (.so) as path_finder.SUPPORTED_LIBNAMES
https://chatgpt.com/share/67f98d0b-148c-8008-9951-9995cf5d860c
1 parent bc169d9 commit 7be2b78

File tree

3 files changed

+61
-8
lines changed

3 files changed

+61
-8
lines changed

cuda_bindings/cuda/bindings/path_finder.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,43 @@
3434
"get_nvidia_nvvm_ctk",
3535
"get_nvidia_static_cudalib_ctk",
3636
"get_system_ctk",
37+
"SUPPORTED_LIBNAMES",
3738
]
39+
40+
SUPPORTED_LIBNAMES = (
41+
# Core CUDA Runtime and Compiler
42+
"cudart",
43+
"nvfatbin",
44+
"nvJitLink",
45+
"nvrtc",
46+
"nvvm",
47+
# Math Libraries
48+
"cublas",
49+
"cufft",
50+
"curand",
51+
"cusolver",
52+
"cusparse",
53+
"nppc",
54+
"nppial",
55+
"nppicc",
56+
"nppidei",
57+
"nppif",
58+
"nppig",
59+
"nppim",
60+
"nppist",
61+
"nppisu",
62+
"nppitc",
63+
"npps",
64+
"nvblas",
65+
# Profiling and Developer Tools
66+
"cupti",
67+
"nvperf_host",
68+
"nvperf_target",
69+
"nvToolsExt",
70+
# Debugging and Introspection
71+
"accinj64",
72+
"cuinj64",
73+
"checkpoint",
74+
# Miscellaneous
75+
"OpenCL",
76+
)

cuda_bindings/tests/path_finder.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
print(f"{k}: {v}", flush=True)
77
print()
88

9-
libnames = ("nvJitLink", "nvrtc", "nvvm")
10-
11-
for libname in libnames:
12-
print(path_finder.find_nvidia_dynamic_library(libname))
13-
print()
14-
15-
for libname in libnames:
9+
for libname in path_finder.SUPPORTED_LIBNAMES:
1610
print(libname)
17-
print(path_finder.load_nvidia_dynamic_library(libname))
11+
for fun in (path_finder.find_nvidia_dynamic_library, path_finder.load_nvidia_dynamic_library):
12+
try:
13+
out = fun(libname)
14+
except Exception as e:
15+
out = f"EXCEPTION: {type(e)} {str(e)}"
16+
print(out)
1817
print()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import pytest
2+
3+
from cuda.bindings import path_finder
4+
5+
6+
@pytest.mark.parametrize("libname", path_finder.SUPPORTED_LIBNAMES)
7+
def test_find_and_load(libname):
8+
print(f"\n{libname}")
9+
for fun in (path_finder.find_nvidia_dynamic_library, path_finder.load_nvidia_dynamic_library):
10+
try:
11+
out = fun(libname)
12+
except Exception as e:
13+
out = f"EXCEPTION: {type(e)} {str(e)}"
14+
print(out)
15+
print()

0 commit comments

Comments
 (0)