Skip to content

Commit a368e0f

Browse files
committed
Merge origin/main into runtime-version-check
2 parents 4f20ae0 + b4a72c0 commit a368e0f

83 files changed

Lines changed: 5303 additions & 1456 deletions

Some content is hidden

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

‎.gitattributes‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ cuda/_version.py export-subst
66
# we do not own any headers checked in, don't touch them
77
*.h binary
88
*.hpp binary
9-
# Exception: headers we own (cuda_core C++ implementation)
9+
# Exception: headers we own
10+
cuda_bindings/cuda/bindings/_bindings/*.h -binary text diff
11+
cuda_bindings/cuda/bindings/_lib/*.h -binary text diff
1012
cuda_core/cuda/core/_cpp/*.h -binary text diff
1113
cuda_core/cuda/core/_cpp/*.hpp -binary text diff
1214
# git should not convert line endings in PNG files

‎.github/actions/fetch_ctk/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
cuda-components:
1515
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
1616
required: false
17-
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,libnvjitlink,libcufile"
17+
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,libnvjitlink,libcufile,libnvfatbin"
1818
cuda-path:
1919
description: "where the CTK components will be installed to, relative to $PWD"
2020
required: false

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
run:
4848
shell: bash -el {0}
4949
steps:
50+
- name: validate build-ctk
51+
run: |
52+
if [ ! "${{ inputs.build-ctk-ver }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]; then
53+
echo "error: `build-ctk-ver` ${{ inputs.build-ctk-ver }} version does not match MAJOR.MINOR.MICRO" >&2
54+
exit 1
55+
fi
5056
- name: Checkout ${{ github.event.repository.name }}
5157
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5258
with:

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ jobs:
6262
echo "skip=${skip}" >> "$GITHUB_OUTPUT"
6363
echo "doc_only=${doc_only}" >> "$GITHUB_OUTPUT"
6464
65-
# WARNING: make sure all of the build jobs are in sync
65+
# NOTE: Build jobs are intentionally split by platform rather than using a single
66+
# matrix. This allows each test job to depend only on its corresponding build,
67+
# so faster platforms can proceed through build & test without waiting for slower
68+
# ones. Keep these job definitions textually identical except for:
69+
# - host-platform value
70+
# - if: condition (build-linux-64 omits doc-only check since it's needed for docs)
6671
build-linux-64:
6772
needs:
6873
- ci-vars
@@ -81,7 +86,7 @@ jobs:
8186
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
8287
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
8388

84-
# WARNING: make sure all of the build jobs are in sync
89+
# See build-linux-64 for why build jobs are split by platform.
8590
build-linux-aarch64:
8691
needs:
8792
- ci-vars
@@ -100,7 +105,7 @@ jobs:
100105
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
101106
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
102107

103-
# WARNING: make sure all of the build jobs are in sync
108+
# See build-linux-64 for why build jobs are split by platform.
104109
build-windows:
105110
needs:
106111
- ci-vars
@@ -119,7 +124,11 @@ jobs:
119124
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
120125
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
121126

122-
# WARNING: make sure both Linux test jobs are in sync
127+
# NOTE: Test jobs are split by platform for the same reason as build jobs (see
128+
# build-linux-64). Keep these job definitions textually identical except for:
129+
# - host-platform value
130+
# - build job under needs:
131+
# - uses: (test-wheel-linux.yml vs test-wheel-windows.yml)
123132
test-linux-64:
124133
strategy:
125134
fail-fast: false
@@ -141,21 +150,20 @@ jobs:
141150
host-platform: ${{ matrix.host-platform }}
142151
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
143152

144-
# WARNING: make sure both Linux test jobs are in sync
153+
# See test-linux-64 for why test jobs are split by platform.
145154
test-linux-aarch64:
146155
strategy:
147156
fail-fast: false
148157
matrix:
149158
host-platform:
150159
- linux-aarch64
151160
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.
154-
if: ${{ github.repository_owner == 'nvidia' }}
161+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
155162
permissions:
156163
contents: read # This is required for actions/checkout
157164
needs:
158165
- ci-vars
166+
- should-skip
159167
- build-linux-aarch64
160168
secrets: inherit
161169
uses: ./.github/workflows/test-wheel-linux.yml
@@ -164,20 +172,20 @@ jobs:
164172
host-platform: ${{ matrix.host-platform }}
165173
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
166174

175+
# See test-linux-64 for why test jobs are split by platform.
167176
test-windows:
168177
strategy:
169178
fail-fast: false
170179
matrix:
171180
host-platform:
172181
- win-64
173182
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.
176-
if: ${{ github.repository_owner == 'nvidia' }}
183+
if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
177184
permissions:
178185
contents: read # This is required for actions/checkout
179186
needs:
180187
- ci-vars
188+
- should-skip
181189
- build-windows
182190
secrets: inherit
183191
uses: ./.github/workflows/test-wheel-windows.yml

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
needs:
136136
- check-tag
137137
- determine-run-id
138+
- doc
138139
secrets: inherit
139140
uses: ./.github/workflows/release-upload.yml
140141
with:
@@ -148,6 +149,7 @@ jobs:
148149
needs:
149150
- check-tag
150151
- determine-run-id
152+
- doc
151153
environment:
152154
name: ${{ inputs.wheel-dst }}
153155
url: https://${{ (inputs.wheel-dst == 'testpypi' && 'test.') || '' }}pypi.org/p/${{ inputs.component }}/

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ jobs:
5757
# Read base matrix from YAML file for the specific architecture
5858
TEST_MATRIX=$(yq -o json ".linux[\"${MATRIX_TYPE}\"] | map(select(.ARCH == \"${ARCH}\"))" ci/test-matrix.yml)
5959
60-
# Add special runner for amd64 if applicable
61-
if [[ "${ARCH}" == "amd64" ]]; then
62-
SPECIAL_RUNNERS=$(yq -o json '.linux.special_runners.amd64' ci/test-matrix.yml)
63-
TEST_MATRIX=$(echo "$TEST_MATRIX" | yq -o json ". + $SPECIAL_RUNNERS")
64-
fi
65-
6660
# Apply matrix filter and wrap in include structure
6761
MATRIX=$(echo "$TEST_MATRIX" | jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end')
6862
@@ -73,12 +67,12 @@ jobs:
7367
echo "OLD_BRANCH=${OLD_BRANCH}" >> "$GITHUB_OUTPUT"
7468
7569
test:
76-
name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}, ${{ matrix.GPU }}
70+
name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}, ${{ matrix.GPU }}${{ matrix.GPU_COUNT != '1' && format('(x{0})', matrix.GPU_COUNT) || '' }}
7771
needs: compute-matrix
7872
strategy:
7973
fail-fast: false
8074
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
81-
runs-on: "linux-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-1"
75+
runs-on: "linux-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
8276
# The build stage could fail but we want the CI to keep moving.
8377
if: ${{ github.repository_owner == 'nvidia' && !cancelled() }}
8478
# Our self-hosted runners require a container
@@ -269,17 +263,15 @@ jobs:
269263
- name: Ensure cuda-python installable
270264
run: |
271265
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
272-
pip install cuda_python*.whl
266+
pip install --only-binary=:all: cuda_python*.whl
273267
else
274-
pip install $(ls cuda_python*.whl)[all]
268+
pip install --only-binary=:all: $(ls cuda_python*.whl)[all]
275269
fi
276270
277271
- name: Install cuda.pathfinder extra wheels for testing
278272
run: |
279273
set -euo pipefail
280274
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).
283275
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
284276
pip list
285277
popd

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
6868
if: ${{ github.repository_owner == 'nvidia' && !cancelled() }}
69-
runs-on: "windows-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-1"
69+
runs-on: "windows-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
7070
steps:
7171
- name: Checkout ${{ github.event.repository.name }}
7272
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -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

‎.pre-commit-config.yaml‎

Lines changed: 3 additions & 1 deletion
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

@@ -30,6 +30,7 @@ repos:
3030
additional_dependencies:
3131
- https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl
3232
exclude: '.*pixi\.lock'
33+
args: ["--fix"]
3334

3435
- id: no-markdown-in-docs-source
3536
name: Prevent markdown files in docs/source directories
@@ -89,5 +90,6 @@ repos:
8990
args: [--no-pycodestyle]
9091
exclude: ^cuda_bindings/
9192

93+
9294
default_language_version:
9395
python: python3

‎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)