Repository navigation
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test b7c7625 |
|
/ok to test eaf85d9 |
|
|
/ok to test 792b7d1 |
|
/ok to test 4e22130 |
4e22130 to
46e13aa
Compare
46e13aa to
968ad32
Compare
|
/ok to test |
mdboom
left a comment
There was a problem hiding this comment.
The most important change request here is to drop the bindings_scm_version.py workaround.
The rest are less important, but quite straightforward.
| if: ${{ matrix.cuda-env == 'cu12' }} | ||
| uses: ./.github/actions/setup-hardened-python | ||
| with: | ||
| python-version: "3.12" |
There was a problem hiding this comment.
Why Python 3.12? Odd choice. I think the best conservative choice is 3.11.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Changed the new configuration/bootstrap tooling setups to Python 3.11. implementation.
| @@ -0,0 +1,124 @@ | |||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
As I said in my review of #3176, this whole lengthy file exists because we don't have a 12.9.x tag on main. The response there was one of timing, that we couldn't remove this until after the logic to ignore 12.9.x was in the cuda_bindings_13 project. However, in this new stack, that is part of #3314, so I think we can merge #3314, add the tag to main, and then proceed with this but /without/ all of this complexity.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Agreed: this split provides an earlier route. Once #3314 lands, create the retained v12.9.11a0 milestone on main, then restack both alternatives onto that tagged commit and remove the helper, its tests, callers and bootstrap metadata. This is still pending; the helper remains until that milestone is reachable.
| for i, obj_i in enumerate(obj): | ||
| if ResT is char: | ||
| obj_i_bytes = (<str?>(obj_i)).encode() | ||
| obj_i_type = type(obj_i) |
There was a problem hiding this comment.
All of the changes to shipping CUDA bindings 12 code here are much higher risk than the other ones. My agent tells me that these were made just to bring 12 more consistent with 13, but are not strictly necessary to make the tests pass on this branch. On that basis, it would generally be preferable to separate them out (so that git bisect can find any unintentional breakage independently of the build/CI system changes).
However, as much as that worries me, I think as long as the tests are passing on this branch, I would be ok with merging this, but let's update the PR title/commit message to call out that the scope includes library code.
If the tests don't pass with these changes, I would advocate reverting them and coming back to them after the whole stack is merged.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
The three fixes are now isolated in #3355 against 12.9.x and #3356 against main, with focused tests and release notes. Both rebuilt with CUDA 12.9 and passed 94 local tests; hosted #3355 passed all 58 CI jobs, including the GPU regression paths. This migration layer still carries the same changes until #3356 lands, after which a rebase removes that duplication. Its title and description disclose the runtime scope.
| ``cuda-bindings`` Upcoming CUDA 12 Release Notes | ||
| ================================================ |
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Restored the 12.X.Y Release notes template heading while retaining the substantive release notes. implementation.
| test = [ | ||
| "cython>=3.2,<3.3", | ||
| "setuptools>=77.0.0", | ||
| "cython>=3.2.5,<3.3", | ||
| "setuptools>=80.0.0", | ||
| "numpy>=1.21.1", | ||
| "pytest>=6.2.4", | ||
| "pytest==9.1.0", | ||
| "pytest-benchmark>=3.4.1", | ||
| "pytest-subtests>=0.11.0", | ||
| "pyglet>=2.1.9" | ||
| ] |
There was a problem hiding this comment.
This is now duplicated in dependency-groups below. I think it can just be removed.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Removed the duplicated test extra. Installation instructions use the dependency group and state the pip prerequisite. implementation; instructions.
| # We deliberately do not want to include the version suffixes (a/b/rc) in cuda-bindings versioning | ||
| tag_regex = "^(?P<version>v\\d+\\.\\d+\\.\\d+)" | ||
| git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"] | ||
| git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v12.9.*"] |
There was a problem hiding this comment.
Ditto to my comment on #3314 -- it would be preferable for this to be v12.* (though less important because a 12.10 will never happen).
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Changed the maintenance selector to v12.*, consistently with the CUDA 13 selector, metadata check and metapackage table. implementation.
| when its tag is not reachable from `main`. Update `scm-bootstrap-release` | ||
| before another build if such a release consumes its target; do not bump the | ||
| field per PR or use it to override suitable reachable tags. |
There was a problem hiding this comment.
I don't understand this sentence.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Simplified the temporary milestone guidance. Until the retained milestone exists, the preview target must avoid a release number already consumed on another branch. The bootstrap-only field and instructions can disappear with the helper after the tag/restack step. implementation.
| - Moving a package's SCM selector to a new toolkit minor also needs a matching | ||
| reachable milestone. Updating the selector alone can produce an incorrect | ||
| placeholder version. Validate previews with local tags in an independent | ||
| disposable clone until the release history supplies the right milestone. |
There was a problem hiding this comment.
What about this design is enforcing this requirement? It would be great to fix this because it negates a large part of the usefulness of setuptools-scm.
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Removed that requirement: major-scoped selectors preserve normal setuptools-scm progression across toolkit-minor updates. implementation.
| - For a newly integrated maintenance root, create its first retained internal | ||
| milestone only after the integration group has landed and been validated on | ||
| `main`. Retained tag creation requires an explicit maintainer decision; | ||
| preparation of a PR stack does not authorize creating or pushing it. |
There was a problem hiding this comment.
I don't think we will ever have another "newly integrated maintenance root". Our next maintenance root will be cuda_bindings_13, which is already here. So maybe just remove this paragraph?
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Removed the speculative newly-integrated-root rule and described the concrete selector-isolation prerequisite instead. implementation.
| ## Bindings source roots | ||
|
|
||
| Current CUDA 13 bindings live in [`cuda_bindings_13/`](cuda_bindings_13/), and | ||
| CUDA 12.9 sources have a separate |
There was a problem hiding this comment.
| CUDA 12.9 sources have a separate | |
| CUDA 12 bindings sources have a separate |
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Used “CUDA 12 bindings sources have a separate …”. implementation.
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
968ad32 to
1201c79
Compare
rwgk
left a comment
There was a problem hiding this comment.
— codex GPT-6 on behalf of Ralf —
Thanks for the review. All ten inline comments now have direct replies. The smaller development/packaging changes are applied; the runtime fixes are isolated in #3355 (12.9.x, green CI) and #3356 (main).
The main simplification from your review remains pending: land corrected #3314, create the retained v12.9.11a0 milestone on validated main, then restack both alternatives and remove the bootstrap helper, tests, callers, and temporary metadata. I agree the helper should go; this records the prerequisite rather than treating its removal as complete.
— codex GPT-6 on behalf of Ralf —
Layer 2 of 7 of the staged "CUDA 12 bindings on
main" stack. Previous: #3314. Next: #3317. Stack map at the bottom.What this PR does
Makes
cuda_bindings_12/a place a developer can actually work in onmain: install it, run its tests, build its docs. It also carries the three runtime fixes that CUDA 13 already has, and the NVML test adaptations the current CI runners need.The three runtime fixes are also isolated in #3355 (
12.9.x) and #3356 (main). They remain here until #3356 lands; rebasing afterward will remove the duplicated runtime changes from this migration layer.Size: 38 files, +14,028 / -157 of which 13,185 lines are the new
cuda_bindings_12/pixi.lock. The hand-written part is about 850 lines, roughly half of it documentation.cuda_bindings_12/pyproject.toml): Python >= 3.11 (3.10 dropped, as agreed with Mike on cuda.bindings: configure independent CUDA 12 and CUDA 13 packages #3174), 3.14/3.15 classifiers,[dependency-groups]mirroring CUDA 13, standard setuptools-scm tag parsing with selectorv12.*(the customtag_regexis gone), and ascm-bootstrap-release = "12.9.11"preview target.cuda_bindings_12/pixi.toml+ lock (cu12, docs, cython-tests features). The roottest-bindingstask picks the root from the environment name. The pin check covers both roots and Core.ci/tools/bindings_scm_version.py, 124 lines). Existing reachable CUDA 12 tags do not supply the intended preview version. In a disposable CI checkout, the helper creates a localv12.9.11a0.dev0tag at a validated ancestor; setuptools-scm derives the version. The tag is never pushed. Once corrected ci: normalize toolkit configuration and isolate CUDA 13 versions #3314 lands and a retainedv12.9.11a0milestone is created on main, restack onto that commit and remove this temporary machinery.ci/pyproject.toml, installed withpip install -e ./ci.ci-pixi-source-test.yml): the PR job runs acu12and acu13leg; the nightly GPUfull-testtoo. A container checkout needsgit config --global --add safe.directorybefore the SCM bootstrap runs; that was found and fixed here.NotSupportedErrorfor PCI info, driver >= 13.4 refcount skip, removal of the flaky energy test,thread_unsafemarkers.AGENTS.md(the rule that a change in one root must be checked against the other), README, install/support pages (Python 3.11), rewritten12.X.Y-notes.rst.After this merges
pixi run --manifest-path cuda_bindings_12 -e cu12 test, orpython -m pip install -e . --group testinsidecuda_bindings_12/, work.cuda.corestill gets its CUDA 12 bindings from the12.9.xbranch. New: the PR-time CPU smoke job also source-builds the CUDA 12 root.Where to look
ci/tools/bindings_scm_version.pyand the lifecycle section ofAGENTS.md: the one piece of "magic" in the stack. Check that it can only ever add a local tag.cuda_bindings_12/pyproject.toml: the Python 3.11 floor and thev12.*selector.cuda_bindings_12/cuda/bindings/(31 lines total), side by side with their CUDA 13 counterparts.cuda_core/pixi.toml: Core'spixi run testnow collectstests/instead of the package root. This retains Core's owned Python and Cython tests while excluding vendored CCCL tests.All changes (38 files; 37 without the lockfile, +843 / -157)
Tooling:
ci/pyproject.toml(new),ci/tools/bindings_config.py(JSON CLI,python.supported),ci/tools/bindings_scm_version.py(new),ci/tools/check_pixi_cuda_version.py(both roots),ci/tools/compute_ci_plan.py(mapcuda_bindings_12/to the bindings module), tests for the new helper and the registry CLI, removal of a workflow-text test.Workflows:
ci-pixi-source-test.yml(cu12/cu13 matrix for build-smoke and full-test, SCM bootstrap,safe.directory),ci.ymlandci-nightly.yml(install./ci[test]for the tool tests),.pre-commit-config.yaml(pixi hook paths, large-file exception for the lockfiles).Package:
cuda_bindings_12/pyproject.toml,pixi.toml(new),pixi.lock(new),tests/pytest.ini(thread_unsafemarker), runtime fixes in_internal/utils.pyx,_lib/utils.pxd,_lib/utils.pxi,utils/__init__.py, tests intest_nvjitlink.py,test_nvvm.py,test_utils.py,test_cuda.py, NVML tests.Pixi: root
pixi.toml(test-bindingsroot selection),cuda_core/pixi.toml(test task scope).Docs:
AGENTS.md,README.md,cuda_bindings_12/AGENTS.md(new),cuda_bindings_12/README.md,docs/source/install.md,support.rst,release/12.X.Y-notes.rst.Validation
4e22130d(run 41183676173, 104 jobs).cu12at that head (run 41183098858):build smoke (cu12),pixi run test (cu12, GPU), and the cu13/cu12/cu13 round trip all passed. Three earlier dispatches at intermediate commits failed or were cancelled; the fixes they produced (safe.directory, root task forwarding, Core test scope) are included in this layer.1201c7910be4bb889ef480e9f505cb5a02582640: 316 CI-tool tests and configured workflow lint passed. Full-stack CI on #3322 passed at126ed74fb5bbfbc91a04e50557cf936efef4da7f(105 successful jobs; one expected skip).Stack map: what
maincan do after each layer mergesmain...v12.*tagcuda_bindings_12/; the PR-time CPU source-build smoke covers both roots; three CUDA 12 runtime fixes are incuda.coreand the metapackage still consume12.9.xartifacts12.9.xbranchv12.9.Ntag onmain; CUDA 13 releases are unchanged12.9.xis frozenEvery layer was designed to be mergeable on its own and had a green full CI run at its pre-rebase head on 2026-10-31. The stack is the "individually mergeable pieces" alternative to #3174-#3182; both stacks reach the same end state except that this one keeps compatibility routes for older artifact sources and retained CUDA 13 tags.