Skip to content

Commit e209238

Browse files
authored
path_finder and cybind updates for CTK 13.0 (NVIDIA#81)
* Update SUPPORTED_WINDOWS_DLLS: kitpicks/cuda-r13-0/13.0.0/013/local_installers/cuda_13.0.0_windows.exe * Update SUPPORTED_LINUX_SONAMES: kitpicks/cuda-r13-0/13.0.0/013/local_installers/cuda_13.0.0_580.31_linux.run * 013 → 014: SUPPORTED_LINUX_SONAMES unchanged * 013 → 014: SUPPORTED_WINDOWS_DLLS unchanged * cybind update with 13.0.0 headers (014) * Bump cuda/bindings/_version.py → 13.0.0 * test_nvjitlink.py: remove sm_60, add sm_100 * Updates from cybind after removing all 11.x headers (affects "automatically generated" comments only). * Add new toolshed/reformat_cuda_enums_as_py.py (reads cuda.h, driver_types.h headers directly). * Use new toolshed/reformat_cuda_enums_as_py.py to regenerate driver_cu_result_explanations.py, runtime_cuda_error_explanations.py * Use `driver.cuDeviceGetUuid()` instead of `driver.cuDeviceGetUuid_v2()` with CTK 13. * Adjustments for locating nvvm directory in CTK 13 installations.
1 parent 47622f3 commit e209238

23 files changed

Lines changed: 788 additions & 576 deletions

‎cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.0.1 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from ..cynvjitlink cimport *
88

‎cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.0.1 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t, uintptr_t
88

‎cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.0.1 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t
88

‎cuda_bindings/cuda/bindings/_internal/nvvm.pxd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 11.0.3 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from ..cynvvm cimport *
88

‎cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 11.0.3 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t, uintptr_t
88

‎cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 11.0.3 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t
88

‎cuda_bindings/cuda/bindings/_path_finder/find_nvidia_dynamic_library.py‎

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import glob
66
import os
77

8-
from cuda.bindings._path_finder.find_sub_dirs import find_sub_dirs_all_sitepackages
8+
from cuda.bindings._path_finder.find_sub_dirs import find_sub_dirs, find_sub_dirs_all_sitepackages
99
from cuda.bindings._path_finder.supported_libs import IS_WINDOWS, is_suppressed_dll_file
1010

1111

@@ -44,11 +44,14 @@ def _find_dll_under_dir(dirpath, file_wild):
4444

4545

4646
def _find_dll_using_nvidia_bin_dirs(libname, lib_searched_for, error_messages, attachments):
47-
nvidia_sub_dirs = ("nvidia", "*", "nvvm", "bin") if libname == "nvvm" else ("nvidia", "*", "bin")
48-
for bin_dir in find_sub_dirs_all_sitepackages(nvidia_sub_dirs):
49-
dll_name = _find_dll_under_dir(bin_dir, lib_searched_for)
50-
if dll_name is not None:
51-
return dll_name
47+
nvidia_sub_dirs_list = [("nvidia", "*", "bin")]
48+
if libname == "nvvm":
49+
nvidia_sub_dirs_list.append(("nvidia", "*", "nvvm", "bin")) # Only for CTK 12
50+
for nvidia_sub_dirs in nvidia_sub_dirs_list:
51+
for bin_dir in find_sub_dirs_all_sitepackages(nvidia_sub_dirs):
52+
dll_name = _find_dll_under_dir(bin_dir, lib_searched_for)
53+
if dll_name is not None:
54+
return dll_name
5255
_no_such_file_in_sub_dirs(nvidia_sub_dirs, lib_searched_for, error_messages, attachments)
5356
return None
5457

@@ -65,19 +68,23 @@ def _find_lib_dir_using_cuda_home(libname):
6568
if cuda_home is None:
6669
return None
6770
if IS_WINDOWS:
68-
subdirs = (os.path.join("nvvm", "bin"),) if libname == "nvvm" else ("bin",)
71+
if libname == "nvvm": # noqa: SIM108
72+
subdirs_list = (
73+
("nvvm", "bin", "*"), # CTK 13
74+
("nvvm", "bin"), # CTK 12
75+
)
76+
else:
77+
subdirs_list = (("bin",),)
6978
else:
70-
subdirs = (
71-
(os.path.join("nvvm", "lib64"),)
72-
if libname == "nvvm"
73-
else (
74-
"lib64", # CTK
75-
"lib", # Conda
79+
if libname == "nvvm": # noqa: SIM108
80+
subdirs_list = (("nvvm", "lib64"),)
81+
else:
82+
subdirs_list = (
83+
("lib64",), # CTK
84+
("lib",), # Conda
7685
)
77-
)
78-
for subdir in subdirs:
79-
dirname = os.path.join(cuda_home, subdir)
80-
if os.path.isdir(dirname):
86+
for sub_dirs in subdirs_list:
87+
for dirname in find_sub_dirs((cuda_home,), sub_dirs):
8188
return dirname
8289
return None
8390

‎cuda_bindings/cuda/bindings/_path_finder/supported_libs.py‎

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@
112112
# cuda_12.6.2_560.35.03_linux.run
113113
# cuda_12.8.0_570.86.10_linux.run
114114
# cuda_12.9.0_575.51.03_linux.run
115+
# 014
116+
# TODO: Update from posted .run files before merging into public main.
115117
# Generated with toolshed/build_path_finder_sonames.py
116118
SUPPORTED_LINUX_SONAMES = {
117119
"cublas": (
@@ -125,14 +127,17 @@
125127
"cudart": (
126128
"libcudart.so.11.0",
127129
"libcudart.so.12",
130+
"libcudart.so.13",
128131
),
129132
"cufft": (
130133
"libcufft.so.10",
131134
"libcufft.so.11",
135+
"libcufft.so.12",
132136
),
133137
"cufftw": (
134138
"libcufftw.so.10",
135139
"libcufftw.so.11",
140+
"libcufftw.so.12",
136141
),
137142
"cufile": ("libcufile.so.0",),
138143
# "cufile_rdma": ("libcufile_rdma.so.1",),
@@ -152,62 +157,81 @@
152157
"nppc": (
153158
"libnppc.so.11",
154159
"libnppc.so.12",
160+
"libnppc.so.13",
155161
),
156162
"nppial": (
157163
"libnppial.so.11",
158164
"libnppial.so.12",
165+
"libnppial.so.13",
159166
),
160167
"nppicc": (
161168
"libnppicc.so.11",
162169
"libnppicc.so.12",
170+
"libnppicc.so.13",
163171
),
164172
"nppidei": (
165173
"libnppidei.so.11",
166174
"libnppidei.so.12",
175+
"libnppidei.so.13",
167176
),
168177
"nppif": (
169178
"libnppif.so.11",
170179
"libnppif.so.12",
180+
"libnppif.so.13",
171181
),
172182
"nppig": (
173183
"libnppig.so.11",
174184
"libnppig.so.12",
185+
"libnppig.so.13",
175186
),
176187
"nppim": (
177188
"libnppim.so.11",
178189
"libnppim.so.12",
190+
"libnppim.so.13",
179191
),
180192
"nppist": (
181193
"libnppist.so.11",
182194
"libnppist.so.12",
195+
"libnppist.so.13",
183196
),
184197
"nppisu": (
185198
"libnppisu.so.11",
186199
"libnppisu.so.12",
200+
"libnppisu.so.13",
187201
),
188202
"nppitc": (
189203
"libnppitc.so.11",
190204
"libnppitc.so.12",
205+
"libnppitc.so.13",
191206
),
192207
"npps": (
193208
"libnpps.so.11",
194209
"libnpps.so.12",
210+
"libnpps.so.13",
211+
),
212+
"nvJitLink": (
213+
"libnvJitLink.so.12",
214+
"libnvJitLink.so.13",
195215
),
196-
"nvJitLink": ("libnvJitLink.so.12",),
197216
"nvblas": (
198217
"libnvblas.so.11",
199218
"libnvblas.so.12",
200219
),
201-
"nvfatbin": ("libnvfatbin.so.12",),
220+
"nvfatbin": (
221+
"libnvfatbin.so.12",
222+
"libnvfatbin.so.13",
223+
),
202224
"nvjpeg": (
203225
"libnvjpeg.so.11",
204226
"libnvjpeg.so.12",
227+
"libnvjpeg.so.13",
205228
),
206229
"nvrtc": (
207230
"libnvrtc.so.11.0",
208231
"libnvrtc.so.11.1",
209232
"libnvrtc.so.11.2",
210233
"libnvrtc.so.12",
234+
"libnvrtc.so.13",
211235
),
212236
"nvvm": (
213237
"libnvvm.so.3",
@@ -234,6 +258,8 @@
234258
# cuda_12.6.2_560.94_windows.exe
235259
# cuda_12.8.1_572.61_windows.exe
236260
# cuda_12.9.0_576.02_windows.txt
261+
# 014
262+
# TODO: Update from posted .run files before merging into public main.
237263
# Generated with toolshed/build_path_finder_dlls.py (WITH MANUAL EDITS)
238264
SUPPORTED_WINDOWS_DLLS = {
239265
"cublas": (
@@ -251,15 +277,18 @@
251277
"cudart64_101.dll",
252278
"cudart64_110.dll",
253279
"cudart64_12.dll",
280+
"cudart64_13.dll",
254281
"cudart64_65.dll",
255282
),
256283
"cufft": (
257284
"cufft64_10.dll",
258285
"cufft64_11.dll",
286+
"cufft64_12.dll",
259287
),
260288
"cufftw": (
261289
"cufftw64_10.dll",
262290
"cufftw64_11.dll",
291+
"cufftw64_12.dll",
263292
),
264293
"curand": ("curand64_10.dll",),
265294
"cusolver": (
@@ -277,62 +306,83 @@
277306
"nppc": (
278307
"nppc64_11.dll",
279308
"nppc64_12.dll",
309+
"nppc64_13.dll",
280310
),
281311
"nppial": (
282312
"nppial64_11.dll",
283313
"nppial64_12.dll",
314+
"nppial64_13.dll",
284315
),
285316
"nppicc": (
286317
"nppicc64_11.dll",
287318
"nppicc64_12.dll",
319+
"nppicc64_13.dll",
288320
),
289321
"nppidei": (
290322
"nppidei64_11.dll",
291323
"nppidei64_12.dll",
324+
"nppidei64_13.dll",
292325
),
293326
"nppif": (
294327
"nppif64_11.dll",
295328
"nppif64_12.dll",
329+
"nppif64_13.dll",
296330
),
297331
"nppig": (
298332
"nppig64_11.dll",
299333
"nppig64_12.dll",
334+
"nppig64_13.dll",
300335
),
301336
"nppim": (
302337
"nppim64_11.dll",
303338
"nppim64_12.dll",
339+
"nppim64_13.dll",
304340
),
305341
"nppist": (
306342
"nppist64_11.dll",
307343
"nppist64_12.dll",
344+
"nppist64_13.dll",
308345
),
309346
"nppisu": (
310347
"nppisu64_11.dll",
311348
"nppisu64_12.dll",
349+
"nppisu64_13.dll",
312350
),
313351
"nppitc": (
314352
"nppitc64_11.dll",
315353
"nppitc64_12.dll",
354+
"nppitc64_13.dll",
316355
),
317356
"npps": (
318357
"npps64_11.dll",
319358
"npps64_12.dll",
359+
"npps64_13.dll",
360+
),
361+
"nvJitLink": (
362+
"nvJitLink_120_0.dll",
363+
"nvJitLink_130_0.dll",
320364
),
321-
"nvJitLink": ("nvJitLink_120_0.dll",),
322365
"nvblas": (
323366
"nvblas64_11.dll",
324367
"nvblas64_12.dll",
325368
),
326-
"nvfatbin": ("nvfatbin_120_0.dll",),
369+
"nvfatbin": (
370+
"nvfatbin_120_0.dll",
371+
"nvfatbin_130_0.dll",
372+
),
327373
"nvjpeg": (
328374
"nvjpeg64_11.dll",
329375
"nvjpeg64_12.dll",
376+
"nvjpeg64_13.dll",
330377
),
331378
"nvrtc": (
332379
"nvrtc64_110_0.dll",
333380
"nvrtc64_111_0.dll",
334381
"nvrtc64_112_0.dll",
382+
"nvrtc64_120_0.alt.dll",
335383
"nvrtc64_120_0.dll",
384+
"nvrtc64_130_0.alt.dll",
385+
"nvrtc64_130_0.dll",
336386
),
337387
"nvvm": (
338388
"nvvm32.dll",

‎cuda_bindings/cuda/bindings/cynvjitlink.pxd‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.0.1 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t, uint32_t
88

@@ -23,6 +23,15 @@ ctypedef enum nvJitLinkResult "nvJitLinkResult":
2323
NVJITLINK_ERROR_THREADPOOL "NVJITLINK_ERROR_THREADPOOL"
2424
NVJITLINK_ERROR_UNRECOGNIZED_INPUT "NVJITLINK_ERROR_UNRECOGNIZED_INPUT"
2525
NVJITLINK_ERROR_FINALIZE "NVJITLINK_ERROR_FINALIZE"
26+
NVJITLINK_ERROR_NULL_INPUT "NVJITLINK_ERROR_NULL_INPUT"
27+
NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS "NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS"
28+
NVJITLINK_ERROR_INCORRECT_INPUT_TYPE "NVJITLINK_ERROR_INCORRECT_INPUT_TYPE"
29+
NVJITLINK_ERROR_ARCH_MISMATCH "NVJITLINK_ERROR_ARCH_MISMATCH"
30+
NVJITLINK_ERROR_OUTDATED_LIBRARY "NVJITLINK_ERROR_OUTDATED_LIBRARY"
31+
NVJITLINK_ERROR_MISSING_FATBIN "NVJITLINK_ERROR_MISSING_FATBIN"
32+
NVJITLINK_ERROR_UNRECOGNIZED_ARCH "NVJITLINK_ERROR_UNRECOGNIZED_ARCH"
33+
NVJITLINK_ERROR_UNSUPPORTED_ARCH "NVJITLINK_ERROR_UNSUPPORTED_ARCH"
34+
NVJITLINK_ERROR_LTO_NOT_ENABLED "NVJITLINK_ERROR_LTO_NOT_ENABLED"
2635
_NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42
2736

2837
ctypedef enum nvJitLinkInputType "nvJitLinkInputType":

‎cuda_bindings/cuda/bindings/cynvjitlink.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44
#
5-
# This code was automatically generated across versions from 12.0.1 to 12.9.0. Do not modify it directly.
5+
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from ._internal cimport nvjitlink as _nvjitlink
88

0 commit comments

Comments
 (0)