Skip to content

Commit 05aa37e

Browse files
committed
Merge branch 'main' into CUcheckpointRestoreArgs_error_masking_skip
2 parents 41187f8 + a9156b6 commit 05aa37e

233 files changed

Lines changed: 45962 additions & 42034 deletions

File tree

Some content is hidden

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

.github/actionlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
self-hosted-runner:
88
labels:
99
- linux-amd64-cpu8
10+
- linux-amd64-gpu-l4-latest-1

.github/workflows/backport.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
}}
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3838

3939
- name: Load branch name
4040
id: get-branch
@@ -43,7 +43,7 @@ jobs:
4343
echo "OLD_BRANCH=${OLD_BRANCH}" >> $GITHUB_ENV
4444
4545
- name: Create backport pull requests
46-
uses: korthout/backport-action@7c3f6cd5843cac11bc59a04a1b7699af93261670 # v4.5.0
46+
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
4747
with:
4848
copy_assignees: true
4949
copy_labels_pattern: true
@@ -54,7 +54,7 @@ jobs:
5454
if: github.repository_owner == 'nvidia' && github.event_name == 'workflow_dispatch'
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5858

5959
- name: Load branch from environment name
6060
if: inputs.backport-branch == null
@@ -67,7 +67,7 @@ jobs:
6767
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
6868

6969
- name: Create backport pull requests
70-
uses: korthout/backport-action@7c3f6cd5843cac11bc59a04a1b7699af93261670 # v4.5.0
70+
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
7171
with:
7272
copy_assignees: true
7373
copy_labels_pattern: true

.github/workflows/bandit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
security-events: write
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2727

2828
- name: Install uv
2929
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
@@ -45,6 +45,6 @@ jobs:
4545
with:
4646
args: "check --select S --ignore ${{ steps.ignore-codes.outputs.codes }} --output-format sarif --output-file results.sarif"
4747
- name: Upload SARIF file
48-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
48+
uses: github/codeql-action/upload-sarif@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
4949
with:
5050
sarif_file: results.sarif

.github/workflows/build-docs.yml

Lines changed: 100 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

@@ -33,6 +33,16 @@ on:
3333
required: false
3434
default: false
3535
type: boolean
36+
deploy-docs:
37+
description: "Deploy generated docs to GitHub Pages or preview branches"
38+
required: false
39+
default: true
40+
type: boolean
41+
docs-branch:
42+
description: "Branch that receives deployed docs"
43+
required: false
44+
default: "gh-pages"
45+
type: string
3646

3747
jobs:
3848
build:
@@ -45,14 +55,21 @@ jobs:
4555
shell: bash -el {0}
4656
steps:
4757
- name: Checkout ${{ github.event.repository.name }}
48-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4959
with:
50-
fetch-depth: 0
60+
fetch-depth: 1
5161
ref: ${{ inputs.git-tag }}
5262

5363
- name: Read build CTK version
5464
run: |
55-
BUILD_CTK_VER=$(yq '.cuda.build.version' ci/versions.yml)
65+
if [[ -f ci/versions.yml ]]; then
66+
BUILD_CTK_VER=$(yq '.cuda.build.version' ci/versions.yml)
67+
elif [[ -f ci/versions.json ]]; then
68+
BUILD_CTK_VER=$(jq -r '.cuda.build.version' ci/versions.json)
69+
else
70+
echo "error: cannot find ci/versions.yml or ci/versions.json" >&2
71+
exit 1
72+
fi
5673
if [[ ! "${BUILD_CTK_VER}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
5774
echo "error: derived CTK build version ${BUILD_CTK_VER} does not match MAJOR.MINOR.MICRO" >&2
5875
exit 1
@@ -91,15 +108,18 @@ jobs:
91108
92109
if [[ ${{ inputs.is-release }} == "true" ]]; then
93110
FILE_HASH="*"
94-
COMMIT_HASH="${{ inputs.git-tag }}"
111+
DOCS_GITHUB_REF="${{ inputs.git-tag }}"
112+
if [[ -z "${DOCS_GITHUB_REF}" ]]; then
113+
DOCS_GITHUB_REF="${GITHUB_REF_NAME}"
114+
fi
95115
else
96116
FILE_HASH="${{ github.sha }}"
97-
COMMIT_HASH="${{ github.sha }}"
117+
DOCS_GITHUB_REF="${{ github.sha }}"
98118
fi
99119
100120
# make outputs from the previous job as env vars
101121
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-linux-64"
102-
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
122+
echo "CUDA_PYTHON_DOCS_GITHUB_REF=${DOCS_GITHUB_REF}" >> $GITHUB_ENV
103123
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
104124
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
105125
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
@@ -242,28 +262,96 @@ jobs:
242262
fi
243263
mv ${COMPONENT}/docs/build/html/* artifacts/docs/${TARGET}
244264
245-
# TODO: Consider removing this step?
246-
- name: Upload doc artifacts
265+
- name: Write rendered docs file list
266+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
267+
run: |
268+
find "${GITHUB_WORKSPACE}/artifacts/docs" -type f -name '*.html' ! -path '*/_static/*' \
269+
| LC_ALL=C sort > lychee-rendered-html-files.txt
270+
if [[ ! -s lychee-rendered-html-files.txt ]]; then
271+
echo "error: no rendered HTML pages found for lychee" >&2
272+
exit 1
273+
fi
274+
wc -l lychee-rendered-html-files.txt
275+
276+
- name: Restore lychee cache
277+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
278+
id: restore-lychee-cache
279+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
280+
with:
281+
path: .lycheecache
282+
key: docs-rendered-lychee-${{ env.PR_NUMBER }}-${{ github.sha }}
283+
restore-keys: |
284+
docs-rendered-lychee-${{ env.PR_NUMBER }}-
285+
286+
- name: Check rendered docs links
287+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
288+
uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout
289+
with:
290+
# PR-preview canonical URLs are checked by the preview deployment workflow.
291+
# The cuda-bindings #id links are docutils "problematic" anchors from generated API docs.
292+
# TODO: Remove this exclusion after cybind stops emitting those problematic anchors.
293+
# Preferred Networks rejects hosted-runner GETs, but the URL is browser reachable.
294+
args: >-
295+
--files-from ${{ github.workspace }}/lychee-rendered-html-files.txt
296+
--include-fragments=full
297+
--cache
298+
--max-cache-age 1d
299+
--max-concurrency 16
300+
--host-concurrency 2
301+
--host-request-interval 250ms
302+
--max-retries 3
303+
--retry-wait-time 5
304+
--timeout 30
305+
--no-progress
306+
--exclude '^https://nvidia\.github\.io/cuda-python/pr-preview/pr-[0-9]+/'
307+
--exclude '^file://.*/cuda-bindings/latest/module/(driver|runtime)\.html#id[0-9]+$'
308+
--exclude '^https://www\.preferred\.jp/en/?$'
309+
fail: true
310+
failIfEmpty: true
311+
format: markdown
312+
jobSummary: false
313+
lycheeVersion: v0.24.2
314+
output: lychee-rendered-html.md
315+
token: ${{ github.token }}
316+
317+
- name: Save lychee cache
318+
if: ${{ always() && !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') && steps.restore-lychee-cache.outputs.cache-hit != 'true' && steps.restore-lychee-cache.outputs.cache-primary-key != '' }}
319+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
320+
with:
321+
path: .lycheecache
322+
key: ${{ steps.restore-lychee-cache.outputs.cache-primary-key }}
323+
324+
- name: Upload docs GitHub Pages artifact
325+
if: ${{ inputs.deploy-docs }}
247326
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
248327
with:
249328
path: artifacts/
250329
retention-days: 3
251330

331+
- name: Upload dry-run docs artifact
332+
if: ${{ !inputs.deploy-docs || (inputs.is-release && inputs.docs-branch != 'gh-pages') }}
333+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
334+
with:
335+
name: release-docs-dry-run-${{ inputs.component }}-${{ inputs.git-tag }}
336+
path: artifacts/docs/
337+
retention-days: 3
338+
252339
- name: Deploy or clean up doc preview
253-
if: ${{ !inputs.is-release }}
340+
if: ${{ inputs.deploy-docs && !inputs.is-release }}
254341
uses: ./.github/actions/doc_preview
255342
with:
256343
source-folder: ${{ (github.ref_name != 'main' && 'artifacts/docs') ||
257344
'artifacts/empty_docs' }}
258345
pr-number: ${{ env.PR_NUMBER }}
259346

260347
- name: Deploy doc update
261-
if: ${{ github.ref_name == 'main' || inputs.is-release }}
348+
if: ${{ inputs.deploy-docs && (github.ref_name == 'main' || inputs.is-release) }}
262349
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
263350
with:
264351
git-config-name: cuda-python-bot
265352
git-config-email: cuda-python-bot@users.noreply.github.com
353+
branch: ${{ inputs.docs-branch }}
266354
folder: artifacts/docs/
267355
target-folder: docs/
268-
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.COMMIT_HASH }}"
356+
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.CUDA_PYTHON_DOCS_GITHUB_REF }}"
269357
clean: false

.github/workflows/build-wheel.yml

Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,20 @@ jobs:
3434
- "3.13"
3535
- "3.14"
3636
- "3.14t"
37+
- "3.15"
38+
- "3.15t"
3739
name: py${{ matrix.python-version }}
3840
runs-on: ${{ (inputs.host-platform == 'linux-64' && 'linux-amd64-cpu8') ||
3941
(inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||
4042
(inputs.host-platform == 'win-64' && 'windows-2022') }}
4143
steps:
4244
- name: Checkout ${{ github.event.repository.name }}
43-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4446
with:
47+
# Treeless clone: setuptools-scm needs the commit graph (`git describe`)
48+
# but not historical blobs.
4549
fetch-depth: 0
50+
filter: blob:none
4651

4752
- name: Install latest rapidsai/sccache
4853
if: ${{ startsWith(inputs.host-platform, 'linux') }}
@@ -162,12 +167,17 @@ jobs:
162167
cuda-version: ${{ inputs.cuda-version }}
163168

164169
- name: Build cuda.bindings wheel
165-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
170+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
166171
with:
167172
package-dir: ./cuda_bindings/
168173
output-dir: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
169174
env:
170175
CIBW_BUILD: ${{ env.CIBW_BUILD }}
176+
# TODO: remove cpython-prerelease once 3.15 is officially supported
177+
# Allow CPython pre-release builds (currently 3.15 / 3.15t). This is a
178+
# no-op for stable Python versions because CIBW_BUILD still filters
179+
# the target version.
180+
CIBW_ENABLE: cpython-prerelease
171181
# CIBW mounts the host filesystem under /host
172182
CIBW_ENVIRONMENT_LINUX: >
173183
CUDA_PATH=/host/${{ env.CUDA_PATH }}
@@ -226,12 +236,17 @@ jobs:
226236
if-no-files-found: error
227237

228238
- name: Build cuda.core wheel
229-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
239+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
230240
with:
231241
package-dir: ./cuda_core/
232242
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
233243
env:
234244
CIBW_BUILD: ${{ env.CIBW_BUILD }}
245+
# TODO: remove cpython-prerelease once 3.15 is officially supported
246+
# Allow CPython pre-release builds (currently 3.15 / 3.15t). This is a
247+
# no-op for stable Python versions because CIBW_BUILD still filters
248+
# the target version.
249+
CIBW_ENABLE: cpython-prerelease
235250
# CIBW mounts the host filesystem under /host
236251
CIBW_ENVIRONMENT_LINUX: >
237252
CUDA_PATH=/host/${{ env.CUDA_PATH }}
@@ -327,6 +342,8 @@ jobs:
327342
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
328343
with:
329344
python-version: ${{ matrix.python-version }}
345+
# TODO: remove allow-prereleases once 3.15 is officially supported
346+
allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }}
330347

331348
- name: verify free-threaded build
332349
if: endsWith(matrix.python-version, 't')
@@ -346,6 +363,71 @@ jobs:
346363
run: |
347364
pip install cuda_pathfinder/*.whl
348365
366+
- name: Hide GNU link.exe so Meson finds MSVC link.exe
367+
if: ${{ startsWith(inputs.host-platform, 'win') }}
368+
run: |
369+
if [ -f "/c/Program Files/Git/usr/bin/link.exe" ]; then
370+
mv "/c/Program Files/Git/usr/bin/link.exe" "/c/Program Files/Git/usr/bin/link.exe.bak"
371+
fi
372+
373+
# TODO: remove the numpy pre-build steps once 3.15 is officially supported
374+
# (numpy will publish pre-built 3.15 wheels at that point)
375+
- name: Download and patch numpy sdist (pre-release Python)
376+
if: ${{ startsWith(matrix.python-version, '3.15') }}
377+
run: |
378+
pip download --no-binary numpy --no-deps "numpy>=1.21.1" -d numpy-sdist/
379+
cd numpy-sdist && tar xf numpy-*.tar.gz && rm numpy-*.tar.gz
380+
# WAR: numpy 2.4.x ships [tool.cibuildwheel] config that is
381+
# incompatible with cibuildwheel v4.0 (cpython-freethreading enable
382+
# group, OpenBLAS before-build scripts, etc.). Strip the cibuildwheel
383+
# sections but preserve [tool.meson-python] (vendored meson path).
384+
python -c "
385+
import glob
386+
for f in glob.glob('numpy-*/pyproject.toml'):
387+
lines, skip = open(f).readlines(), False
388+
out = []
389+
for line in lines:
390+
hdr = line.strip()
391+
if hdr.startswith('[tool.cibuildwheel') or hdr.startswith('[[tool.cibuildwheel'):
392+
skip = True
393+
continue
394+
if skip and hdr.startswith('[') and 'cibuildwheel' not in hdr:
395+
skip = False
396+
if not skip:
397+
out.append(line)
398+
open(f, 'w').writelines(out)
399+
"
400+
echo "NUMPY_SRC_DIR=$(pwd)/$(ls -d numpy-*/)" >> $GITHUB_ENV
401+
402+
- name: Build numpy wheel (pre-release Python)
403+
if: ${{ startsWith(matrix.python-version, '3.15') }}
404+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
405+
env:
406+
CIBW_BUILD: ${{ env.CIBW_BUILD }}
407+
CIBW_SKIP: "*-musllinux* *-win32"
408+
CIBW_ARCHS_LINUX: "native"
409+
CIBW_BUILD_VERBOSITY: 1
410+
CIBW_CONFIG_SETTINGS: "setup-args=-Dallow-noblas=true"
411+
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv setup-args=-Dallow-noblas=true"
412+
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
413+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
414+
CIBW_ENABLE: "cpython-prerelease"
415+
with:
416+
package-dir: ${{ env.NUMPY_SRC_DIR }}
417+
output-dir: numpy-wheel/
418+
419+
- name: Upload numpy wheel
420+
if: ${{ startsWith(matrix.python-version, '3.15') }}
421+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
422+
with:
423+
name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }}
424+
path: numpy-wheel/*.whl
425+
if-no-files-found: error
426+
427+
- name: Install numpy wheel
428+
if: ${{ startsWith(matrix.python-version, '3.15') }}
429+
run: pip install numpy-wheel/*.whl
430+
349431
- name: Build cuda.bindings Cython tests
350432
run: |
351433
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test
@@ -411,12 +493,17 @@ jobs:
411493
rmdir $OLD_BASENAME
412494
413495
- name: Build cuda.core wheel
414-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
496+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
415497
with:
416498
package-dir: ./cuda_core/
417499
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
418500
env:
419501
CIBW_BUILD: ${{ env.CIBW_BUILD }}
502+
# TODO: remove cpython-prerelease once 3.15 is officially supported
503+
# Allow CPython pre-release builds (currently 3.15 / 3.15t). This is a
504+
# no-op for stable Python versions because CIBW_BUILD still filters
505+
# the target version.
506+
CIBW_ENABLE: cpython-prerelease
420507
# CIBW mounts the host filesystem under /host
421508
CIBW_ENVIRONMENT_LINUX: >
422509
CUDA_PATH=/host/${{ env.CUDA_PATH }}

.github/workflows/ci-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
CUDA_BUILD_VER: ${{ steps.find.outputs.cuda_build_ver }}
4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4343
with:
4444
fetch-depth: 1
4545

0 commit comments

Comments
 (0)