Skip to content

Commit 9d65e55

Browse files
committed
Add CUDA version compatibility check
Warn when cuda-bindings was compiled against a newer CUDA major version than the installed driver supports. This helps users understand why certain features may not work correctly. The check runs once after cuInit and can be suppressed via CUDA_PYTHON_DISABLE_VERSION_CHECK=1.
1 parent 62a8cb3 commit 9d65e55

File tree

20 files changed

+329
-59
lines changed

20 files changed

+329
-59
lines changed

.github/workflows/backport.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
}}
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727

2828
- name: Load branch name
2929
id: get-branch
@@ -32,7 +32,7 @@ jobs:
3232
echo "OLD_BRANCH=${OLD_BRANCH}" >> $GITHUB_ENV
3333
3434
- name: Create backport pull requests
35-
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
35+
uses: korthout/backport-action@c656f5d5851037b2b38fb5db2691a03fa229e3b2 # v4.0.1
3636
with:
3737
copy_assignees: true
3838
copy_labels_pattern: true

.github/workflows/bandit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
security-events: write
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2424

2525
- name: Install uv
26-
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
26+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
2727
with:
2828
enable-cache: false
2929

@@ -42,6 +42,6 @@ jobs:
4242
with:
4343
args: "check --select S --ignore ${{ steps.ignore-codes.outputs.codes }} --output-format sarif --output-file results.sarif"
4444
- name: Upload SARIF file
45-
uses: github/codeql-action/upload-sarif@v3
45+
uses: github/codeql-action/upload-sarif@v4
4646
with:
4747
sarif_file: results.sarif

.github/workflows/build-docs.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
shell: bash -el {0}
4949
steps:
5050
- name: Checkout ${{ github.event.repository.name }}
51-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
51+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5252
with:
5353
fetch-depth: 0
5454
ref: ${{ inputs.git-tag }}
@@ -103,7 +103,7 @@ jobs:
103103
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
104104
105105
- name: Download cuda-python build artifacts
106-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
106+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
107107
with:
108108
name: cuda-python-wheel
109109
path: .
@@ -116,7 +116,7 @@ jobs:
116116
ls -lahR .
117117
118118
- name: Download cuda-pathfinder build artifacts
119-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
119+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
120120
with:
121121
name: cuda-pathfinder-wheel
122122
path: ./cuda_pathfinder
@@ -130,14 +130,14 @@ jobs:
130130
131131
- name: Download cuda.bindings build artifacts
132132
if: ${{ !inputs.is-release }}
133-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
133+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
134134
with:
135135
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
136136
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
137137

138138
- name: Download cuda.bindings build artifacts
139139
if: ${{ inputs.is-release }}
140-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
140+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
141141
with:
142142
pattern: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
143143
merge-multiple: true
@@ -152,14 +152,14 @@ jobs:
152152
153153
- name: Download cuda.core build artifacts
154154
if: ${{ !inputs.is-release }}
155-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
155+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
156156
with:
157157
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
158158
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
159159

160160
- name: Download cuda.core build artifacts
161161
if: ${{ inputs.is-release }}
162-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
162+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
163163
with:
164164
pattern: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
165165
merge-multiple: true

.github/workflows/build-wheel.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
(inputs.host-platform == 'win-64' && 'windows-2022') }}
4141
steps:
4242
- name: Checkout ${{ github.event.repository.name }}
43-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4444
with:
4545
fetch-depth: 0
4646

@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Set up Python
6767
id: setup-python1
68-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
68+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
6969
with:
7070
# WAR: setup-python is not relocatable, and cibuildwheel hard-wires to 3.12...
7171
# see https://github.com/actions/setup-python/issues/871
@@ -134,7 +134,7 @@ jobs:
134134
135135
- name: Upload cuda.pathfinder build artifacts
136136
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
137-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
137+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
138138
with:
139139
name: cuda-pathfinder-wheel
140140
path: cuda_pathfinder/*.whl
@@ -195,7 +195,7 @@ jobs:
195195
twine check --strict ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
196196
197197
- name: Upload cuda.bindings build artifacts
198-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
198+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
199199
with:
200200
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
201201
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
@@ -282,15 +282,15 @@ jobs:
282282
283283
- name: Upload cuda-python build artifacts
284284
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
285-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
285+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
286286
with:
287287
name: cuda-python-wheel
288288
path: cuda_python/*.whl
289289
if-no-files-found: error
290290

291291
- name: Set up Python
292292
id: setup-python2
293-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
293+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
294294
with:
295295
python-version: ${{ matrix.python-version }}
296296

@@ -320,7 +320,7 @@ jobs:
320320
popd
321321
322322
- name: Upload cuda.bindings Cython tests
323-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
323+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
324324
with:
325325
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
326326
path: ${{ env.CUDA_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
@@ -334,7 +334,7 @@ jobs:
334334
popd
335335
336336
- name: Upload cuda.core Cython tests
337-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
337+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
338338
with:
339339
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-tests
340340
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
@@ -453,7 +453,7 @@ jobs:
453453
twine check --strict ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
454454
455455
- name: Upload cuda.core build artifacts
456-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
456+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
457457
with:
458458
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
459459
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }}
2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828
with:
2929
fetch-depth: 0
3030
- name: Get CUDA build versions
@@ -42,7 +42,7 @@ jobs:
4242
skip: ${{ steps.get-should-skip.outputs.skip }}
4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4646
- name: Compute whether to skip builds and tests
4747
id: get-should-skip
4848
env:

.github/workflows/cleanup-pr-previews.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
if: github.repository_owner == 'NVIDIA'
2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@v6
31+
uses: actions/checkout@v6.0.1
3232
with:
3333
# Fetch all history and branches for worktree operations
3434
fetch-depth: 0

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828
build-mode: none
2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
34+
uses: github/codeql-action/init@f47c8e6a9bd05ef3ee422fc8d8663be7fe4bdc61 # v3.31.8
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@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
41+
uses: github/codeql-action/analyze@f47c8e6a9bd05ef3ee422fc8d8663be7fe4bdc61 # v3.31.8
4242
with:
4343
category: "/language:${{matrix.language}}"

.github/workflows/coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
apt-get install -y git
5050
5151
- name: Checkout ${{ github.event.repository.name }}
52-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5353

5454
- name: Install dependencies
5555
uses: ./.github/actions/install_unix_deps
@@ -75,7 +75,7 @@ jobs:
7575
echo "CUDA_PYTHON_COVERAGE=1" >> $GITHUB_ENV
7676
7777
- name: Set up Python
78-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
78+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
7979
with:
8080
python-version: ${{ env.PY_VER }}
8181
env:
@@ -145,13 +145,13 @@ jobs:
145145
mv htmlcov $REPO_ROOT/docs/coverage
146146
147147
- name: Archive code coverage results
148-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
148+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
149149
with:
150150
name: coverage
151151
path: docs/coverage/
152152

153153
- name: Deploy to gh-pages
154-
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # v4.7.4
154+
uses: JamesIves/github-pages-deploy-action@9d877eea73427180ae43cf98e8914934fe157a1a # v4.7.6
155155
with:
156156
git-config-name: cuda-python-bot
157157
git-config-email: [email protected]

.github/workflows/release-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ inputs.git-tag }}
4242
steps:
4343
- name: Checkout Source
44-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
44+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4545
with:
4646
fetch-depth: 0
4747
ref: ${{ inputs.git-tag }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run-id: ${{ steps.lookup-run-id.outputs.run-id }}
5151
steps:
5252
- name: Checkout Source
53-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
53+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5454
with:
5555
# fetch-depth: 0 is required so the lookup-run-id script can access all git tags
5656
fetch-depth: 0
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Checkout Source
77-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
77+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7878
with:
7979
fetch-depth: 0
8080

@@ -155,7 +155,7 @@ jobs:
155155
id-token: write
156156
steps:
157157
- name: Checkout Source
158-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
158+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
159159

160160
- name: Download component wheels
161161
env:

0 commit comments

Comments
 (0)