Skip to content

Commit 43abec8

Browse files
committed
Somewhat ad hoc heuristics for nvidia_cuda_nvrtc wheels.
1 parent 14c72cc commit 43abec8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cuda_bindings/cuda/bindings/_path_finder/find_nvidia_dynamic_library.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def _find_so_using_nvidia_lib_dirs(libname, so_basename, error_messages, attachm
3232
# Look for a versioned library
3333
# Using sort here mainly to make the result deterministic.
3434
for node in sorted(glob.glob(os.path.join(lib_dir, file_wild))):
35+
if ".alt.so." in node or "-builtins" in node:
36+
continue
3537
so_name = os.path.join(lib_dir, node)
3638
if os.path.isfile(so_name):
3739
return so_name
@@ -47,6 +49,8 @@ def _find_dll_using_nvidia_bin_dirs(libname, error_messages, attachments):
4749
file_wild = libname + "*.dll"
4850
for bin_dir in sys_path_find_sub_dirs(nvidia_sub_dirs):
4951
for node in sorted(glob.glob(os.path.join(bin_dir, file_wild))):
52+
if node.endswith(".alt.dll") or "-builtins" in node:
53+
continue
5054
dll_name = os.path.join(bin_dir, node)
5155
if os.path.isfile(dll_name):
5256
return dll_name

0 commit comments

Comments
 (0)