Skip to content

Commit 615f984

Browse files
authored
Merge branch 'main' into tensor-bridge-749
2 parents 833bcf8 + 46818dc commit 615f984

File tree

7 files changed

+305
-12
lines changed

7 files changed

+305
-12
lines changed

.github/actionlint.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Self-hosted runner labels used in CI workflows.
6+
# Without this config, actionlint rejects non-GitHub-hosted labels.
7+
self-hosted-runner:
8+
labels:
9+
- linux-amd64-cpu8

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Configuration for https://github.com/actions/labeler
6+
# Auto-applies labels based on which files a PR changes.
7+
8+
cuda.bindings:
9+
- changed-files:
10+
- any-glob-to-any-file: 'cuda_bindings/**'
11+
12+
cuda.core:
13+
- changed-files:
14+
- any-glob-to-any-file: 'cuda_core/**'
15+
16+
cuda.pathfinder:
17+
- changed-files:
18+
- any-glob-to-any-file: 'cuda_pathfinder/**'
19+
20+
CI/CD:
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- '.github/**'
24+
- 'ci/**'

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,37 @@ jobs:
286286
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
287287
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
288288

289+
# NOTE: test-sdist jobs are split by platform (mirroring build-* and test-wheel-*)
290+
# so platform-specific sources (e.g. cuda_bindings/*_windows.pyx selected by
291+
# build_hooks.py) are exercised on their target OS. Keep these job definitions
292+
# textually identical except for:
293+
# - host-platform value
294+
# - uses: (test-sdist-linux.yml vs test-sdist-windows.yml)
295+
test-sdist-linux:
296+
needs:
297+
- ci-vars
298+
- should-skip
299+
name: Test sdist linux-64
300+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
301+
secrets: inherit
302+
uses: ./.github/workflows/test-sdist-linux.yml
303+
with:
304+
host-platform: linux-64
305+
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
306+
307+
# See test-sdist-linux for why sdist test jobs are split by platform.
308+
test-sdist-windows:
309+
needs:
310+
- ci-vars
311+
- should-skip
312+
name: Test sdist win-64
313+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
314+
secrets: inherit
315+
uses: ./.github/workflows/test-sdist-windows.yml
316+
with:
317+
host-platform: win-64
318+
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
319+
289320
# NOTE: Test jobs are split by platform for the same reason as build jobs (see
290321
# build-linux-64). Keep these job definitions textually identical except for:
291322
# - host-platform value
@@ -388,6 +419,8 @@ jobs:
388419
needs:
389420
- should-skip
390421
- detect-changes
422+
- test-sdist-linux
423+
- test-sdist-windows
391424
- test-linux-64
392425
- test-linux-aarch64
393426
- test-windows
@@ -427,6 +460,12 @@ jobs:
427460
if ${{ needs.doc.result == 'cancelled' || needs.doc.result == 'failure' }}; then
428461
exit 1
429462
fi
463+
if ${{ needs.test-sdist-linux.result == 'cancelled' ||
464+
needs.test-sdist-linux.result == 'failure' ||
465+
needs.test-sdist-windows.result == 'cancelled' ||
466+
needs.test-sdist-windows.result == 'failure' }}; then
467+
exit 1
468+
fi
430469
if [[ "${doc_only}" != "true" ]]; then
431470
if ${{ needs.test-linux-64.result == 'cancelled' ||
432471
needs.test-linux-64.result == 'failure' ||
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: "CI: Auto-label PRs by path"
6+
7+
on:
8+
pull_request_target:
9+
types:
10+
- opened
11+
- synchronize
12+
13+
jobs:
14+
auto-label:
15+
name: Auto-label by changed paths
16+
if: github.repository_owner == 'NVIDIA'
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
steps:
22+
- name: Apply labels
23+
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
host-platform:
9+
required: true
10+
type: string
11+
cuda-version:
12+
required: true
13+
type: string
14+
15+
defaults:
16+
run:
17+
shell: bash --noprofile --norc -xeuo pipefail {0}
18+
19+
permissions:
20+
contents: read # This is required for actions/checkout
21+
22+
jobs:
23+
test-sdist:
24+
name: Test sdist builds
25+
runs-on: linux-amd64-cpu8
26+
steps:
27+
- name: Checkout ${{ github.event.repository.name }}
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Install build tools
38+
run: pip install build
39+
40+
# Pure Python packages -- no CTK needed.
41+
- name: Build cuda.pathfinder sdist and wheel-from-sdist
42+
run: |
43+
python -m build --sdist cuda_pathfinder/
44+
pip wheel --no-deps --wheel-dir cuda_pathfinder/dist cuda_pathfinder/dist/*.tar.gz
45+
46+
- name: Build cuda-python sdist and wheel-from-sdist
47+
run: |
48+
python -m build --sdist cuda_python/
49+
pip wheel --no-deps --wheel-dir cuda_python/dist cuda_python/dist/*.tar.gz
50+
51+
# Cython packages need CTK + sccache.
52+
# The env vars ACTIONS_CACHE_SERVICE_V2, ACTIONS_RESULTS_URL, and ACTIONS_RUNTIME_TOKEN
53+
# are exposed by this action.
54+
- name: Enable sccache
55+
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
56+
with:
57+
disable_annotations: 'true'
58+
59+
# xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
60+
- name: Adding additional GHA cache-related env vars
61+
uses: actions/github-script@v8
62+
with:
63+
script: |
64+
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
65+
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
66+
67+
- name: Setup proxy cache
68+
uses: nv-gha-runners/setup-proxy-cache@main
69+
continue-on-error: true
70+
with:
71+
enable-apt: true
72+
73+
- name: Set up mini CTK
74+
uses: ./.github/actions/fetch_ctk
75+
continue-on-error: false
76+
with:
77+
host-platform: ${{ inputs.host-platform }}
78+
cuda-version: ${{ inputs.cuda-version }}
79+
80+
# cuda_bindings/setup.py parses CUDA headers at import time, so CUDA_PATH
81+
# (set by fetch_ctk) must be available for both sdist and wheel builds.
82+
- name: Build cuda.bindings sdist and wheel-from-sdist
83+
run: |
84+
export CUDA_PYTHON_PARALLEL_LEVEL=$(nproc)
85+
export CC="sccache cc"
86+
export CXX="sccache c++"
87+
export PIP_FIND_LINKS="$(pwd)/cuda_pathfinder/dist"
88+
python -m build --sdist cuda_bindings/
89+
pip wheel --no-deps --wheel-dir cuda_bindings/dist cuda_bindings/dist/*.tar.gz
90+
91+
# cuda_core sdist delegates to setuptools (no CTK needed), but
92+
# wheel-from-sdist needs CTK and cuda-bindings (dynamic build dep via
93+
# get_requires_for_build_wheel in build_hooks.py).
94+
- name: Build cuda.core sdist and wheel-from-sdist
95+
run: |
96+
export CUDA_PYTHON_PARALLEL_LEVEL=$(nproc)
97+
export CUDA_CORE_BUILD_MAJOR="$(echo '${{ inputs.cuda-version }}' | cut -d. -f1)"
98+
export CC="sccache cc"
99+
export CXX="sccache c++"
100+
export PIP_FIND_LINKS="$(pwd)/cuda_bindings/dist $(pwd)/cuda_pathfinder/dist"
101+
python -m build --sdist cuda_core/
102+
pip wheel --no-deps --wheel-dir cuda_core/dist cuda_core/dist/*.tar.gz
103+
104+
- name: Show sccache stats
105+
if: always()
106+
run: sccache --show-stats
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Windows counterpart of test-sdist-linux.yml. Exists so that platform-gated
6+
# sources (e.g. cuda_bindings/*_windows.pyx selected by build_hooks.py) are
7+
# exercised by the sdist completeness test. Keep the shape of this file in
8+
# sync with test-sdist-linux.yml aside from Windows-specific setup (MSVC,
9+
# no sccache, no proxy cache).
10+
11+
on:
12+
workflow_call:
13+
inputs:
14+
host-platform:
15+
required: true
16+
type: string
17+
cuda-version:
18+
required: true
19+
type: string
20+
21+
defaults:
22+
run:
23+
shell: bash --noprofile --norc -xeuo pipefail {0}
24+
25+
permissions:
26+
contents: read # This is required for actions/checkout
27+
28+
jobs:
29+
test-sdist:
30+
name: Test sdist builds
31+
runs-on: windows-2022
32+
steps:
33+
- name: Checkout ${{ github.event.repository.name }}
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
40+
with:
41+
python-version: "3.12"
42+
43+
- name: Set up MSVC
44+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
45+
46+
- name: Install build tools
47+
run: pip install build
48+
49+
# Pure Python packages -- no CTK needed.
50+
- name: Build cuda.pathfinder sdist and wheel-from-sdist
51+
run: |
52+
python -m build --sdist cuda_pathfinder/
53+
pip wheel --no-deps --wheel-dir cuda_pathfinder/dist cuda_pathfinder/dist/*.tar.gz
54+
55+
- name: Build cuda-python sdist and wheel-from-sdist
56+
run: |
57+
python -m build --sdist cuda_python/
58+
pip wheel --no-deps --wheel-dir cuda_python/dist cuda_python/dist/*.tar.gz
59+
60+
# Cython packages need CTK. No sccache on Windows (this is a correctness
61+
# smoke test, not a production build; see build-wheel.yml which also
62+
# limits sccache to Linux).
63+
- name: Set up mini CTK
64+
uses: ./.github/actions/fetch_ctk
65+
continue-on-error: false
66+
with:
67+
host-platform: ${{ inputs.host-platform }}
68+
cuda-version: ${{ inputs.cuda-version }}
69+
70+
# cuda_bindings/setup.py parses CUDA headers at import time, so CUDA_PATH
71+
# (set by fetch_ctk) must be available for both sdist and wheel builds.
72+
# PIP_FIND_LINKS is passed as a native Windows path via cygpath because
73+
# pip on Windows treats space-separated entries as separators and is
74+
# picky about mixed path styles (see build-wheel.yml for the same
75+
# convention).
76+
- name: Build cuda.bindings sdist and wheel-from-sdist
77+
run: |
78+
export CUDA_PYTHON_PARALLEL_LEVEL=$(nproc)
79+
export PIP_FIND_LINKS="$(cygpath -w "$(pwd)/cuda_pathfinder/dist")"
80+
python -m build --sdist cuda_bindings/
81+
pip wheel --no-deps --wheel-dir cuda_bindings/dist cuda_bindings/dist/*.tar.gz
82+
83+
# cuda_core sdist delegates to setuptools (no CTK needed), but
84+
# wheel-from-sdist needs CTK and cuda-bindings (dynamic build dep via
85+
# get_requires_for_build_wheel in build_hooks.py).
86+
- name: Build cuda.core sdist and wheel-from-sdist
87+
run: |
88+
export CUDA_PYTHON_PARALLEL_LEVEL=$(nproc)
89+
export CUDA_CORE_BUILD_MAJOR="$(echo '${{ inputs.cuda-version }}' | cut -d. -f1)"
90+
export PIP_FIND_LINKS="$(cygpath -w "$(pwd)/cuda_bindings/dist") $(cygpath -w "$(pwd)/cuda_pathfinder/dist")"
91+
python -m build --sdist cuda_core/
92+
pip wheel --no-deps --wheel-dir cuda_core/dist cuda_core/dist/*.tar.gz

ci/test-matrix.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Test matrix configurations for CUDA Python CI workflows. This file consolidates
55
# the test matrices that were previously hardcoded in the workflow files. All GPU
6-
# and ARCH values are hard-coded for each architecture: l4 GPU for amd64, a100 GPU
7-
# for arm64.
6+
# and ARCH values are hard-coded for each architecture: various GPUs for amd64,
7+
# alternating a100/l4 for arm64.
88
#
99
# Please keep the matrices sorted in ascending order by the following:
1010
#
@@ -38,23 +38,23 @@ linux:
3838
- { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
3939
# linux-aarch64
4040
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
41-
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
41+
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4242
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.2.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
43-
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
43+
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4444
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
45-
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
45+
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4646
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
47-
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
47+
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4848
- { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.2.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
49-
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
49+
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
5050
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
51-
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
51+
- { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
5252
- { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
53-
- { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
53+
- { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
5454
- { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
55-
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
55+
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
5656
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
57-
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
57+
- { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
5858
# special runners
5959
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '1', DRIVER: 'latest' }
6060
- { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.2.1', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '1', DRIVER: 'latest' }

0 commit comments

Comments
 (0)