Skip to content

Commit 47c1c52

Browse files
committed
relocate setting __cuPythonInit to avoid deadlock since we use cuGetProcAddress in the init function...
1 parent 095999a commit 47c1c52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ cdef int cuPythonInit() except -1 nogil:
490490
global __cuPythonInit
491491
if __cuPythonInit:
492492
return 0
493+
__cuPythonInit = True
493494

494495
cdef bint usePTDS
495496
cdef char libPath[260]
@@ -8873,7 +8874,6 @@ cdef int cuPythonInit() except -1 nogil:
88738874
{{endif}}
88748875
{{endif}}
88758876

8876-
__cuPythonInit = True
88778877
return 0
88788878

88798879
{{if 'cuGetErrorString' in found_functions}}

0 commit comments

Comments
 (0)