Skip to content

Commit 076afd4

Browse files
authored
Merge branch 'main' into 109-benchmarks
2 parents 0e2e5f0 + 1ac7d2c commit 076afd4

File tree

118 files changed

+28782
-6740
lines changed

Some content is hidden

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

118 files changed

+28782
-6740
lines changed
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
name: Release Checklist
2-
description: Release managers need to go through this check list and ensure all tasks are done
2+
description: Public checklist for release managers making a subpackage release
3+
labels: ["P0"]
4+
35
body:
46
- type: markdown
57
attributes:
68
value: |
7-
Please go through this checklist and ensure all tasks are completed.
8-
9-
- type: checkboxes
10-
id: cuda-bindings-tasks
11-
attributes:
12-
label: Tasks for cuda-bindings / cuda-python release
13-
options:
14-
- label: "Push any internal updates for accommodating a new CTK release to the public (**IMPORTANT**: Need to wait for CTK posting!)"
15-
- label: "If it is a major release, create a new branch to backport to and update the branch name [here](../BACKPORT_BRANCH)"
16-
- label: Follow the check list for `cuda-core` below for the remaining steps
9+
This checklist is for cuda-core releases as well as cuda-bindings patches. Please go through this checklist and ensure all tasks are completed.
1710
1811
- type: checkboxes
19-
id: cuda-core-tasks
12+
id: subpackage-tasks
2013
attributes:
21-
label: Tasks for cuda-core release
14+
label: Tasks for cuda-core and cuda-bindings patch release
2215
options:
2316
- label: File an internal nvbug to communicate test plan & release schedule with QA
2417
- label: Ensure all pending PRs are reviewed, tested, and merged
25-
- label: Update the dependency requirements, if needed
18+
- label: Check (or update if needed) the dependency requirements
2619
- label: Bump the version
2720
- label: Create a public rc tag
2821
- label: "Point QA to fetch public artifacts (wheels) from the GHA run ID, example: `gh run download 12323257563 -p \"cuda-core*\" -R NVIDIA/cuda-python`"
2922
- label: Wait for QA reports and fix any issues found
30-
- label: Finalize the doc update, including release notes
23+
- label: "Finalize the doc update, including release notes (\"Note: Touching docstrings/type annotations in code is OK during code freeze, apply your best judgement!\")"
3124
- label: Update the docs for the new version
3225
- label: Create a public release tag
3326
- label: If any code change happens, rebuild the wheels from the new tag
27+
- label: Update the conda recipe & release conda packages
28+
- label: Upload conda packages to nvidia channel
3429
- label: Upload wheels to PyPI
30+
- label: Post-release QA
3531
- label: Finalize the announcement update
3632
- label: Send out the announcement internally
3733
- label: Send out the announcement externally (GitHub Release -> Announcement)
38-
- label: Update the conda recipe & release conda packages
39-
- label: Post-release QA
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Preview or clean up docs built from PRs
2+
3+
# A re-implementation based on the logic of https://github.com/rossjrw/pr-preview-action/blob/41a957c44a456a34718e9bcf825363194db5e6d5/README.md, due to limitations illustrated in NVIDIA/cuda-python#380.
4+
5+
inputs:
6+
source-folder:
7+
required: true
8+
type: string
9+
pr-number:
10+
required: true
11+
type: string
12+
13+
runs:
14+
using: composite
15+
steps:
16+
# The steps below are executed only when testing in a PR.
17+
# Note: the PR previews will be removed once merged to main (see below)
18+
- name: Deploy doc preview
19+
if: ${{ github.ref_name != 'main' }}
20+
uses: JamesIves/github-pages-deploy-action@v4
21+
with:
22+
git-config-name: cuda-python-bot
23+
git-config-email: cuda-python-bot@users.noreply.github.com
24+
folder: ${{ inputs.source-folder }}
25+
target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/
26+
commit-message: "Deploy doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
27+
28+
- name: Leave a comment after deployment
29+
if: ${{ github.ref_name != 'main' }}
30+
uses: marocchino/sticky-pull-request-comment@v2
31+
with:
32+
header: pr-preview
33+
number: ${{ inputs.pr-number }}
34+
skip_unchanged: true
35+
message: |
36+
Doc Preview CI
37+
:---:
38+
| <p></p> :rocket: View preview at <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/ <br>
39+
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-core/ <br>
40+
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-bindings/ <br><br>
41+
| <h6><br> Preview will be ready when the GitHub Pages deployment is complete. <br><br></h6>
42+
43+
# The steps below are executed only when building on main.
44+
- name: Remove doc preview
45+
if: ${{ github.ref_name == 'main' }}
46+
uses: JamesIves/github-pages-deploy-action@v4
47+
with:
48+
git-config-name: cuda-python-bot
49+
git-config-email: cuda-python-bot@users.noreply.github.com
50+
folder: ${{ inputs.source-folder }}
51+
target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/
52+
commit-message: "Clean up doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
53+
54+
- name: Leave a comment after removal
55+
if: ${{ github.ref_name == 'main' }}
56+
uses: marocchino/sticky-pull-request-comment@v2
57+
with:
58+
header: pr-preview
59+
number: ${{ inputs.pr-number }}
60+
hide_and_recreate: true
61+
hide_classify: "OUTDATED"
62+
message: |
63+
Doc Preview CI
64+
:---:
65+
Preview removed because the pull request was closed or merged.

.github/actions/fetch_ctk/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ runs:
123123
echo "CUDA_PATH=${CUDA_PATH}" >> $GITHUB_ENV
124124
echo "CUDA_HOME=${CUDA_PATH}" >> $GITHUB_ENV
125125
echo "${CUDA_PATH}/bin" >> $GITHUB_PATH
126-
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:${CUDA_PATH}/lib" >> $GITHUB_ENV
126+
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:${CUDA_PATH}/lib:${CUDA_PATH}/nvvm/lib64" >> $GITHUB_ENV
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Get the PR number
2+
3+
description: Get the PR number without relying on the pull_request* event triggers.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Get PR info (non-main branch)
9+
if: ${{ github.ref_name != 'main' }}
10+
uses: nv-gha-runners/get-pr-info@main
11+
id: get-pr-info
12+
13+
- name: Extract PR number (non-main branch)
14+
if: ${{ github.ref_name != 'main' }}
15+
shell: bash --noprofile --norc -xeuo pipefail {0}
16+
run: |
17+
trap 'echo "Error at line $LINENO"; exit 1' ERR
18+
PR_NUMBER="${{ fromJSON(steps.get-pr-info.outputs.pr-info).number }}"
19+
if [[ -z "$PR_NUMBER" ]]; then
20+
echo "Cannot extract PR number for ref: ${{ github.ref_name }}"
21+
exit 1
22+
fi
23+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
24+
echo "BUILD_PREVIEW=1" >> $GITHUB_ENV
25+
26+
- name: Get PR data (main branch)
27+
if: ${{ github.ref_name == 'main' }}
28+
uses: actions/github-script@v7
29+
id: get-pr-data
30+
with:
31+
script: |
32+
const prs = await github.rest.repos.listPullRequestsAssociatedWithCommit({
33+
commit_sha: context.sha,
34+
owner: context.repo.owner,
35+
repo: context.repo.repo,
36+
});
37+
if (!prs.data.length) {
38+
core.setFailed("No PR associated with this commit on 'main'.");
39+
} else {
40+
return prs.data[0];
41+
}
42+
43+
- name: Extract PR number (main branch)
44+
if: ${{ github.ref_name == 'main' }}
45+
shell: bash --noprofile --norc -xeuo pipefail {0}
46+
run: |
47+
trap 'echo "Error at line $LINENO"; exit 1' ERR
48+
PR_NUMBER="${{ fromJSON(steps.get-pr-data.outputs.result).number }}"
49+
if [[ -z "$PR_NUMBER" ]]; then
50+
echo "No associated PR found for the commit in 'main'."
51+
exit 1
52+
fi
53+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
54+
echo "BUILD_LATEST=1" >> $GITHUB_ENV

.github/workflows/build-and-test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- "3.9"
3232
cuda-version:
3333
# Note: this is for build-time only.
34-
- "12.6.2"
34+
- "12.8.0"
3535
name: Build (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }})
3636
if: ${{ github.repository_owner == 'nvidia' }}
3737
permissions:
@@ -76,7 +76,7 @@ jobs:
7676
REPO_DIR=$(cygpath -w $PWD)
7777
fi
7878
79-
echo "PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV
79+
echo "CUDA_BINDINGS_PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV
8080
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-${{ matrix.host-platform }}"
8181
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
8282
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${{ github.sha }}" >> $GITHUB_ENV
@@ -139,10 +139,10 @@ jobs:
139139
# CIBW mounts the host filesystem under /host
140140
CIBW_ENVIRONMENT_LINUX: >
141141
CUDA_PATH=/host/${{ env.CUDA_PATH }}
142-
PARALLEL_LEVEL=${{ env.PARALLEL_LEVEL }}
142+
CUDA_BINDINGS_PARALLEL_LEVEL=${{ env.CUDA_BINDINGS_PARALLEL_LEVEL }}
143143
CIBW_ENVIRONMENT_WINDOWS: >
144144
CUDA_HOME="$(cygpath -w ${{ env.CUDA_PATH }})"
145-
PARALLEL_LEVEL=${{ env.PARALLEL_LEVEL }}
145+
CUDA_BINDINGS_PARALLEL_LEVEL=${{ env.CUDA_BINDINGS_PARALLEL_LEVEL }}
146146
with:
147147
package-dir: ./cuda_bindings/
148148
output-dir: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -157,10 +157,9 @@ jobs:
157157
$CHOWN -R $(whoami) ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
158158
ls -lahR ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
159159
160-
# TODO: enable this after NVIDIA/cuda-python#297 is resolved
161-
# - name: Check cuda.bindings wheel
162-
# run: |
163-
# twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
160+
- name: Check cuda.bindings wheel
161+
run: |
162+
twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
164163
165164
- name: Upload cuda.bindings build artifacts
166165
uses: actions/upload-artifact@v4
@@ -221,7 +220,7 @@ jobs:
221220
- "3.9"
222221
cuda-version:
223222
# Note: this is for test-time only.
224-
- "12.6.2"
223+
- "12.8.0"
225224
- "12.0.1"
226225
- "11.8.0"
227226
local-ctk:
@@ -236,7 +235,7 @@ jobs:
236235
include:
237236
- host-platform: linux-64
238237
python-version: "3.12"
239-
cuda-version: "12.6.2"
238+
cuda-version: "12.8.0"
240239
local-ctk: 1
241240
runner: H100
242241
name: Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }}, ${{ (matrix.local-ctk == '1' && 'local CTK') || 'CTK wheels' }})
@@ -263,6 +262,7 @@ jobs:
263262
permissions:
264263
id-token: write
265264
contents: write
265+
pull-requests: write
266266
needs:
267267
- build
268268
secrets: inherit

0 commit comments

Comments
 (0)