File tree Expand file tree Collapse file tree
cuda_bindings/cuda/bindings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -494,8 +494,6 @@ cdef int cuPythonInit() except -1 nogil:
494494 cdef bint usePTDS
495495 cdef char libPath[260]
496496 with gil, __symbol_lock:
497- __cuPythonInit = True
498-
499497 usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
500498
501499 # Load library
@@ -8875,6 +8873,9 @@ cdef int cuPythonInit() except -1 nogil:
88758873 {{endif}}
88768874 {{endif}}
88778875
8876+ __cuPythonInit = True
8877+ return 0
8878+
88788879{{if 'cuGetErrorString' in found_functions}}
88798880
88808881cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ cdef int cuPythonInit() except -1 nogil:
219219 pass
220220 {{endif}}
221221
222- {{else}}
222+ {{else}}
223223 handle = <void*><uintptr_t>load_nvidia_dynamic_lib("nvrtc")._handle_uint
224224
225225 # Load function
@@ -319,10 +319,10 @@ cdef int cuPythonInit() except -1 nogil:
319319 global __nvrtcSetFlowCallback
320320 __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback')
321321 {{endif}}
322- {{endif}}
322+ {{endif}}
323323
324- __cuPythonInit = True
325- return 0
324+ __cuPythonInit = True
325+ return 0
326326
327327{{if 'nvrtcGetErrorString' in found_functions}}
328328
Original file line number Diff line number Diff line change @@ -416,8 +416,8 @@ cdef int _check_or_init_cufile() except -1 nogil:
416416 handle = load_library(driver_ver)
417417 __cuFileGetParameterPosixPoolSlabArray = dlsym(handle, ' cuFileGetParameterPosixPoolSlabArray' )
418418
419- __py_cufile_init = True
420- return 0
419+ __py_cufile_init = True
420+ return 0
421421
422422
423423cdef dict func_ptrs = None
Original file line number Diff line number Diff line change @@ -150,8 +150,8 @@ cdef int _check_or_init_nvjitlink() except -1 nogil:
150150 except :
151151 pass
152152
153- __py_nvjitlink_init = True
154- return 0
153+ __py_nvjitlink_init = True
154+ return 0
155155
156156
157157cdef dict func_ptrs = None
Original file line number Diff line number Diff line change @@ -175,8 +175,8 @@ cdef int _check_or_init_nvvm() except -1 nogil:
175175 handle = load_library(driver_ver)
176176 __nvvmGetProgramLog = dlsym(handle, ' nvvmGetProgramLog' )
177177
178- __py_nvvm_init = True
179- return 0
178+ __py_nvvm_init = True
179+ return 0
180180
181181
182182cdef dict func_ptrs = None
Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ cdef int _check_or_init_nvvm() except -1 nogil:
143143 except :
144144 pass
145145
146- __py_nvvm_init = True
147- return 0
146+ __py_nvvm_init = True
147+ return 0
148148
149149
150150cdef dict func_ptrs = None
You can’t perform that action at this time.
0 commit comments