|
| 1 | +<!-- |
| 2 | +SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 3 | +SPDX-License-Identifier: Apache-2.0 |
| 4 | +--> |
| 5 | + |
| 6 | +# Releasing CUDA bindings |
| 7 | + |
| 8 | +## Choose the release scope and source |
| 9 | + |
| 10 | +Develop the current and maintenance CUDA major lines together on `main`, in |
| 11 | +the two package roots listed in [`ci/versions.yml`](../ci/versions.yml). |
| 12 | +Release each line independently. A bindings release also needs its matching |
| 13 | +`cuda-python` metapackage release; it does not require a release of the other |
| 14 | +CUDA major, `cuda-core`, or `cuda-pathfinder`. |
| 15 | + |
| 16 | +Major-line maintenance may include selected API, Python, platform, or other |
| 17 | +compatibility changes. Decide those changes explicitly and describe them in |
| 18 | +the release notes. Once a patch release is frozen, admit only its approved |
| 19 | +fixes and release prerequisites. Do not infer patch-release scope solely |
| 20 | +from the registry's `maintenance` role. |
| 21 | + |
| 22 | +For an ordinary release, select a tested commit on `main`. If stabilization |
| 23 | +must continue while development advances, create a short release branch such |
| 24 | +as `release/bindings-12.9.11` from the chosen commit. For an emergency after a |
| 25 | +release, start from its exact tag, provided that tag contains the new package |
| 26 | +layout. For the first release after this transition, use a validated commit |
| 27 | +containing both roots; do not resume development on the historical `12.9.x` |
| 28 | +branch. Keep the package layout and release tooling together on the branch. |
| 29 | + |
| 30 | +Record the source commit, intended tag, selected package root, release owner, |
| 31 | +and accepted changes in the release checklist. A branch is a temporary scope |
| 32 | +boundary, not a separate long-term home for shared infrastructure. |
| 33 | + |
| 34 | +## Move fixes between integration and release branches |
| 35 | + |
| 36 | +Prefer a reviewed fix on `main`, then backport it to the selected release |
| 37 | +branch. Run **CI: Backport a merged PR to a release branch** from the Actions |
| 38 | +tab on `main`, supplying the merged PR number and one existing target branch. |
| 39 | +The workflow opens a PR; it does not merge or release the result. Inspect the |
| 40 | +diff, request CI using the normal PR approval procedure, and review it before |
| 41 | +merging. Workflow-file changes require a manual backport with appropriate |
| 42 | +credentials. Conflicts and toolkit-specific generated changes require an |
| 43 | +explicitly reviewed adaptation. |
| 44 | + |
| 45 | +If urgency requires a fix on the release branch first, link a follow-up PR |
| 46 | +reconciling the fix back into `main` before closing the release checklist. In either |
| 47 | +direction, assess both bindings roots and record why a change applies to one |
| 48 | +or both. Regenerate affected generated files from the intended toolkit and |
| 49 | +cybind inputs instead of blindly copying generated output between majors. |
| 50 | +See the [shared maintenance policy](../ci/README.md#maintaining-both-bindings-roots). |
| 51 | + |
| 52 | +## Validate and publish the selected line |
| 53 | + |
| 54 | +1. Finalize the bindings and metapackage release notes, dependency constraints, |
| 55 | + and selected toolkit pin in the release source tree. The registry and |
| 56 | + packaging metadata must agree. Run the CI-tool suite and pre-commit checks. |
| 57 | +2. Test the candidate through a reviewed PR or manual CI dispatch on its |
| 58 | + branch. Normal development CI includes dependent packages and may cover |
| 59 | + both majors. Resolve failures in affected code before selecting the tag. |
| 60 | +3. Create the approved immutable `vX.Y.Z` tag at the selected source commit. |
| 61 | + The tag-triggered CI selects that line's bindings and metapackage, validates |
| 62 | + them with the published Pathfinder dependency, and builds release artifacts. |
| 63 | + The tag does not have to be on `main`. Wait for this exact tag's CI to pass. |
| 64 | +4. Run **CI: Release** with `release-action=dry-run`, the tag, and |
| 65 | + `component=cuda-bindings`; repeat for `cuda-python`. Leave `run-id` blank |
| 66 | + to exercise automatic lookup, and leave `dry-run-docs-branch` blank to avoid |
| 67 | + deploying docs. The workflow verifies a successful tag-triggered CI run |
| 68 | + with the exact source SHA, validates artifacts, and builds docs. |
| 69 | +5. Review the dry runs, then separately approve and run `full-release` for |
| 70 | + each component under the team's release procedure. A successful candidate |
| 71 | + rehearsal or ordinary branch CI is not a substitute for exact-tag CI. |
| 72 | +6. Finish post-release QA and announcements, return every applicable fix to |
| 73 | + `main`, and close the stabilization effort. Retain immutable tags and the |
| 74 | + branch history needed for diagnosis. |
| 75 | + |
| 76 | +The workflow revision used for a release is its **control revision**; the |
| 77 | +tagged commit is its **source revision**. Record both and the artifact CI run |
| 78 | +ID. Release routing uses the package layout and toolkit settings in |
| 79 | +`ci/versions.yml` at the release tag. The current tooling requires a valid |
| 80 | +schema-2 registry in that source, for both dry runs and publication, including |
| 81 | +Core and Pathfinder releases. Tags from before this registry was introduced |
| 82 | +require compatible historical tooling; the current workflow configuration |
| 83 | +cannot supply missing tagged configuration. Published releases remain unchanged. |
| 84 | + |
| 85 | +In **CI: Release**, normal releases require each component's exact-version, |
| 86 | +nonempty release notes in the tagged source. The `cuda-python` metapackage requires its own notes. |
| 87 | +Notes from the workflow control revision or a different component cannot fill |
| 88 | +a gap. Preserve the existing exemption for `.postN` releases, which do not |
| 89 | +require new notes. |
| 90 | + |
| 91 | +Local synthetic tags used in publication-incapable rehearsals must remain local; |
| 92 | +they do not authorize publishing a package, creating a remote tag, or moving |
| 93 | +an existing tag. |
0 commit comments