Skip to content

Commit 1ff00e5

Browse files
authored
Merge branch 'main' into fix-checkpoint-gpu-uuid-validation
2 parents 41507c5 + 774e988 commit 1ff00e5

172 files changed

Lines changed: 12954 additions & 2073 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/build-docs.yml‎

Lines changed: 68 additions & 7 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

@@ -91,15 +91,18 @@ jobs:
9191
9292
if [[ ${{ inputs.is-release }} == "true" ]]; then
9393
FILE_HASH="*"
94-
COMMIT_HASH="${{ inputs.git-tag }}"
94+
DOCS_GITHUB_REF="${{ inputs.git-tag }}"
95+
if [[ -z "${DOCS_GITHUB_REF}" ]]; then
96+
DOCS_GITHUB_REF="${GITHUB_REF_NAME}"
97+
fi
9598
else
9699
FILE_HASH="${{ github.sha }}"
97-
COMMIT_HASH="${{ github.sha }}"
100+
DOCS_GITHUB_REF="${{ github.sha }}"
98101
fi
99102
100103
# make outputs from the previous job as env vars
101104
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-linux-64"
102-
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
105+
echo "CUDA_PYTHON_DOCS_GITHUB_REF=${DOCS_GITHUB_REF}" >> $GITHUB_ENV
103106
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
104107
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
105108
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
@@ -242,8 +245,66 @@ jobs:
242245
fi
243246
mv ${COMPONENT}/docs/build/html/* artifacts/docs/${TARGET}
244247
245-
# TODO: Consider removing this step?
246-
- name: Upload doc artifacts
248+
- name: Write rendered docs file list
249+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
250+
run: |
251+
find "${GITHUB_WORKSPACE}/artifacts/docs" -type f -name '*.html' ! -path '*/_static/*' \
252+
| LC_ALL=C sort > lychee-rendered-html-files.txt
253+
if [[ ! -s lychee-rendered-html-files.txt ]]; then
254+
echo "error: no rendered HTML pages found for lychee" >&2
255+
exit 1
256+
fi
257+
wc -l lychee-rendered-html-files.txt
258+
259+
- name: Restore lychee cache
260+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
261+
id: restore-lychee-cache
262+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
263+
with:
264+
path: .lycheecache
265+
key: docs-rendered-lychee-${{ env.PR_NUMBER }}-${{ github.sha }}
266+
restore-keys: |
267+
docs-rendered-lychee-${{ env.PR_NUMBER }}-
268+
269+
- name: Check rendered docs links
270+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
271+
uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout
272+
with:
273+
# PR-preview canonical URLs are checked by the preview deployment workflow.
274+
# The cuda-bindings #id links are docutils "problematic" anchors from generated API docs.
275+
# TODO: Remove this exclusion after cybind stops emitting those problematic anchors.
276+
# Preferred Networks rejects hosted-runner GETs, but the URL is browser reachable.
277+
args: >-
278+
--files-from ${{ github.workspace }}/lychee-rendered-html-files.txt
279+
--include-fragments=full
280+
--cache
281+
--max-cache-age 1d
282+
--max-concurrency 16
283+
--host-concurrency 2
284+
--host-request-interval 250ms
285+
--max-retries 3
286+
--retry-wait-time 5
287+
--timeout 30
288+
--no-progress
289+
--exclude '^https://nvidia\.github\.io/cuda-python/pr-preview/pr-[0-9]+/'
290+
--exclude '^file://.*/cuda-bindings/latest/module/(driver|runtime)\.html#id[0-9]+$'
291+
--exclude '^https://www\.preferred\.jp/en/?$'
292+
fail: true
293+
failIfEmpty: true
294+
format: markdown
295+
jobSummary: false
296+
lycheeVersion: v0.24.2
297+
output: lychee-rendered-html.md
298+
token: ${{ github.token }}
299+
300+
- name: Save lychee cache
301+
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 != '' }}
302+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
303+
with:
304+
path: .lycheecache
305+
key: ${{ steps.restore-lychee-cache.outputs.cache-primary-key }}
306+
307+
- name: Upload docs GitHub Pages artifact
247308
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
248309
with:
249310
path: artifacts/
@@ -265,5 +326,5 @@ jobs:
265326
git-config-email: [email protected]
266327
folder: artifacts/docs/
267328
target-folder: docs/
268-
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.COMMIT_HASH }}"
329+
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.CUDA_PYTHON_DOCS_GITHUB_REF }}"
269330
clean: false

‎.github/workflows/build-wheel.yml‎

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ 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') ||
@@ -165,12 +167,17 @@ jobs:
165167
cuda-version: ${{ inputs.cuda-version }}
166168

167169
- name: Build cuda.bindings wheel
168-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
170+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
169171
with:
170172
package-dir: ./cuda_bindings/
171173
output-dir: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
172174
env:
173175
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
174181
# CIBW mounts the host filesystem under /host
175182
CIBW_ENVIRONMENT_LINUX: >
176183
CUDA_PATH=/host/${{ env.CUDA_PATH }}
@@ -229,12 +236,17 @@ jobs:
229236
if-no-files-found: error
230237

231238
- name: Build cuda.core wheel
232-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
239+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
233240
with:
234241
package-dir: ./cuda_core/
235242
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
236243
env:
237244
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
238250
# CIBW mounts the host filesystem under /host
239251
CIBW_ENVIRONMENT_LINUX: >
240252
CUDA_PATH=/host/${{ env.CUDA_PATH }}
@@ -330,6 +342,8 @@ jobs:
330342
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
331343
with:
332344
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') }}
333347

334348
- name: verify free-threaded build
335349
if: endsWith(matrix.python-version, 't')
@@ -349,6 +363,71 @@ jobs:
349363
run: |
350364
pip install cuda_pathfinder/*.whl
351365
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+
352431
- name: Build cuda.bindings Cython tests
353432
run: |
354433
pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test
@@ -414,12 +493,17 @@ jobs:
414493
rmdir $OLD_BASENAME
415494
416495
- name: Build cuda.core wheel
417-
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
496+
uses: pypa/cibuildwheel@54327ab9d35de03b359ac25c97de9417d94639c0 # v4.0.0rc1
418497
with:
419498
package-dir: ./cuda_core/
420499
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
421500
env:
422501
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
423507
# CIBW mounts the host filesystem under /host
424508
CIBW_ENVIRONMENT_LINUX: >
425509
CUDA_PATH=/host/${{ env.CUDA_PATH }}

0 commit comments

Comments
 (0)