Skip to content

Commit d54ecf1

Browse files
authored
Update with whitespace-only changes from cython-gen (#924)
1 parent 8017a81 commit d54ecf1

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ cimport cuda.bindings._lib.dlfcn as dlfcn
1212
from libc.stdint cimport intptr_t
1313
import os
1414
import sys
15-
import threading
1615
cimport cuda.bindings._bindings.loader as loader
17-
cdef object __symbol_lock = threading.RLock()
16+
import threading
17+
18+
cdef object __symbol_lock = threading.Lock()
1819
cdef bint __cuPythonInit = False
1920
{{if 'cuGetErrorString' in found_functions}}cdef void *__cuGetErrorString = NULL{{endif}}
2021
{{if 'cuGetErrorName' in found_functions}}cdef void *__cuGetErrorName = NULL{{endif}}
@@ -510,7 +511,7 @@ cdef int _cuPythonInit() except -1 nogil:
510511
{{else}}
511512
path = 'libcuda.so.1'
512513
{{endif}}
513-
514+
514515
{{if 'Windows' == platform.system()}}
515516
LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
516517
try:
@@ -522,7 +523,7 @@ cdef int _cuPythonInit() except -1 nogil:
522523
if (handle == NULL):
523524
raise RuntimeError('Failed to dlopen ' + path)
524525
{{endif}}
525-
526+
526527
# Get latest __cuGetProcAddress_v2
527528
global __cuGetProcAddress_v2
528529
{{if 'Windows' == platform.system()}}
@@ -533,7 +534,7 @@ cdef int _cuPythonInit() except -1 nogil:
533534
{{else}}
534535
__cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2')
535536
{{endif}}
536-
537+
537538
# Load using cuGetProcAddress if available
538539
if __cuGetProcAddress_v2 != NULL:
539540
_F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2
@@ -2760,10 +2761,9 @@ cdef int _cuPythonInit() except -1 nogil:
27602761
global __cuGraphicsVDPAURegisterOutputSurface
27612762
_F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
27622763
{{endif}}
2763-
27642764
__cuPythonInit = True
27652765
return 0
2766-
2766+
27672767
{{if 'Windows' == platform.system()}}
27682768
# Load using win32GetAddr
27692769
if usePTDS:
@@ -8877,7 +8877,6 @@ cdef int _cuPythonInit() except -1 nogil:
88778877
__cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface')
88788878
{{endif}}
88798879
{{endif}}
8880-
88818880
__cuPythonInit = True
88828881
return 0
88838882

@@ -8886,7 +8885,6 @@ cdef int _cuPythonInit() except -1 nogil:
88868885
cdef inline int cuPythonInit() except -1 nogil:
88878886
if __cuPythonInit:
88888887
return 0
8889-
88908888
return _cuPythonInit()
88918889

88928890
{{if 'cuGetErrorString' in found_functions}}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ cdef bint __cuPythonInit = False
4343
cdef int _cuPythonInit() except -1 nogil:
4444
global __cuPythonInit
4545

46+
# Load library
4647
with gil, __symbol_lock:
4748
{{if 'Windows' == platform.system()}}
4849
handle = load_nvidia_dynamic_lib("nvrtc")._handle_uint
@@ -317,8 +318,8 @@ cdef int _cuPythonInit() except -1 nogil:
317318
global __nvrtcSetFlowCallback
318319
__nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback')
319320
{{endif}}
320-
{{endif}}
321321

322+
{{endif}}
322323
__cuPythonInit = True
323324
return 0
324325

@@ -327,7 +328,6 @@ cdef int _cuPythonInit() except -1 nogil:
327328
cdef inline int cuPythonInit() except -1 nogil:
328329
if __cuPythonInit:
329330
return 0
330-
331331
return _cuPythonInit()
332332

333333
{{if 'nvrtcGetErrorString' in found_functions}}

cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# This code was automatically generated with version 13.0.0. Do not modify it directly.
55
include "../cyruntime_types.pxi"
6+
67
include "../_lib/cyruntime/cyruntime.pxd"
78

89
{{if 'cudaDeviceReset' in found_functions}}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cdef bint __usePTDS = False
1313
cdef int _cudaPythonInit() except -1 nogil:
1414
global __cudaPythonInit
1515
global __usePTDS
16+
1617
with gil:
1718
__usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False)
1819
__cudaPythonInit = True
@@ -23,7 +24,6 @@ cdef int _cudaPythonInit() except -1 nogil:
2324
cdef inline int cudaPythonInit() except -1 nogil:
2425
if __cudaPythonInit:
2526
return __usePTDS
26-
2727
return _cudaPythonInit()
2828

2929
{{if 'cudaDeviceReset' in found_functions}}
@@ -2672,4 +2672,5 @@ cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver no
26722672
return cudaProfilerStop()
26732673
{{endif}}
26742674

2675-
include "../_lib/cyruntime/cyruntime.pxi"
2675+
2676+
include "../_lib/cyruntime/cyruntime.pxi"

0 commit comments

Comments
 (0)