Skip to content

Commit edc5b33

Browse files
committed
Merge branch 'path_finder_search_priority_v2' into path_finder_search_priority_v2_use_in_bindings
2 parents a309dd4 + ddea021 commit edc5b33

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cuda_bindings/cuda/bindings/_path_finder/load_dl_windows.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def add_dll_directory(dll_abs_path: str) -> None:
3535
os.environ["PATH"] = dirpath if curr_path is None else os.pathsep.join((curr_path, dirpath))
3636

3737

38-
def abs_path_for_dynamic_library(handle: int) -> str:
38+
def abs_path_for_dynamic_library(libname: str, handle: int) -> str:
3939
"""Get the absolute path of a loaded dynamic library on Windows.
4040
4141
Args:
@@ -57,7 +57,8 @@ def abs_path_for_dynamic_library(handle: int) -> str:
5757

5858
if n_chars == 0:
5959
raise OSError(
60-
"GetModuleFileNameW failed. Long paths may require enabling the "
60+
f"GetModuleFileNameW failed ({libname=!r}, {buf_size=}). "
61+
"Long paths may require enabling the "
6162
"Windows 10+ long path registry setting. See: "
6263
"https://docs.python.org/3/using/windows.html#removing-the-max-path-limitation"
6364
)
@@ -99,7 +100,7 @@ def check_if_already_loaded_from_elsewhere(libname: str) -> Optional[LoadedDL]:
99100
except pywintypes.error:
100101
continue
101102
else:
102-
return LoadedDL(handle, abs_path_for_dynamic_library(handle), True)
103+
return LoadedDL(handle, abs_path_for_dynamic_library(libname, handle), True)
103104
return None
104105

105106

@@ -118,7 +119,7 @@ def load_with_system_search(libname: str, _unused: str) -> Optional[LoadedDL]:
118119
for dll_name in SUPPORTED_WINDOWS_DLLS.get(libname, ()):
119120
handle = ctypes.windll.kernel32.LoadLibraryW(ctypes.c_wchar_p(dll_name))
120121
if handle:
121-
return LoadedDL(handle, abs_path_for_dynamic_library(handle), False)
122+
return LoadedDL(handle, abs_path_for_dynamic_library(libname, handle), False)
122123

123124
return None
124125

cuda_bindings/cuda/bindings/_path_finder/supported_libs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
# cuda_12.5.1_555.42.06_linux.run
112112
# cuda_12.6.2_560.35.03_linux.run
113113
# cuda_12.8.0_570.86.10_linux.run
114+
# cuda_12.9.0_575.51.03_linux.run
114115
# Generated with toolshed/build_path_finder_sonames.py
115116
SUPPORTED_LINUX_SONAMES = {
116117
"cublas": (
@@ -232,6 +233,7 @@
232233
# cuda_12.5.1_555.85_windows.exe
233234
# cuda_12.6.2_560.94_windows.exe
234235
# cuda_12.8.1_572.61_windows.exe
236+
# cuda_12.9.0_576.02_windows.txt
235237
# Generated with toolshed/build_path_finder_dlls.py (WITH MANUAL EDITS)
236238
SUPPORTED_WINDOWS_DLLS = {
237239
"cublas": (
@@ -339,6 +341,7 @@
339341
"nvvm64.dll",
340342
"nvvm64_33_0.dll",
341343
"nvvm64_40_0.dll",
344+
"nvvm70.dll",
342345
),
343346
}
344347

0 commit comments

Comments
 (0)