Skip to content

cuda.bindings: backport CUDA 12 runtime maintenance fixes - #3182

Draft
rwgk wants to merge 3 commits into
rwgk/cb12-on-main-07-maintenance-policyfrom
rwgk/cb12-on-main-08-runtime-maintenance
Draft

rwgk wants to merge 3 commits into
rwgk/cb12-on-main-07-maintenance-policyfrom
rwgk/cb12-on-main-08-runtime-maintenance

Conversation

@rwgk

@rwgk rwgk commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Highlights

Apply three existing current-major helper fixes to the CUDA 12 runtime. Each fix has its own commit, keeping runtime changes separate from the packaging/CI migration.

  • Accept byte-string compiler options alongside strings in the nested-resource helper.
  • Retain borrowed coredump setter buffers and free getter-owned storage.
  • Propagate exceptions raised inside registered handle getters instead of misreporting an unknown handle type.

Provenance and Review Scope

These are backports of fixes already implemented for the current bindings major. They are separate from, and not prerequisites for, making #3174–#3176 function together.

Fix Earlier upstream change Coverage retained here
Byte-string compiler options #1665, #1698 nvJitLink bytes-options test and NVVM parameterized case
Coredump buffer ownership #2399 Existing API tests; no new instrumented memory/lifetime regression test
Registered handle-getter errors #2551 Regression proving an internal KeyError propagates

An ordinary coredump round trip would also pass with the getter leak; the existing functional tests do not prove its absence. This is a validation gap for the memory-ownership fix.

Stack / Review Boundary

Previous: #3178. The stack overview lists all six open PRs and the intended workflow.

#3174 through #3176 are intended to land together, with separate review scopes and cumulative CI at #3176; the first two are incomplete intermediate states. Release routing (#3177), maintenance policy (#3178), and the runtime fixes (#3182) follow that group. The complete proposed source tree is at #3182.

Baseline: main b4a5e5513a1f.

Counterpart Review

Compared the CUDA 12 _internal/utils.pyx, _lib/utils.pxd/.pxi, utils/__init__.py, and their focused tests with the corresponding CUDA 13 implementations. These are handwritten helper adaptations of the existing current-major fixes; generated API differences are preserved. The process-global coredump test serialization is handled separately in #3176 for both roots.

Validation

At this published head, 341 CI-tool tests pass in a full Git checkout, together with full local pre-commit run --all-files, including actionlint, Lychee, and generated-file seals. Those are tooling/source checks, not native CUDA runtime tests.

Full hosted CI also passed for the complete stack at the unchanged #3182 head 775392e1a6b372b8d046a95466513bd114b05f6a: run 40456627846, attempt 2. The only retry was a self-hosted H100 runner disconnect during driver setup, before package tests began. Its replacement passed, together with the final gate; exact-head auxiliary checks are also green or intentionally skipped. This tests the cumulative stack, rather than hosted release publication or backport automation.

The focused runtime regressions listed above are selected by the CUDA 12 test coverage. Existing coredump API tests do not instrument allocations or prove the absence of a leak; that ownership-validation gap remains explicit. The three runtime changes stay isolated from the preceding CI and documentation revisions.

Checklist

  • Existing regression tests move with the corresponding runtime changes.
  • The description records provenance, scope, and validation limits.

@rwgk rwgk added this to the cuda.bindings next milestone Oct 21, 2026
@rwgk rwgk added bug Something isn't working cuda.bindings Everything related to the cuda.bindings module labels Oct 21, 2026
@rwgk rwgk self-assigned this Oct 21, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

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.

@rwgk

rwgk commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7856417

@github-actions

Copy link
Copy Markdown
Contributor

@mdboom
mdboom force-pushed the rwgk/cb12-on-main-08-runtime-maintenance branch from 7856417 to b01e4ad Compare October 23, 2026 15:04
@rwgk
rwgk force-pushed the rwgk/cb12-on-main-08-runtime-maintenance branch 2 times, most recently from cc44420 to 4f6212a Compare October 26, 2026 00:20
@rwgk

rwgk commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4f6212a

@rwgk
rwgk force-pushed the rwgk/cb12-on-main-08-runtime-maintenance branch from 4f6212a to dd7d842 Compare October 26, 2026 21:35
@rwgk

rwgk commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test dd7d842

rwgk added 3 commits October 26, 2026 17:21
Carry forward the runtime behavior from #1665/#1698 with its nvJitLink regression and NVVM bytes-options case. Extracted from #3173 so source integration can be reviewed independently.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Carry forward #2399: retain borrowed setter bytes and release getter-owned storage. Keep this runtime maintenance separate from the build integration.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Carry forward #2551 and its regression test. A KeyError inside a registered getter must propagate instead of being reported as an unknown handle type.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@rwgk
rwgk force-pushed the rwgk/cb12-on-main-08-runtime-maintenance branch from dd7d842 to 775392e Compare October 27, 2026 00:23
@rwgk

rwgk commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 775392e

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.bindings Everything related to the cuda.bindings module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant