File tree 1 file changed +11
-5
lines changed
cuda_bindings/cuda/bindings/_bindings
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -45,23 +45,29 @@ cdef int cuPythonInit() except -1 nogil:
45
45
with gil:
46
46
# First check if the DLL has been loaded by 3rd parties
47
47
try:
48
- handle = win32api.LoadLibraryEx ("nvrtc64_112_0.dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS )
48
+ handle = win32api.GetModuleHandle ("nvrtc64_112_0.dll")
49
49
except:
50
50
try:
51
- handle = win32api.LoadLibraryEx ("nvrtc64_111_0.dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS )
51
+ handle = win32api.GetModuleHandle ("nvrtc64_111_0.dll")
52
52
except:
53
53
try:
54
- handle = win32api.LoadLibraryEx ("nvrtc64_110_0.dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS )
54
+ handle = win32api.GetModuleHandle ("nvrtc64_110_0.dll")
55
55
except:
56
56
handle = None
57
57
58
58
# Else try default search
59
59
if not handle:
60
60
LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x00002000
61
61
try:
62
- handle = win32api.LoadLibraryEx("nvrtc64_120_0 .dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS)
62
+ handle = win32api.LoadLibraryEx("nvrtc64_112_0 .dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS)
63
63
except:
64
- pass
64
+ try:
65
+ handle = win32api.LoadLibraryEx("nvrtc64_111_0.dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS)
66
+ except:
67
+ try:
68
+ handle = win32api.LoadLibraryEx("nvrtc64_110_0.dll", 0, LOAD_LIBRARY_SAFE_CURRENT_DIRS)
69
+ except:
70
+ pass
65
71
66
72
# Final check if DLLs can be found within pip installations
67
73
if not handle:
You can’t perform that action at this time.
0 commit comments