Skip to content

Commit df5d838

Browse files
committed
merge
2 parents 8551e5b + 43decaa commit df5d838

295 files changed

Lines changed: 24398 additions & 8657 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.

.coveragerc

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33

4-
[report]
5-
show_missing = true
4+
[paths]
5+
source =
6+
cuda\
7+
cuda/
68

79
[run]
810
plugins = Cython.Coverage
911
core = ctrace
12+
branch = False
13+
relative_files = True
14+
# Omits specific definition files that causes plugin errors
15+
omit =
16+
*/windll.pxd
17+
*/_lib/windll.pxd
18+
*/_lib/utils.pxd
19+
20+
[report]
21+
show_missing = true
22+
precision = 2
23+
24+
[html]
25+
show_contexts = True

.github/RELEASE-core.md

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -123,41 +123,21 @@ Pushing the tag triggers a CI run automatically. Monitor it in the
123123

124124
## Upload wheels to PyPI
125125

126-
This is a two-stage process: first publish to TestPyPI, verify, then
127-
publish to PyPI.
128-
129-
### Stage 1: TestPyPI
126+
This is a single `CI: Release` workflow run with two sequential stages:
127+
publish to TestPyPI, then publish the same wheel set to PyPI.
130128

131129
1. Go to **Actions > CI: Release** and run the workflow with:
132130
- **Component**: `cuda-core`
133131
- **The release git tag**: `cuda-core-v0.6.0`
134-
- **The GHA run ID that generated validated artifacts**: This is the
135-
run ID of the successful tag-triggered CI run from the previous step.
136-
You can find it in the URL when viewing the run in the Actions tab
137-
(e.g. `https://github.com/NVIDIA/cuda-python/actions/runs/123456789`
138-
— the run ID is `123456789`).
139-
- **build-ctk-ver**: the `cuda.build.version` from
140-
[`ci/versions.yml`](../ci/versions.yml) (e.g. `13.1.1`)
141-
- **Which wheel index to publish to**: `testpypi`
142-
143-
2. Wait for the workflow to complete.
144-
145-
3. Verify the TestPyPI upload by installing and running tests from a
146-
checked-out copy of the repository:
147-
148-
```bash
149-
pip install -i https://test.pypi.org/simple/ \
150-
--extra-index-url https://pypi.org/simple/ \
151-
cuda-core==0.6.0
152-
cd cuda_core/tests && pytest
153-
```
154132

155-
### Stage 2: PyPI
133+
The workflow automatically looks up the successful tag-triggered CI run
134+
for the selected release tag.
156135

157-
Once TestPyPI verification passes, rerun the same workflow with:
158-
- **Which wheel index to publish to**: `pypi`
136+
2. Wait for the workflow to complete. It will:
137+
- publish the selected wheels to TestPyPI
138+
- publish the same wheel set to PyPI
159139

160-
After completion, verify:
140+
3. After completion, verify the final PyPI upload:
161141

162142
```bash
163143
pip install cuda-core==0.6.0

.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,libnvfatbin"
17+
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_cupti,libnvjitlink,libcufile,libnvfatbin"
1818
cuda-path:
1919
description: "where the CTK components will be installed to, relative to $PWD"
2020
required: false

.github/copy-pr-bot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/
66

77
enabled: true
8-
# always require manual CI triggering, ignoring signed commits
8+
# auto-sync ready PRs so CI starts immediately; keep draft PRs manual
99
auto_sync_draft: false
10-
auto_sync_ready: false
10+
auto_sync_ready: true

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
version: 2
66
updates:
7+
# GitHub Actions updates targeting the default branch (main)
78
- package-ecosystem: github-actions
89
directory: /
910
schedule:
@@ -19,3 +20,21 @@ updates:
1920
applies-to: version-updates
2021
patterns: ["*"]
2122
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/workflows/bandit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
with:
4343
args: "check --select S --ignore ${{ steps.ignore-codes.outputs.codes }} --output-format sarif --output-file results.sarif"
4444
- name: Upload SARIF file
45-
uses: github/codeql-action/upload-sarif@v4.32.4
45+
uses: github/codeql-action/upload-sarif@v4.32.5
4646
with:
4747
sarif_file: results.sarif

.github/workflows/build-docs.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ name: "CI: Build and update docs"
77
on:
88
workflow_call:
99
inputs:
10-
build-ctk-ver:
11-
type: string
12-
required: true
1310
component:
1411
description: "Component(s) to build docs for"
1512
required: false
@@ -47,18 +44,21 @@ jobs:
4744
run:
4845
shell: bash -el {0}
4946
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
5647
- name: Checkout ${{ github.event.repository.name }}
5748
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5849
with:
5950
fetch-depth: 0
6051
ref: ${{ inputs.git-tag }}
6152

53+
- name: Read build CTK version
54+
run: |
55+
BUILD_CTK_VER=$(yq '.cuda.build.version' ci/versions.yml)
56+
if [[ ! "${BUILD_CTK_VER}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
57+
echo "error: derived CTK build version ${BUILD_CTK_VER} does not match MAJOR.MINOR.MICRO" >&2
58+
exit 1
59+
fi
60+
echo "BUILD_CTK_VER=${BUILD_CTK_VER}" >> "$GITHUB_ENV"
61+
6262
# TODO: This workflow runs on GH-hosted runner and cannot use the proxy cache
6363

6464
- name: Set up miniforge
@@ -82,7 +82,7 @@ jobs:
8282
uses: ./.github/actions/fetch_ctk
8383
with:
8484
host-platform: linux-64
85-
cuda-version: ${{ inputs.build-ctk-ver }}
85+
cuda-version: ${{ env.BUILD_CTK_VER }}
8686

8787
- name: Set environment variables
8888
run: |
@@ -103,7 +103,7 @@ jobs:
103103
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
104104
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
105105
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
106-
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${{ inputs.build-ctk-ver }}-linux-64"
106+
CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${BUILD_CTK_VER}-linux-64"
107107
echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV
108108
echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
109109
echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV

.github/workflows/build-wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ jobs:
369369
370370
OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
371371
OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
372-
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s completed -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
372+
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s success -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
373373
if [[ "$LATEST_PRIOR_RUN_ID" == "" ]]; then
374374
echo "LATEST_PRIOR_RUN_ID not found!"
375375
exit 1

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ jobs:
220220
secrets: inherit
221221
uses: ./.github/workflows/build-docs.yml
222222
with:
223-
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
224223
is-release: ${{ github.ref_type == 'tag' }}
225224

226225
checks:

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@0ec47d036c68ae0cf94c629009b1029407111281 # v3.31.8
34+
uses: github/codeql-action/init@40f0fa95c41fede7b43f035cb47aac899ee0ba0a # v3.31.8
3535
with:
3636
languages: ${{ matrix.language }}
3737
build-mode: ${{ matrix.build-mode }}
3838
queries: security-extended
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@0ec47d036c68ae0cf94c629009b1029407111281 # v3.31.8
41+
uses: github/codeql-action/analyze@40f0fa95c41fede7b43f035cb47aac899ee0ba0a # v3.31.8
4242
with:
4343
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)