Skip to content

Commit 2d1ddba

Browse files
committed
Merge branch 'main' into bandit_pre-commit_workflow_sync
2 parents 612f86b + aebce8e commit 2d1ddba

48 files changed

Lines changed: 1219 additions & 1209 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-wheel.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Check cuda.pathfinder wheel
9797
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
9898
run: |
99-
twine check cuda_pathfinder/*.whl
99+
twine check --strict cuda_pathfinder/*.whl
100100
101101
- name: Upload cuda.pathfinder build artifacts
102102
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
@@ -132,7 +132,7 @@ jobs:
132132
133133
- name: Check cuda.core wheel
134134
run: |
135-
twine check ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
135+
twine check --strict ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
136136
137137
- name: Upload cuda.core build artifacts
138138
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -179,7 +179,7 @@ jobs:
179179
180180
- name: Check cuda.bindings wheel
181181
run: |
182-
twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
182+
twine check --strict ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
183183
184184
- name: Upload cuda.bindings build artifacts
185185
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -194,7 +194,7 @@ jobs:
194194
run: |
195195
pushd cuda_python
196196
pip wheel -v --no-deps .
197-
twine check *.whl
197+
twine check --strict *.whl
198198
popd
199199
200200
- name: List the cuda-python artifacts directory

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
34+
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
3535
with:
3636
languages: ${{ matrix.language }}
3737
build-mode: ${{ matrix.build-mode }}
3838
queries: security-extended
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
41+
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
4242
with:
4343
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd
2929
cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx
3030
cuda_bindings/cuda/bindings/_internal/nvjitlink.pyx
3131
cuda_bindings/cuda/bindings/_internal/nvvm.pyx
32-
cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd
33-
cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx
34-
cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pxd
35-
cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx
3632
cuda_bindings/cuda/bindings/_lib/utils.pxd
3733
cuda_bindings/cuda/bindings/_lib/utils.pyx
3834
cuda_bindings/cuda/bindings/cydriver.pxd

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# This code was automatically generated with version 13.0.0. Do not modify it directly.
55
include "../cyruntime_types.pxi"
66

7+
include "../_lib/cyruntime/cyruntime.pxd"
8+
79
{{if 'cudaDeviceReset' in found_functions}}
810

911
cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil

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

Lines changed: 4 additions & 1 deletion
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}}
@@ -2671,3 +2671,6 @@ cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver no
26712671
return ptds._cudaProfilerStop()
26722672
return cudaProfilerStop()
26732673
{{endif}}
2674+
2675+
2676+
include "../_lib/cyruntime/cyruntime.pxi"

cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from cuda.pathfinder import load_nvidia_dynamic_lib
1313

1414
import cython
1515

16+
1617
###############################################################################
1718
# Extern
1819
###############################################################################

cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t, uintptr_t
8-
import threading
98

9+
import threading
1010
from .utils import FunctionNotFoundError, NotSupportedError
1111

1212
from cuda.pathfinder import load_nvidia_dynamic_lib

cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# This code was automatically generated across versions from 12.0.1 to 13.0.0. Do not modify it directly.
66

77
from libc.stdint cimport intptr_t
8-
import threading
98

9+
import threading
1010
from .utils import FunctionNotFoundError, NotSupportedError
1111

1212
from cuda.pathfinder import load_nvidia_dynamic_lib

0 commit comments

Comments
 (0)