Skip to content

Commit fd0f548

Browse files
authored
Merge branch 'main' into docs-1-1-1-program-cache-perms
2 parents acaf6b5 + 8d42c89 commit fd0f548

1,093 files changed

Lines changed: 368740 additions & 24112 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.

‎.clang-format‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# A clang-format style derived from Python's PEP 7 (4-space indent, Stroustrup braces,
6+
# return type on its own line), except that the column limit is 120 rather than 79.
7+
# Based on https://gist.github.com/pganssle/0e3a5f828b4d07d79447f6ced8e7e4db
8+
BasedOnStyle: Google
9+
BreakAfterReturnType: AllDefinitions
10+
AllowShortIfStatementsOnASingleLine: Never
11+
BreakBeforeBraces: Stroustrup
12+
ColumnLimit: 120
13+
DerivePointerAlignment: false
14+
IndentWidth: 4
15+
Language: Cpp
16+
PointerAlignment: Right
17+
ReflowComments: Always
18+
SpaceBeforeParens: ControlStatements
19+
SpacesInParens: Never
20+
TabWidth: 4
21+
UseTab: Never
22+
23+
# Keep include order as written; reordering can break order-sensitive builds.
24+
SortIncludes: {Enabled: false}
25+
26+
# Ruff-like wrapping: break after "(", indent arguments, put ")" on its own line.
27+
# This does not contradict PEP7, but extends it to the consistent style where
28+
# calls either fit on a single line or they are broken across multiple lines with
29+
# one argument per line (indented).
30+
AlignAfterOpenBracket: true
31+
BreakAfterOpenBracketBracedList: true
32+
BreakAfterOpenBracketFunction: true
33+
BreakAfterOpenBracketIf: true
34+
BreakBeforeCloseBracketBracedList: true
35+
BreakBeforeCloseBracketFunction: true
36+
BreakBeforeCloseBracketIf: true
37+
PackArguments: {BinPack: OnePerLine}
38+
PackParameters: {BinPack: OnePerLine}
39+
AllowAllArgumentsOnNextLine: false

‎.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_13/**/*"
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_13/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_13/README.md"
133+
- "cuda_core/README.md"
134+
- "cuda_pathfinder/DESCRIPTION.rst"
135+
- "cuda_python/DESCRIPTION.rst"
136+
- "cuda_bindings_13/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_13/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"

‎.gitattributes‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
1414
# `setuptools-scm` to correctly determine the version when building from a git
1515
# archive. See #1609.
1616
.git_archival.txt export-subst
17+
18+
# cuda.core compiles against the libcu++ headers of the vendored CCCL submodule
19+
# only; cuda_core/MANIFEST.in grafts those headers (and their licenses) into the
20+
# sdist explicitly. setuptools-scm 10 lists the files of an initialized
21+
# submodule, which would otherwise add the entire CCCL tree to the sdist and
22+
# make every egg_info walk it. "export-ignore" makes its file finder skip the
23+
# submodule. See #2940.
24+
cuda_core/third_party/cccl export-ignore

‎.github/CODERABBIT.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
2+
<!-- SPDX-License-Identifier: Apache-2.0 -->
3+
4+
# CodeRabbit Configuration
5+
6+
This document explains how CodeRabbit is configured for CUDA Python. For review
7+
commands and guidance, see the
8+
[CodeRabbit section of the contributing guide](../CONTRIBUTING.md#coderabbit).
9+
For complete product documentation, see the
10+
[CodeRabbit documentation](https://docs.coderabbit.ai/).
11+
12+
CUDA Python configures CodeRabbit through [`.coderabbit.yaml`](../.coderabbit.yaml)
13+
in the repository root. For pull requests from a branch in the same repository,
14+
the configuration in that branch is used for the review. Pull requests from
15+
forks use the target branch's configuration instead, so changes to
16+
`.coderabbit.yaml` in a fork do not affect that review.
17+
18+
When setting up or updating CodeRabbit:
19+
20+
1. Keep repository-specific settings in `.coderabbit.yaml`.
21+
2. Use `@coderabbitai configuration` on a pull request to inspect the resolved
22+
configuration. This is useful when checking whether CodeRabbit is using the
23+
expected repository settings for that pull request.
24+
3. Use `@coderabbitai generate configuration` to export the resolved
25+
configuration if a new baseline is needed. This is useful when moving
26+
settings into a reviewable repository configuration file.
27+
4. Keep configuration changes small and reviewable.
28+
5. Use `reviews.path_instructions` for path-specific review guidance.
29+
6. Use `knowledge_base.code_guidelines.filePatterns` for CUDA Python guidance
30+
files that CodeRabbit should read as review context.
31+
32+
The CUDA Python configuration should keep comments focused on correctness, API
33+
stability, performance, security, and other high-impact issues. Avoid enabling
34+
features that add noisy generated comments or code by default.

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Description
22

3-
<!-- Every PR should have a corresponding issue that describes and motivates the work done in the PR -->
3+
<!-- Link the relevant issue, if any. -->
44
closes <!-- Link issue here -->
55

66
<!-- Provide a standalone description of changes in this PR. -->
77

88
<!-- Note: The pull request title will be included in the CHANGELOG. -->
99

1010
## Checklist
11-
<!-- TODO: - [ ] I am familiar with the [Contributing Guidelines](). -->
11+
- [ ] I have read the [Contributing Guidelines](https://github.com/NVIDIA/cuda-python/blob/main/CONTRIBUTING.md#coordinate-before-implementing).
1212
- [ ] New or existing tests cover these changes.
1313
- [ ] The documentation is up to date with these changes.

‎.github/RELEASE-core.md‎

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,32 @@
66
This document covers the `cuda.core` release process. For other packages:
77
`cuda-bindings` and `cuda-python` involve a private repository and are not
88
documented here; `cuda-pathfinder` is largely automated by the
9-
[release-cuda-pathfinder.yml](workflows/release-cuda-pathfinder.yml)
9+
[CI: Release](workflows/release.yml)
1010
workflow.
1111

12+
To release `cuda-pathfinder`, dispatch **CI: Release** with
13+
`component` set to `cuda-pathfinder`, `release-action` set
14+
to `full-release`, and `git-tag` set to the existing
15+
`cuda-pathfinder-v<VERSION>` tag. The workflow finds the successful
16+
tag-triggered CI run, checks release notes, creates or reuses a draft,
17+
builds and deploys versioned docs, and uploads the source archive, checksum,
18+
and wheels. It publishes to TestPyPI, verifies installation and the imported
19+
version, then publishes to PyPI and verifies again before publishing the
20+
GitHub Release without marking it as latest. A failed
21+
docs build prevents asset uploads, package publication, and finalization.
22+
23+
The release-note checker runs from `git-tag`, not the workflow revision.
24+
For Pathfinder, that tag must contain a version
25+
of `ci/tools/check_release_notes.py` that writes `version=<VERSION>` to
26+
`GITHUB_OUTPUT`. The release-notes job rejects an empty version before
27+
documentation, asset uploads, or package publication can start. Pathfinder
28+
package publication also requires successful draft metadata preparation.
29+
30+
The default `dry-run` action validates preparation, builds docs, and
31+
collects release artifacts without creating a GitHub Release or publishing
32+
packages. It can be dispatched from a development branch; use
33+
`dry-run-docs-branch` only when a preview deployment is needed.
34+
1235
Each section below provides detailed guidance for a step in the
1336
[Release Checklist](ISSUE_TEMPLATE/release_checklist.yml). To start a
1437
release, create a new issue from that template and work through it item by
@@ -62,9 +85,14 @@ platforms as appropriate for each release.
6285
## Check (or update if needed) the dependency requirements
6386

6487
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`.
88+
requirements are current. The `cu12`/`cu13` extras declare the
89+
`cuda-bindings` floors; see "Bumping the cuda-bindings floor" in
90+
`cuda_core/AGENTS.md`.
91+
92+
Update the `cuda-core` pin in `cuda_python/setup.py` to the new minor
93+
series (`cuda-core~=X.Y.0`), and plan a `cuda-python` release right after
94+
this one. Until that release, `pip install cuda-python` resolves to the
95+
previous `cuda-core`.
6896

6997
---
7098

‎.github/actionlint.yaml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,35 @@ 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'
24+
# GitHub supports self-repository ($/) action references, but the latest
25+
# actionlint release does not yet recognize them (rhysd/actionlint#711).
26+
".github/workflows/release.yml":
27+
ignore:
28+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
29+
".github/workflows/test-wheel-linux.yml":
30+
ignore:
31+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
32+
".github/workflows/test-wheel-windows.yml":
33+
ignore:
34+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
35+
".github/workflows/build-wheel.yml":
36+
ignore:
37+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
38+
".github/workflows/pre-commit.yml":
39+
ignore:
40+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
41+
".github/workflows/test-sdist-windows.yml":
42+
ignore:
43+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
44+
".github/workflows/coverage.yml":
45+
ignore:
46+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'

0 commit comments

Comments
 (0)