Skip to content

Commit e04d1b9

Browse files
committed
Merge remote-tracking branch 'upstream/main' into annotation-typing
2 parents d857f4d + 5078fe6 commit e04d1b9

243 files changed

Lines changed: 22892 additions & 14538 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.

‎.coderabbit.yaml‎

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
language: en-US
5+
tone_instructions: |
6+
Be direct, technical, brief. No praise, emojis, headings, or collapsible menus.
7+
Start each comment with one prefix:
8+
- suggestion: optional improvement;
9+
- important: must-fix/high-impact risk;
10+
- critical: blocking correctness/security/data-loss.
11+
12+
reviews:
13+
profile: chill
14+
15+
high_level_summary: true
16+
high_level_summary_in_walkthrough: true
17+
poem: false
18+
in_progress_fortune: false
19+
sequence_diagrams: false
20+
estimate_code_review_effort: false
21+
collapse_walkthrough: true
22+
23+
# Reduce noisy status/details sections.
24+
request_changes_workflow: false
25+
review_status: false
26+
review_details: false
27+
enable_prompt_for_ai_agents: false
28+
29+
auto_review:
30+
enabled: true
31+
drafts: false
32+
base_branches:
33+
- "^main$"
34+
ignore_usernames:
35+
- "copy-pr-bot[bot]"
36+
- "dependabot[bot]"
37+
- "github-actions[bot]"
38+
39+
tools:
40+
gitleaks:
41+
enabled: false
42+
markdownlint:
43+
enabled: false
44+
shellcheck:
45+
enabled: false
46+
47+
# Keep Autofix available, but disable the other finishing touch actions.
48+
finishing_touches:
49+
docstrings:
50+
enabled: false
51+
unit_tests:
52+
enabled: false
53+
simplify:
54+
enabled: false
55+
56+
pre_merge_checks:
57+
docstrings:
58+
mode: "off"
59+
title:
60+
mode: "off"
61+
description:
62+
mode: "off"
63+
issue_assessment:
64+
mode: "off"
65+
custom_checks: []
66+
67+
path_instructions:
68+
- path: "cuda_bindings/**/*"
69+
instructions: |
70+
Focus on Cython binding correctness, API and ABI stability, error-code propagation,
71+
resource ownership and reference counting, GIL handling, cross-platform behavior.
72+
Avoid style-only comments already covered by pre-commit.
73+
74+
- path: "cuda_core/**/*"
75+
instructions: |
76+
Focus on Python API stability, stream ordering, CUDA resource lifetime and ownership, CUDA Array Interface
77+
compatibility, host/device memory semantics, error translation, and free-threading correctness. Check that
78+
public behavior changes have corresponding tests, documentation and release notes. Avoid style-only comments
79+
already covered by pre-commit.
80+
81+
- path: "cuda_pathfinder/**/*"
82+
instructions: |
83+
Focus on deterministic path resolution across Linux and Windows, wheel and conda layouts, dynamic-library
84+
loading and cache semantics, and explicit behavior when the CUDA Toolkit is missing or partially installed.
85+
Check that errors preserve the package's public exception contracts.
86+
87+
- path: "cuda_python/**/*"
88+
instructions: |
89+
Focus on metapackage correctness, dependency and version pins, wheel and sdist contents, and documentation
90+
aggregation. Keep runtime functionality in the component packages and verify that packaging changes preserve
91+
compatibility among cuda-python, cuda-bindings, cuda-core, and cuda-pathfinder.
92+
93+
- path: "benchmarks/**/*"
94+
instructions: |
95+
Check that benchmark changes measure meaningful workloads, keep comparison axes and benchmark identifiers
96+
comparable, avoid excessive runtime, and preserve useful comparison data.
97+
98+
- path: "ci/**/*"
99+
instructions: |
100+
For CI and build scripts, focus on matrix correctness, the GPU-versus-CPU job split, targeted build and test
101+
behavior, cache and artifact handling, environment setup, clear failure modes, and avoiding unnecessary
102+
expensive jobs.
103+
104+
- path: ".github/**/*"
105+
instructions: |
106+
For GitHub workflows and repository automation, focus on least-privilege permissions, event triggers, matrix
107+
generation, status and check behavior, security boundaries, and avoiding unnecessary CI fanout.
108+
109+
- path: "**/*.pyx"
110+
instructions: |
111+
Focus on typed-memoryview safety, GIL and nogil correctness, exception specifications, fused-type behavior,
112+
Python reference ownership, and consistency with related declarations and generated type stubs.
113+
114+
- path: "**/*.pxd"
115+
instructions: |
116+
Focus on declaration and implementation consistency, typed-memoryview safety, GIL and nogil correctness,
117+
exception specifications, fused-type behavior, and API or ABI impact on Cython consumers.
118+
119+
knowledge_base:
120+
opt_out: false
121+
code_guidelines:
122+
filePatterns:
123+
- "AGENTS.md"
124+
- "CONTRIBUTING.md"
125+
- "cuda_bindings/AGENTS.md"
126+
- "cuda_core/AGENTS.md"
127+
- "cuda_core/tests/AGENTS.md"
128+
- "cuda_pathfinder/AGENTS.md"
129+
- "cuda_python/AGENTS.md"
130+
- "benchmarks/cuda_bindings/AGENTS.md"
131+
- "benchmarks/cuda_core/AGENTS.md"
132+
- "cuda_bindings/README.md"
133+
- "cuda_core/README.md"
134+
- "cuda_pathfinder/DESCRIPTION.rst"
135+
- "cuda_python/DESCRIPTION.rst"
136+
- "cuda_bindings/docs/source/contribute.rst"
137+
- "cuda_core/docs/source/contribute.rst"
138+
- "cuda_core/docs/source/concurrency.rst"
139+
- "cuda_core/docs/source/error_handling.rst"
140+
- "cuda_pathfinder/docs/source/contribute.rst"
141+
- "cuda_bindings/docs/source/release.rst"
142+
- "cuda_core/docs/source/release.rst"
143+
- "cuda_pathfinder/docs/source/release.rst"
144+
- "cuda_python/docs/source/release.rst"

‎.github/RELEASE-core.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,14 @@ platforms as appropriate for each release.
6262
## Check (or update if needed) the dependency requirements
6363

6464
Review `cuda_core/pyproject.toml` and verify that all dependency
65-
requirements are current.
66-
67-
Update the cuda_core dependency in `cuda_python/setup.py`.
65+
requirements are current. The `cu12`/`cu13` extras declare the
66+
`cuda-bindings` floors; see "Bumping the cuda-bindings floor" in
67+
`cuda_core/AGENTS.md`.
68+
69+
Update the `cuda-core` pin in `cuda_python/setup.py` to the new minor
70+
series (`cuda-core~=X.Y.0`), and plan a `cuda-python` release right after
71+
this one. Until that release, `pip install cuda-python` resolves to the
72+
previous `cuda-core`.
6873

6974
---
7075

‎.github/actionlint.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ self-hosted-runner:
1212
# GitHub supports queued concurrency runs, but the latest actionlint release
1313
# does not yet recognize the concurrency.queue key.
1414
paths:
15+
".github/workflows/build-docs.yml":
16+
ignore:
17+
- 'unexpected key "queue" for "concurrency" section'
18+
".github/workflows/cleanup-pr-previews.yml":
19+
ignore:
20+
- 'unexpected key "queue" for "concurrency" section'
1521
".github/workflows/ci-workflow-health.yml":
1622
ignore:
1723
- 'unexpected key "queue" for "concurrency" section'
Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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

55
name: Docs in PRs
6-
description: Preview or clean up docs built from PRs
6+
description: Preview docs built from PRs
77

88
# 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.
99

@@ -18,20 +18,23 @@ inputs:
1818
runs:
1919
using: composite
2020
steps:
21-
# The steps below are executed only when testing in a PR.
22-
# Note: the PR previews will be removed once merged to main or release/* (see below)
2321
- name: Deploy doc preview
24-
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
22+
if: ${{ startsWith(github.ref_name, 'pull-request/') }}
2523
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
2624
with:
2725
git-config-name: cuda-python-bot
2826
git-config-email: cuda-python-bot@users.noreply.github.com
2927
folder: ${{ inputs.source-folder }}
3028
target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/
3129
commit-message: "Deploy doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
30+
# Every PR preview, the main docs deploy, and the coverage deploy commit to
31+
# the shared gh-pages branch. Rebase onto a deployment that landed in the
32+
# meantime instead of force-pushing over it, which the branch ruleset
33+
# rejects (and which used to discard the other deployment).
34+
force: false
3235

3336
- name: Leave a comment after deployment
34-
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
37+
if: ${{ startsWith(github.ref_name, 'pull-request/') }}
3538
uses: marocchino/sticky-pull-request-comment@d4d6b0936434b21bc8345ad45a440c5f7d2c40ff # v3.0.3
3639
with:
3740
header: pr-preview
@@ -45,27 +48,3 @@ runs:
4548
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-bindings/ <br>
4649
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-pathfinder/ <br><br>
4750
| <h6><br> Preview will be ready when the GitHub Pages deployment is complete. <br><br></h6>
48-
49-
# The steps below are executed only when building on main or release/*.
50-
- name: Remove doc preview
51-
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
52-
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
53-
with:
54-
git-config-name: cuda-python-bot
55-
git-config-email: cuda-python-bot@users.noreply.github.com
56-
folder: ${{ inputs.source-folder }}
57-
target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/
58-
commit-message: "Clean up doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
59-
60-
- name: Leave a comment after removal
61-
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
62-
uses: marocchino/sticky-pull-request-comment@d4d6b0936434b21bc8345ad45a440c5f7d2c40ff # v3.0.3
63-
with:
64-
header: pr-preview
65-
number: ${{ inputs.pr-number }}
66-
hide_and_recreate: true
67-
hide_classify: "OUTDATED"
68-
message: |
69-
Doc Preview CI
70-
:---:
71-
Preview removed because the pull request was closed or merged.
Lines changed: 3 additions & 35 deletions
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

@@ -9,13 +9,11 @@ description: Get the PR number without relying on the pull_request* event trigge
99
runs:
1010
using: composite
1111
steps:
12-
- name: Get PR info (non-main, non-release branch)
13-
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
12+
- name: Get PR info
1413
uses: nv-gha-runners/get-pr-info@main
1514
id: get-pr-info
1615

17-
- name: Extract PR number (non-main, non-release branch)
18-
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
16+
- name: Extract PR number
1917
shell: bash --noprofile --norc -xeuo pipefail {0}
2018
run: |
2119
trap 'echo "Error at line $LINENO"; exit 1' ERR
@@ -26,33 +24,3 @@ runs:
2624
fi
2725
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
2826
echo "BUILD_PREVIEW=1" >> $GITHUB_ENV
29-
30-
- name: Get PR data (main or release/* branch)
31-
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
32-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
33-
id: get-pr-data
34-
with:
35-
script: |
36-
const prs = await github.rest.repos.listPullRequestsAssociatedWithCommit({
37-
commit_sha: context.sha,
38-
owner: context.repo.owner,
39-
repo: context.repo.repo,
40-
});
41-
if (!prs.data.length) {
42-
core.setFailed("No PR associated with this commit on 'main' or 'release/*'.");
43-
} else {
44-
return prs.data[0];
45-
}
46-
47-
- name: Extract PR number (main or release/* branch)
48-
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
49-
shell: bash --noprofile --norc -xeuo pipefail {0}
50-
run: |
51-
trap 'echo "Error at line $LINENO"; exit 1' ERR
52-
PR_NUMBER="${{ fromJSON(steps.get-pr-data.outputs.result).number }}"
53-
if [[ -z "$PR_NUMBER" ]]; then
54-
echo "No associated PR found for the commit in 'main' or 'release/*'."
55-
exit 1
56-
fi
57-
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
58-
echo "BUILD_LATEST=1" >> $GITHUB_ENV

‎.github/dependabot.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,33 @@ updates:
2121
patterns: ["*"]
2222
update-types: ["major", "minor", "patch"]
2323

24+
labels: [CI/CD, dependencies]
25+
26+
# Group monthly hook revision updates, preserving SHA pins and frozen comments.
27+
- package-ecosystem: pre-commit
28+
directory: /
29+
schedule:
30+
interval: "monthly"
31+
time: "09:00"
32+
timezone: "America/Los_Angeles"
33+
34+
open-pull-requests-limit: 1
35+
36+
# Match hook repositories, leaving additional_dependencies pins unchanged.
37+
allow:
38+
- dependency-name: "https://github.com/*"
39+
# Lychee's hook revision, LYCHEE_VERSION argument, and CI binary pin must
40+
# be upgraded together in a coordinated manual update.
41+
ignore:
42+
- dependency-name: "https://github.com/lycheeverse/lychee"
43+
44+
groups:
45+
pre-commit-monthly:
46+
applies-to: version-updates
47+
patterns: ["*"]
48+
49+
labels: [CI/CD, dependencies]
50+
2451
# GitHub Actions updates targeting the 12.9.x branch
2552
- package-ecosystem: github-actions
2653
directory: /
@@ -38,3 +65,5 @@ updates:
3865
applies-to: version-updates
3966
patterns: ["*"]
4067
update-types: ["major", "minor", "patch"]
68+
69+
labels: [CI/CD, dependencies]

‎.github/matchers/compiler.json‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "gcc-error",
5+
"severity": "error",
6+
"pattern": [
7+
{
8+
"regexp": "^(.+?):(\\d+):(\\d+): (?:fatal )?error: (.+)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"message": 4
13+
}
14+
]
15+
},
16+
{
17+
"owner": "msvc-error",
18+
"severity": "error",
19+
"pattern": [
20+
{
21+
"regexp": "^(.+?)\\((\\d+)(?:,\\d+)?\\): error (C\\d+): (.+)$",
22+
"file": 1,
23+
"line": 2,
24+
"code": 3,
25+
"message": 4
26+
}
27+
]
28+
},
29+
{
30+
"owner": "cython-error",
31+
"severity": "error",
32+
"pattern": [
33+
{
34+
"regexp": "^(\\S+\\.(?:pyx|pxd|pxi)):(\\d+):(\\d+): (.+)$",
35+
"file": 1,
36+
"line": 2,
37+
"column": 3,
38+
"message": 4
39+
}
40+
]
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)