Skip to content

Commit 38a1d6c

Browse files
committed
Update SUPPORTED_WINDOWS_DLLS in _path_finder/supported_libs.py based on DLLs found in cuda_*win*.exe files.
1 parent ec89acc commit 38a1d6c

3 files changed

Lines changed: 213 additions & 27 deletions

File tree

cuda_bindings/cuda/bindings/_path_finder/supported_libs.py

Lines changed: 123 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -184,38 +184,134 @@
184184
),
185185
}
186186

187-
# Based on https://developer.download.nvidia.com/compute/cuda/redist/
188-
# as of 2025-04-11 (redistrib_12.8.1.json was the newest .json file).
189-
# Tuples of DLLs are sorted newest-to-oldest.
187+
# Based on these released files:
188+
# cuda_11.0.3_451.82_win10.exe
189+
# cuda_11.1.1_456.81_win10.exe
190+
# cuda_11.2.2_461.33_win10.exe
191+
# cuda_11.3.1_465.89_win10.exe
192+
# cuda_11.4.4_472.50_windows.exe
193+
# cuda_11.5.1_496.13_windows.exe
194+
# cuda_11.6.2_511.65_windows.exe
195+
# cuda_11.7.1_516.94_windows.exe
196+
# cuda_11.8.0_522.06_windows.exe
197+
# cuda_12.0.1_528.33_windows.exe
198+
# cuda_12.1.1_531.14_windows.exe
199+
# cuda_12.2.2_537.13_windows.exe
200+
# cuda_12.3.2_546.12_windows.exe
201+
# cuda_12.4.1_551.78_windows.exe
202+
# cuda_12.5.1_555.85_windows.exe
203+
# cuda_12.6.2_560.94_windows.exe
204+
# cuda_12.8.1_572.61_windows.exe
205+
# Generated with toolshed/build_path_finder_dlls.py (WITH MANUAL EDITS)
190206
SUPPORTED_WINDOWS_DLLS = {
191-
"cublas": ("cublas64_12.dll", "cublas64_11.dll"),
192-
"cublasLt": ("cublasLt64_12.dll", "cublasLt64_11.dll"),
193-
"cudart": ("cudart64_12.dll", "cudart64_110.dll", "cudart32_110.dll"),
194-
"cufft": ("cufft64_11.dll", "cufft64_10.dll"),
195-
"cufftw": ("cufftw64_10.dll", "cufftw64_11.dll"),
207+
"cublas": (
208+
"cublas64_11.dll",
209+
"cublas64_12.dll",
210+
),
211+
"cublasLt": (
212+
"cublasLt64_11.dll",
213+
"cublasLt64_12.dll",
214+
),
215+
"cudart": (
216+
"cudart32_110.dll",
217+
"cudart32_65.dll",
218+
"cudart32_90.dll",
219+
"cudart64_101.dll",
220+
"cudart64_110.dll",
221+
"cudart64_12.dll",
222+
"cudart64_65.dll",
223+
),
224+
"cufft": (
225+
"cufft64_10.dll",
226+
"cufft64_11.dll",
227+
"cufftw64_10.dll",
228+
"cufftw64_11.dll",
229+
),
230+
"cufftw": (
231+
"cufftw64_10.dll",
232+
"cufftw64_11.dll",
233+
),
196234
"cufile": (),
197235
# "cufile_rdma": (),
198236
"curand": ("curand64_10.dll",),
199-
"cusolver": ("cusolver64_11.dll",),
200-
"cusolverMg": ("cusolverMg64_11.dll",),
201-
"cusparse": ("cusparse64_12.dll", "cusparse64_11.dll"),
202-
"nppc": ("nppc64_12.dll", "nppc64_11.dll"),
203-
"nppial": ("nppial64_12.dll", "nppial64_11.dll"),
204-
"nppicc": ("nppicc64_12.dll", "nppicc64_11.dll"),
205-
"nppidei": ("nppidei64_12.dll", "nppidei64_11.dll"),
206-
"nppif": ("nppif64_12.dll", "nppif64_11.dll"),
207-
"nppig": ("nppig64_12.dll", "nppig64_11.dll"),
208-
"nppim": ("nppim64_12.dll", "nppim64_11.dll"),
209-
"nppist": ("nppist64_12.dll", "nppist64_11.dll"),
210-
"nppisu": ("nppisu64_12.dll", "nppisu64_11.dll"),
211-
"nppitc": ("nppitc64_12.dll", "nppitc64_11.dll"),
212-
"npps": ("npps64_12.dll", "npps64_11.dll"),
213-
"nvblas": ("nvblas64_12.dll", "nvblas64_11.dll"),
214-
"nvfatbin": ("nvfatbin_120_0.dll",),
237+
"cusolver": (
238+
"cusolver64_10.dll",
239+
"cusolver64_11.dll",
240+
),
241+
"cusolverMg": (
242+
"cusolverMg64_10.dll",
243+
"cusolverMg64_11.dll",
244+
),
245+
"cusparse": (
246+
"cusparse64_11.dll",
247+
"cusparse64_12.dll",
248+
),
249+
"nppc": (
250+
"nppc64_11.dll",
251+
"nppc64_12.dll",
252+
),
253+
"nppial": (
254+
"nppial64_11.dll",
255+
"nppial64_12.dll",
256+
),
257+
"nppicc": (
258+
"nppicc64_11.dll",
259+
"nppicc64_12.dll",
260+
),
261+
"nppidei": (
262+
"nppidei64_11.dll",
263+
"nppidei64_12.dll",
264+
),
265+
"nppif": (
266+
"nppif64_11.dll",
267+
"nppif64_12.dll",
268+
),
269+
"nppig": (
270+
"nppig64_11.dll",
271+
"nppig64_12.dll",
272+
),
273+
"nppim": (
274+
"nppim64_11.dll",
275+
"nppim64_12.dll",
276+
),
277+
"nppist": (
278+
"nppist64_11.dll",
279+
"nppist64_12.dll",
280+
),
281+
"nppisu": (
282+
"nppisu64_11.dll",
283+
"nppisu64_12.dll",
284+
),
285+
"nppitc": (
286+
"nppitc64_11.dll",
287+
"nppitc64_12.dll",
288+
),
289+
"npps": (
290+
"npps64_11.dll",
291+
"npps64_12.dll",
292+
),
215293
"nvJitLink": ("nvJitLink_120_0.dll",),
216-
"nvjpeg": ("nvjpeg64_12.dll", "nvjpeg64_11.dll"),
217-
"nvrtc": ("nvrtc64_120_0.dll", "nvrtc64_112_0.dll"),
218-
"nvvm": ("nvvm64_40_0.dll",),
294+
"nvblas": (
295+
"nvblas64_11.dll",
296+
"nvblas64_12.dll",
297+
),
298+
"nvfatbin": ("nvfatbin_120_0.dll",),
299+
"nvjpeg": (
300+
"nvjpeg64_11.dll",
301+
"nvjpeg64_12.dll",
302+
),
303+
"nvrtc": (
304+
"nvrtc64_110_0.dll",
305+
"nvrtc64_111_0.dll",
306+
"nvrtc64_112_0.dll",
307+
"nvrtc64_120_0.dll",
308+
),
309+
"nvvm": (
310+
"nvvm32.dll",
311+
"nvvm64.dll",
312+
"nvvm64_33_0.dll",
313+
"nvvm64_40_0.dll",
314+
),
219315
}
220316

221317
# Based on nm output for Linux x86_64 /usr/local/cuda (12.8.1)

toolshed/build_path_finder_dlls.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env python3
2+
3+
# Input for this script: .txt files generated with:
4+
# for exe in *.exe; do 7z l $exe > "${exe%.exe}.txt"; done
5+
6+
# The output of this script
7+
# requires obvious manual edits to remove duplicates and unwanted dlls.
8+
9+
import sys
10+
11+
LIBNAMES_IN_SCOPE_OF_CUDA_BINDINGS_PATH_FINDER = (
12+
"nvJitLink",
13+
"nvrtc",
14+
"nvvm",
15+
"cudart",
16+
"nvfatbin",
17+
"cublas",
18+
"cublasLt",
19+
"cufft",
20+
"cufftw",
21+
"curand",
22+
"cusolver",
23+
"cusolverMg",
24+
"cusparse",
25+
"nppc",
26+
"nppial",
27+
"nppicc",
28+
"nppidei",
29+
"nppif",
30+
"nppig",
31+
"nppim",
32+
"nppist",
33+
"nppisu",
34+
"nppitc",
35+
"npps",
36+
"nvblas",
37+
"cufile",
38+
"cufile_rdma",
39+
"nvjpeg",
40+
)
41+
42+
43+
def run(args):
44+
dlls_from_files = set()
45+
for filename in args:
46+
lines_iter = iter(open(filename).read().splitlines())
47+
for line in lines_iter:
48+
if line.startswith("-------------------"):
49+
break
50+
else:
51+
raise RuntimeError("------------------- NOT FOUND")
52+
for line in lines_iter:
53+
if line.startswith("-------------------"):
54+
break
55+
assert line[52] == " ", line
56+
assert line[53] != " ", line
57+
path = line[53:]
58+
if path.endswith(".dll"):
59+
dll = path.rsplit("/", 1)[1]
60+
dlls_from_files.add(dll)
61+
else:
62+
raise RuntimeError("------------------- NOT FOUND")
63+
64+
print("DLLs in scope of cuda.bindings.path_finder")
65+
print("==========================================")
66+
dlls_in_scope = set()
67+
for libname in sorted(LIBNAMES_IN_SCOPE_OF_CUDA_BINDINGS_PATH_FINDER):
68+
print(f'"{libname}": (')
69+
for dll in sorted(dlls_from_files):
70+
if dll.startswith(libname):
71+
dlls_in_scope.add(dll)
72+
print(f' "{dll}",')
73+
print("),")
74+
print()
75+
76+
print("DLLs out of scope")
77+
print("=================")
78+
for dll in sorted(dlls_from_files - dlls_in_scope):
79+
print(dll)
80+
print()
81+
82+
83+
if __name__ == "__main__":
84+
run(args=sys.argv[1:])

toolshed/build_path_finder_sonames.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/usr/bin/env python3
22

3+
# Input for this script:
4+
# output of toolshed/find_sonames.sh
5+
6+
# The output of this script
7+
# is expected to be usable as-is.
8+
39
import sys
410

511
LIBNAMES_IN_SCOPE_OF_CUDA_BINDINGS_PATH_FINDER = (

0 commit comments

Comments
 (0)