We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a1f321 commit aa1b95cCopy full SHA for aa1b95c
pycuda/driver.py
@@ -31,12 +31,17 @@ def _search_on_path(filenames):
31
32
33
def _add_cuda_libdir_to_dll_path():
34
- from os.path import dirname, join
+ from os.path import dirname, exists, join
35
36
cuda_path = os.environ.get("CUDA_PATH")
37
38
if cuda_path is not None:
39
- os.add_dll_directory(join(cuda_path, "bin"))
+ # CUDA 13.0+ use bin/x64/ as dir
40
+ lib_dir = join(cuda_path, "bin", "x64")
41
+ if exists(lib_dir):
42
+ os.add_dll_directory(lib_dir)
43
+ else:
44
+ os.add_dll_directory(join(cuda_path, "bin"))
45
return
46
47
nvcc_path = _search_on_path(["nvcc.exe"])
0 commit comments