Skip to content

Commit 5c5b4bf

Browse files
committed
cuda.bindings: build CUDA 12 and 13 from main
1 parent ceaae51 commit 5c5b4bf

260 files changed

Lines changed: 251920 additions & 793 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/dependabot.yml‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,3 @@ updates:
2020
applies-to: version-updates
2121
patterns: ["*"]
2222
update-types: ["major", "minor", "patch"]
23-
24-
# GitHub Actions updates targeting the 12.9.x branch
25-
- package-ecosystem: github-actions
26-
directory: /
27-
target-branch: "12.9.x" # keep in sync with backport_branch in ci/versions.yml
28-
schedule:
29-
interval: "monthly"
30-
time: "09:00"
31-
timezone: "America/Los_Angeles"
32-
33-
# Keep churn down: only one open PR from this ecosystem at a time
34-
open-pull-requests-limit: 1
35-
36-
groups:
37-
actions-monthly:
38-
applies-to: version-updates
39-
patterns: ["*"]
40-
update-types: ["major", "minor", "patch"]

‎.github/labeler.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
cuda.bindings:
99
- changed-files:
10-
- any-glob-to-any-file: 'cuda_bindings/**'
10+
- any-glob-to-any-file:
11+
- 'cuda_bindings/**'
12+
- 'cuda_bindings_12/**'
1113

1214
cuda.core:
1315
- changed-files:

‎.github/workflows/backport.yml‎

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
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

5-
name: "CI: Backport the merged PR"
5+
name: "CI: Backport a pull request"
66

77
on:
8-
pull_request_target:
9-
types: [closed, labeled]
10-
branches:
11-
- main
128
workflow_dispatch:
139
inputs:
1410
backport-branch:
1511
description: "Branch to backport commits onto"
16-
required: false
12+
required: true
1713
type: string
1814
pull-request:
1915
description: "PR to backport"
@@ -26,44 +22,14 @@ permissions:
2622
pull-requests: write # so it can create pull requests
2723

2824
jobs:
29-
backport-from-pr:
30-
name: Backport directly from a pull request
31-
if: ${{ github.repository_owner == 'nvidia' &&
32-
github.event.pull_request.merged == true &&
33-
contains( github.event.pull_request.labels.*.name, 'to-be-backported')
34-
}}
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
38-
39-
- name: Load branch name
40-
id: get-branch
41-
run: |
42-
OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
43-
echo "OLD_BRANCH=${OLD_BRANCH}" >> $GITHUB_ENV
44-
45-
- name: Create backport pull requests
46-
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
47-
with:
48-
copy_assignees: true
49-
copy_labels_pattern: true
50-
copy_requested_reviewers: true
51-
target_branches: ${{ env.OLD_BRANCH }}
5225
backport-to-branch:
5326
name: Backport a specific PR against a specific branch
54-
if: github.repository_owner == 'nvidia' && github.event_name == 'workflow_dispatch'
27+
if: github.repository_owner == 'nvidia'
5528
runs-on: ubuntu-latest
5629
steps:
5730
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5831

59-
- name: Load branch from environment name
60-
if: inputs.backport-branch == null
61-
run: |
62-
BACKPORT_BRANCH=$(yq '.backport_branch' ci/versions.yml)
63-
echo "BACKPORT_BRANCH=${BRANCH}" >> $GITHUB_ENV
64-
6532
- name: Load branch name from input
66-
if: inputs.backport-branch != null
6733
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
6834

6935
- name: Create backport pull requests

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

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,16 @@ jobs:
6262

6363
- name: Read build CTK version
6464
run: |
65+
VERSION_KEY='.cuda.build.version'
66+
BINDINGS_COMPONENT_DIR='cuda_bindings'
67+
if [[ "${{ inputs.is-release }}" == "true" && "${{ inputs.git-tag }}" == v12.9.* ]]; then
68+
VERSION_KEY='.cuda.prev_build.version'
69+
BINDINGS_COMPONENT_DIR='cuda_bindings_12'
70+
fi
6571
if [[ -f ci/versions.yml ]]; then
66-
BUILD_CTK_VER=$(yq '.cuda.build.version' ci/versions.yml)
72+
BUILD_CTK_VER=$(yq "${VERSION_KEY}" ci/versions.yml)
6773
elif [[ -f ci/versions.json ]]; then
68-
BUILD_CTK_VER=$(jq -r '.cuda.build.version' ci/versions.json)
74+
BUILD_CTK_VER=$(jq -r "${VERSION_KEY}" ci/versions.json)
6975
else
7076
echo "error: cannot find ci/versions.yml or ci/versions.json" >&2
7177
exit 1
@@ -75,6 +81,7 @@ jobs:
7581
exit 1
7682
fi
7783
echo "BUILD_CTK_VER=${BUILD_CTK_VER}" >> "$GITHUB_ENV"
84+
echo "BINDINGS_COMPONENT_DIR=${BINDINGS_COMPONENT_DIR}" >> "$GITHUB_ENV"
7885
7986
# TODO: This workflow runs on GH-hosted runner and cannot use the proxy cache
8087

@@ -126,22 +133,26 @@ jobs:
126133
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${BUILD_CTK_VER}-linux-64"
127134
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
128135
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
129-
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
136+
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/${BINDINGS_COMPONENT_DIR}/dist")" >> $GITHUB_ENV
137+
echo "CUDA_PYTHON_ARTIFACT_NAME=cuda-python-wheel-cuda${BUILD_CTK_VER}" >> $GITHUB_ENV
130138
131139
- name: Download cuda-python build artifacts
140+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-python' }}
132141
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
133142
with:
134-
name: cuda-python-wheel
143+
name: ${{ env.CUDA_PYTHON_ARTIFACT_NAME }}
135144
path: .
136145
run-id: ${{ inputs.run-id }}
137146
github-token: ${{ github.token }}
138147

139148
- name: Display structure of downloaded cuda-python artifacts
149+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-python' }}
140150
run: |
141151
pwd
142152
ls -lahR .
143153
144154
- name: Download cuda-pathfinder build artifacts
155+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-pathfinder' || inputs.component == 'cuda-core' }}
145156
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
146157
with:
147158
name: cuda-pathfinder-wheel
@@ -150,6 +161,7 @@ jobs:
150161
github-token: ${{ github.token }}
151162

152163
- name: Display structure of downloaded cuda-pathfinder artifacts
164+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-pathfinder' || inputs.component == 'cuda-core' }}
153165
run: |
154166
pwd
155167
ls -lahR cuda_pathfinder
@@ -162,7 +174,7 @@ jobs:
162174
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
163175

164176
- name: Download cuda.bindings build artifacts
165-
if: ${{ inputs.is-release }}
177+
if: ${{ inputs.is-release && (inputs.component == 'all' || inputs.component == 'cuda-bindings' || inputs.component == 'cuda-core') }}
166178
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
167179
with:
168180
pattern: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
@@ -172,6 +184,7 @@ jobs:
172184
github-token: ${{ github.token }}
173185

174186
- name: Display structure of downloaded cuda.bindings artifacts
187+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-bindings' || inputs.component == 'cuda-core' }}
175188
run: |
176189
pwd
177190
ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR
@@ -184,7 +197,7 @@ jobs:
184197
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
185198

186199
- name: Download cuda.core build artifacts
187-
if: ${{ inputs.is-release }}
200+
if: ${{ inputs.is-release && (inputs.component == 'all' || inputs.component == 'cuda-core') }}
188201
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
189202
with:
190203
pattern: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
@@ -194,26 +207,37 @@ jobs:
194207
github-token: ${{ github.token }}
195208

196209
- name: Display structure of downloaded cuda.core build artifacts
210+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-core' }}
197211
run: |
198212
pwd
199213
ls -lahR $CUDA_CORE_ARTIFACTS_DIR
200214
201-
- name: Install all packages
215+
- name: Install cuda-pathfinder
216+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-pathfinder' || inputs.component == 'cuda-core' }}
202217
run: |
203218
pushd cuda_pathfinder
204219
pip install *.whl
205220
popd
206221
222+
- name: Install cuda.bindings
223+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-bindings' || inputs.component == 'cuda-core' }}
224+
run: |
207225
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
208226
pip install *.whl
209227
popd
210228
229+
- name: Install cuda.core
230+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-core' }}
231+
run: |
211232
pushd "${CUDA_CORE_ARTIFACTS_DIR}"
212233
pip install *.whl
213234
popd
214235
215-
# Subpackages are already installed from CI artifacts above.
216-
# --no-deps avoids re-resolving cuda-core from PyPI during tag releases.
236+
- name: Install cuda-python
237+
if: ${{ !inputs.is-release || inputs.component == 'all' || inputs.component == 'cuda-python' }}
238+
run: |
239+
# Documentation builds do not exercise runtime dependencies.
240+
# --no-deps also avoids resolving artifacts absent from focused tag runs.
217241
pip install --no-deps cuda_python*.whl
218242
219243
# This step sets the PR_NUMBER/BUILD_LATEST/BUILD_PREVIEW env vars.
@@ -246,6 +270,9 @@ jobs:
246270
if: ${{ inputs.component != 'all' }}
247271
run: |
248272
COMPONENT=$(echo "${{ inputs.component }}" | tr '-' '_')
273+
if [[ "${{ inputs.component }}" == "cuda-bindings" ]]; then
274+
COMPONENT="${BINDINGS_COMPONENT_DIR}"
275+
fi
249276
pushd ${COMPONENT}/docs/
250277
if [[ "${{ inputs.is-release }}" == "false" ]]; then
251278
./build_docs.sh latest-only

0 commit comments

Comments
 (0)