Skip to content

Commit 7a9783a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cuda.core.system-system2
2 parents 2293660 + 8725e96 commit 7a9783a

38 files changed

Lines changed: 941 additions & 1105 deletions

.github/workflows/backport.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,25 @@ on:
99
types: [closed, labeled]
1010
branches:
1111
- main
12+
workflow_dispatch:
13+
inputs:
14+
backport-branch:
15+
description: "Branch to backport commits onto"
16+
required: false
17+
type: string
18+
pull-request:
19+
description: "PR to backport"
20+
required: true
21+
type: number
22+
1223

1324
permissions:
1425
contents: write # so it can comment
1526
pull-requests: write # so it can create pull requests
1627

1728
jobs:
18-
backport:
19-
name: Backport pull request
29+
backport-from-pr:
30+
name: Backport directly from a pull request
2031
if: ${{ github.repository_owner == 'nvidia' &&
2132
github.event.pull_request.merged == true &&
2233
contains( github.event.pull_request.labels.*.name, 'to-be-backported')
@@ -38,3 +49,28 @@ jobs:
3849
copy_labels_pattern: true
3950
copy_requested_reviewers: true
4051
target_branches: ${{ env.OLD_BRANCH }}
52+
backport-to-branch:
53+
name: Backport a specific PR against a specific branch
54+
if: github.repository_owner == 'nvidia' && github.event_name == 'workflow_dispatch'
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
58+
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+
65+
- name: Load branch name from input
66+
if: inputs.backport-branch != null
67+
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
68+
69+
- name: Create backport pull requests
70+
uses: korthout/backport-action@c656f5d5851037b2b38fb5db2691a03fa229e3b2 # v4.0.1
71+
with:
72+
copy_assignees: true
73+
copy_labels_pattern: true
74+
copy_requested_reviewers: true
75+
target_branches: ${{ env.BACKPORT_BRANCH }}
76+
source_pr_number: ${{ inputs.pull-request }}

.github/workflows/ci.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
outputs:
4242
skip: ${{ steps.get-should-skip.outputs.skip }}
43+
doc-only: ${{ steps.get-should-skip.outputs.doc_only }}
4344
steps:
4445
- name: Checkout repository
4546
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -50,11 +51,16 @@ jobs:
5051
run: |
5152
set -euxo pipefail
5253
if ${{ startsWith(github.ref_name, 'pull-request/') }}; then
53-
skip="$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title | contains("[no-ci]")')"
54+
pr_number="$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')"
55+
pr_title="$(gh pr view "${pr_number}" --json title --jq '.title')"
56+
skip="$(echo "${pr_title}" | grep -q '\[no-ci\]' && echo true || echo false)"
57+
doc_only="$(echo "${pr_title}" | grep -q '\[doc-only\]' && echo true || echo false)"
5458
else
5559
skip=false
60+
doc_only=false
5661
fi
5762
echo "skip=${skip}" >> "$GITHUB_OUTPUT"
63+
echo "doc_only=${doc_only}" >> "$GITHUB_OUTPUT"
5864
5965
# WARNING: make sure all of the build jobs are in sync
6066
build-linux-64:
@@ -86,7 +92,7 @@ jobs:
8692
host-platform:
8793
- linux-aarch64
8894
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
89-
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
95+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
9096
secrets: inherit
9197
uses: ./.github/workflows/build-wheel.yml
9298
with:
@@ -105,7 +111,7 @@ jobs:
105111
host-platform:
106112
- win-64
107113
name: Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
108-
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
114+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
109115
secrets: inherit
110116
uses: ./.github/workflows/build-wheel.yml
111117
with:
@@ -121,11 +127,12 @@ jobs:
121127
host-platform:
122128
- linux-64
123129
name: Test ${{ matrix.host-platform }}
124-
if: ${{ github.repository_owner == 'nvidia' }}
130+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
125131
permissions:
126132
contents: read # This is required for actions/checkout
127133
needs:
128134
- ci-vars
135+
- should-skip
129136
- build-linux-64
130137
secrets: inherit
131138
uses: ./.github/workflows/test-wheel-linux.yml
@@ -142,6 +149,8 @@ jobs:
142149
host-platform:
143150
- linux-aarch64
144151
name: Test ${{ matrix.host-platform }}
152+
# Note: No doc-only check needed here - if build-linux-aarch64 is skipped,
153+
# this job is automatically skipped due to the dependency.
145154
if: ${{ github.repository_owner == 'nvidia' }}
146155
permissions:
147156
contents: read # This is required for actions/checkout
@@ -162,6 +171,8 @@ jobs:
162171
host-platform:
163172
- win-64
164173
name: Test ${{ matrix.host-platform }}
174+
# Note: No doc-only check needed here - if build-windows is skipped,
175+
# this job is automatically skipped due to the dependency.
165176
if: ${{ github.repository_owner == 'nvidia' }}
166177
permissions:
167178
contents: read # This is required for actions/checkout
@@ -196,6 +207,7 @@ jobs:
196207
if: always()
197208
runs-on: ubuntu-latest
198209
needs:
210+
- should-skip
199211
- test-linux-64
200212
- test-linux-aarch64
201213
- test-windows
@@ -219,11 +231,18 @@ jobs:
219231
# failing job(s) will timeout causing a cancellation here and the
220232
# build to succeed which we don't want (originally this was just
221233
# 'exit 0')
222-
if ${{ needs.test-linux-64.result == 'cancelled' ||
223-
needs.test-linux-aarch64.result == 'cancelled' ||
224-
needs.test-windows.result == 'cancelled' ||
225-
needs.doc.result == 'cancelled' }}; then
234+
#
235+
# Note: When [doc-only] is in PR title, test jobs are intentionally
236+
# skipped and should not cause failure.
237+
doc_only=${{ needs.should-skip.outputs.doc-only }}
238+
if ${{ needs.doc.result == 'cancelled' }}; then
226239
exit 1
227-
else
228-
exit 0
229240
fi
241+
if [[ "${doc_only}" != "true" ]]; then
242+
if ${{ needs.test-linux-64.result == 'cancelled' ||
243+
needs.test-linux-aarch64.result == 'cancelled' ||
244+
needs.test-windows.result == 'cancelled' }}; then
245+
exit 1
246+
fi
247+
fi
248+
exit 0

.github/workflows/test-wheel-linux.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,15 @@ jobs:
269269
- name: Ensure cuda-python installable
270270
run: |
271271
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
272-
pip install cuda_python*.whl
272+
pip install --only-binary=:all: cuda_python*.whl
273273
else
274-
pip install $(ls cuda_python*.whl)[all]
274+
pip install --only-binary=:all: $(ls cuda_python*.whl)[all]
275275
fi
276276
277277
- name: Install cuda.pathfinder extra wheels for testing
278278
run: |
279279
set -euo pipefail
280280
pushd cuda_pathfinder
281-
# Install pathfinder from the pre-built wheel, since building from
282-
# source won't work in this context (we don't have a git checkout).
283281
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
284282
pip list
285283
popd

.github/workflows/test-wheel-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,16 @@ jobs:
236236
- name: Ensure cuda-python installable
237237
run: |
238238
if ('${{ matrix.LOCAL_CTK }}' -eq '1') {
239-
pip install (Get-ChildItem -Filter cuda_python*.whl).FullName
239+
pip install --only-binary=:all: (Get-ChildItem -Filter cuda_python*.whl).FullName
240240
} else {
241-
pip install "$((Get-ChildItem -Filter cuda_python*.whl).FullName)[all]"
241+
pip install --only-binary=:all: "$((Get-ChildItem -Filter cuda_python*.whl).FullName)[all]"
242242
}
243243
244244
- name: Install cuda.pathfinder extra wheels for testing
245245
shell: bash --noprofile --norc -xeuo pipefail {0}
246246
run: |
247247
pushd cuda_pathfinder
248-
pip install --only-binary=:all: -v . --group "test-cu${TEST_CUDA_MAJOR}"
248+
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
249249
pip list
250250
popd
251251

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CUDA Python is the home for accessing NVIDIA’s CUDA platform from Python. It c
1313
* [nvshmem4py](https://docs.nvidia.com/nvshmem/api/api/language_bindings/python/index.html): Pythonic interface to the NVSHMEM library, enabling Python applications to leverage NVSHMEM's high-performance PGAS (Partitioned Global Address Space) programming model for GPU-accelerated computing
1414
* [Nsight Python](https://docs.nvidia.com/nsight-python/index.html): Python kernel profiling interface that automates performance analysis across multiple kernel configurations using NVIDIA Nsight Tools
1515
* [CUPTI Python](https://docs.nvidia.com/cupti-python/): Python APIs for creation of profiling tools that target CUDA Python applications via the CUDA Profiling Tools Interface (CUPTI)
16+
* [Accelerated Computing Hub](https://github.com/NVIDIA/accelerated-computing-hub): Open-source learning materials related to GPU computing. You will find user guides, tutorials, and other works freely available for all learners interested in GPU computing.
1617

1718
CUDA Python is currently undergoing an overhaul to improve existing and introduce new components. All of the previously available functionality from the `cuda-python` package will continue to be available, please refer to the [cuda.bindings](https://nvidia.github.io/cuda-python/cuda-bindings/latest) documentation for installation guide and further detail.
1819

0 commit comments

Comments
 (0)