Skip to content

cuda.bindings: support multiple CTK release lines on main - #2737

Open
rwgk wants to merge 39 commits into
NVIDIA:mainfrom
rwgk:agent/cuda-bindings-12-on-main
Open

cuda.bindings: support multiple CTK release lines on main#2737
rwgk wants to merge 39 commits into
NVIDIA:mainfrom
rwgk:agent/cuda-bindings-12-on-main

Conversation

@rwgk

@rwgk rwgk commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

REMINDER

Before merging, remove the temporary .lycheeignore before triggering final CI. It excludes only three canonical main/cuda_bindings_12 URLs that cannot resolve until this PR is merged. The authored-source lychee hook is skipped by CI, so removing the file will not prevent final CI from passing.

After merging, run pre-commit run lychee --all-files on fresh main to validate those links.

Summary

Closes #1199.

This is the writable continuation of Keith Kraus's original PR #2675, "cuda.bindings: build 12.9 and 13.x selectively from main". Most of the CUDA 12 source import and the initial build, test, and release integration came from Keith's PR. GitHub closed #2675 automatically when its temporary base branch was deleted after #2467 merged; this replacement preserves that work and commit history and completes the redesign requested during review.

The result is one active development branch for both released CUDA bindings lines:

  • CUDA 12.9 and CUDA 13.3 bindings are built, tested, documented, and released from main.
  • ci/versions.yml is the single mapping from each bindings package root to its exact toolkit pin and current or maintenance release status.
  • The historical 12.9.x branch becomes a read-only release record instead of an active backport or artifact-source branch.
  • Selective CI from ci: activate dependency-aware package builds and tests #2467 runs only the affected package root for package-local changes and both roots for shared infrastructure or consumer changes.

Design

The package root is the stable identity; release status is metadata:

Package root Release status CTK pin
cuda_bindings_12/ maintenance 12.9.1
cuda_bindings/ current 13.3.0

There are no synthetic line IDs and no separate role-to-line mapping. ci.tools.bindings_config reads and validates the registry, derives the CUDA target/major/variant and SCM tag rules, and emits normalized package records or GitHub environment variables directly. Downstream planning and workflows key their decisions by package root.

The public wheel builder deliberately supports exactly one current package and one maintenance package with different CUDA ABI majors; unsupported shapes fail closed. Release-tag syntax remains authoritative in each package root's [tool.setuptools_scm] metadata, and registry validation checks that it agrees with the toolkit pin.

Release selection uses the registry from the tagged source tree. A contained compatibility path handles historical tags whose trees predate this registry. One commit may carry one CUDA 12.9 tag and one CUDA 13.3 tag; each tag independently selects the matching package root, metadata, and artifacts in its own release run.

The two complete package roots are an intentional transitional design. Most of cuda_bindings_12/ is the direct CUDA 12.9 import from Keith's PR #2675; cuda_bindings_12/MAINTENANCE.md records its source and partial cybind generation provenance. Handwritten fixes must be assessed for both roots, while generated and target-specific files may legitimately differ.

Review Feedback Incorporated

  • Replaced hard-coded CUDA-major routing with the central package-root registry.
  • Removed synthetic line IDs and the separate role mapping; each unique package root now carries its own release_status and toolkit pin.
  • Removed the duplicate registry tag_series; release syntax comes from each source package's SCM metadata.
  • Kept current and maintenance singular and rejected unimplemented public-registry shapes.
  • Removed the transitional major-keyed CI-plan variants; workflows consume package-root-keyed output directly.
  • Consolidated release resolution into bindings_config.py and converted the helpers into a small importable ci.tools package.
  • Simplified workflow data flow and direct environment output, including explicit local-versus-published test sources.
  • Removed the proposed byte-identical shared-file manifest/checker. Cross-root applicability is an explicit review responsibility documented in cuda_bindings_12/MAINTENANCE.md.
  • Kept test wheels out of release artifact downloads and made release validation reject unexpected distributions.

Reviewer Decisions

Please explicitly accept or reject these policies:

  1. main is the sole active source of truth. The historical 12.9.x branch receives no further routine or emergency backports. Applicable CUDA 12 fixes are made in cuda_bindings_12/ on main, alongside any corresponding current-package change.
  2. Released bindings use explicit package roots. The directory identifies the package; release_status records where it is in the release lifecycle without introducing a second identity.
  3. Full-root duplication is transitional and reviewed semantically. Contributors assess handwritten changes for both roots and explain intentional one-root-only changes; the repository does not impose a brittle byte-identity list on roots that legitimately differ.

Review Map

The high-value review surface is outside the imported CUDA 12 tree:

  • Registry and release semantics: ci/versions.yml, ci/tools/bindings_config.py, cuda_bindings*/pyproject.toml, and focused tests
  • Selective planning: ci/tools/compute_ci_plan.py, ci/tools/tests/test_compute_ci_plan.py, and .github/workflows/ci.yml
  • Build and test routing: reusable workflows plus ci/tools/env-vars, ci/tools/run-tests, and explicit wheel/source selection
  • Release safety: release workflows, ci/tools/validate_release_wheels.py, release-note validation, and SCM-version handling
  • Maintenance contract: cuda_bindings_12/MAINTENANCE.md

Most files under cuda_bindings_12/ are the direct CUDA 12.9 import from Keith's PR #2675. Differences from cuda_bindings/ are generally target- or generation-specific and intentional.

Validation

  • python -m pytest -q ci/tools/tests: 134 passed, plus 47 subtests, on head 7e2b151
  • pre-commit run --all-files: passed, including Ruff, actionlint, YAML/TOML/RST checks, generated-file seals, SCM/registry checks, and lychee with the temporary exact exclusions described in the REMINDER
  • Direct registry and workplan probes verified full selection plus independent v12.9.1 and v13.3.0 selection
  • Isolated local source builds completed with CUDA 12.9 and CUDA 13.3; bindings extensions, metapackage routing, and CUDA Core compatibility were exercised for both package roots
  • Full gated GitHub Actions matrix for 7e2b151: running

Out of Scope

  • Refactoring target-specific generated content into overlays or otherwise eliminating the two complete package roots
  • Combining both release tags into one release workflow run
  • The separate generated NVML memoryview change discussed during the first review

Checklist

  • New and updated tests cover the registry, planning, build/test routing, and release behavior.
  • Documentation describes the package-root registry and maintenance model.

@rwgk rwgk added this to the cuda.bindings 13.5.0 & 12.9.10 milestone Aug 31, 2026
@rwgk rwgk added enhancement Any code-related improvements CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module labels Aug 31, 2026
@rwgk rwgk self-assigned this Aug 31, 2026

rwgk commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test b87d0a1

@github-actions

Copy link
Copy Markdown

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to comment on some individual things, but then decided to stop because I think there is a more fundamental change that needs to be made across this whole PR (and then I'm happy to come back and review further).

/Today/ the "current" version is 13, and the backport version is 12. But at some point in the future that will switch to 14 and 13. This pervasively hardcodes those version numbers all over this codebase, especially in CI, but in a bunch of the release scripts as well, and even the cuda_bindings_12 directory name as indicators of current vs. backport.

Instead, we should use the config we already have in versions.yml and use that to drive the numbers everywhere. That way when it's time to move on, all that should be required is updating versions.yml, and copying/overwriting the existing cuda_bindings to cuda_bindings_backport (or whatever we want to call it), and move on. I'm sure there are many details I'm missing, but that should be the goal and design -- it would be preferable to reduce it to as close to that as possible. The problem with this as-is is that there are hundreds of context-sensitive places that would need to be updated to do that update -- we are creating a massive pile of technical debt to pay later. I'm sure an agent might get that X% correct, but I always think it's better to engineer for flexibility, especially for something we know will happen. If versions.yml (which requires using yq to parse etc.) makes this too difficult, we could explore a simple VARIABLE=value format which would parse as both bash variables and Python variables and probably be more convenient to use from the many places it is needed. There are really only two actual values in versions.yml today, so that should be fine.

I'm also a little concerned (without any testing-based evidence) that this will break when we tag the same commit with v13.x.y and v12.x.y, which will be the common case, in fact, IMHO, one of the real benefits of moving to this approach. We should get an agent to do a thorough investigation of that use case and make sure it is covered. Ideally, it would be nice for a single release run to do both releases simultaneously but it's not a deal breaker if it still requires kicking off two runs.

Also what is this (from the agent's PR description):

The later NVML memoryview fix is reproduced byte-for-byte from cybind commit
6def52ca508c9e14ef67f4ce26a0c677f3fbad72 with Doxygen 1.17.0:

If there is something like this that wasn't backported, let's deal with that separately so it's not an unrelated tag-along to this PR.

Also a note for future agent reviewers of this PR: The interesting part of this PR is the part outside of the cuda_bindings_backport or cuda_bindings_12 directory. Those are just direct copies from the 12.9.x branch, and any differences between that and the cuda_bindings directory are likely intentional. When reviewing, focus on the scaffolding / CI / overall structure.

Comment thread .github/workflows/backport.yml Outdated
Comment thread .github/workflows/build-wheel.yml Outdated
Comment thread ci/cuda-bindings-shared-files.json Outdated
Comment thread ci/cuda-bindings-shared-files.json Outdated
Comment thread ci/ci-pipeline.svg
Comment thread cuda_python/docs/environment-docs.yml
Comment thread ci/tools/check_cuda_bindings_shared_files.py Outdated
@rwgk rwgk changed the title cuda.bindings: build 12.9 and 13.x selectively from main cuda.bindings: support multiple CTK release lines on main Aug 31, 2026
@rwgk

rwgk commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Archiving options related to a lychee chicken-and-egg issue. I'll go with Option 1 below. This comment is to explain why.


codex:

We have three sensible options. For PR 2737, I recommend keeping the canonical links unchanged and treating these as documented pre-merge exceptions.

  1. One-off exact exclusions — recommended

Run lychee once with only these three URLs excluded, record that every other link passes, and rerun without exclusions after merge.

This is reasonable because authored-source lychee is explicitly skipped by the GitHub CI job at .github/workflows/ci.yml, so these are not merge-gating failures. It avoids landing temporary configuration or compromising the final URLs.

  1. Temporary .lycheeignore

Add three exact anchored patterns so pre-commit run --all-files is completely green, then remove them immediately after merging. Lychee officially supports checked-in, commented exclusions via .lycheeignore. Lychee exclusion documentation

This is practical, but creates a mandatory cleanup PR and briefly leaves three blind spots on main.

  1. Permanent local remapping

Teach the hook to map:

https://github.com/NVIDIA/cuda-python/{tree,blob}/main/<path>
→ file://<current-worktree>/<path>

Then links to newly introduced files are validated against the checkout before they exist online. This is exactly the future-URL use case for lychee’s remapping feature. Lychee remapping documentation

It is the principled reusable solution, but needs a portable wrapper to calculate the absolute worktree path. I would pursue it separately only if this problem starts recurring.

I would avoid:

  • Accepting all 404 responses; lychee’s setting is global.
  • Excluding the entire cuda_bindings_12 subtree or source files.
  • Replacing the links with fork, PR, SHA, or repository-root URLs; those are inferior permanent package metadata.
  • Splitting out a bootstrap PR solely to make the paths exist.

So my recommendation is option 1: preserve the three correct final URLs, validate everything else with exact one-off exclusions, and rerun lychee from fresh main after merging.

@github-actions github-actions Bot added cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Sep 1, 2026
@rwgk

rwgk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test f4ddc4e

@rwgk

rwgk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c6a0cf1

@rwgk
rwgk marked this pull request as ready for review September 2, 2026 03:35
@rwgk

rwgk commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 83c1cf0

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is really challenging to review. Even ignoring the files that are just copied from the 12.9.x branch (which don't need review) there is a lot here.

I found a bunch of sources of unnecessary complexity and stopped reading after that, so still haven't done a full human pass. Even with agents, multiple stages of transformations between data formats causes multiple places that bugs can creep in. It makes it harder for agents or humans to understand the fundamental logic of what branches are covered and how this all works. I think we need a step back analysis of how things should be represented based on how things are needed downstream of that and adjust accordingly.

I know partly what is driving this complexity is GHA's design that forces things into small snippets. @kkraus14 has suggested elsewhere that maybe moving to a more formal mono-repo management tool like moon may be better than building out more and more CI complexity. Maybe an agent could build a prototype quickly to at least see whether it meets our use cases and what sort of complexity it requires so we can compare.

Additionally, there are many new scripts here in ci/tools with largely overlapping functionality where logic is spread between them and bash scripts and they sort of go back-and-forth. Moving more logic into fewer Python scripts, that output directly to what is most often needed (POSIX environment variables) would probably be preferable to the current state. It should be possible to see in one file how the variables that control the rest of the execution are computed. I'm thinking particularly of bindings_config.py and resolve_release_bindings_line.py -- why are the separate? And there is probably some value in combining it with compute_ci_plan.py in some way. Not necessarily that they need to be in the same source file, but that they would interact in the same process. Sorry to not have /concrete/ suggestions for that, but I am trying to suggest ways that this could be simplified to be more easily reviewable and maintained going forward.

If there is any way to break this up into multiple steps that could be reviewed independently, that would help a lot. Even when I used an agent to review, it struggled to understand the "why" of many of these changes. I asked my agents to offer some suggestions about making this easier to review. I think it's mostly ok (except I wouldn't consider the cuda_bindings_12/ import step as big -- I'm comfortable rubber stamping a direct copy from another branch). It doesn't really have good suggestions for incremental development -- most of what it suggests are just bugfixes.


A few concrete ways to cut the size and the duplicated-logic risk this PR introduces:

  • Split into sequential PRs. The cuda_bindings_12/ import, the registry (ci/versions.yml + bindings_config.py), and the workflow rewiring are three logically separable changes. Landing the registry + validator first (small, reviewable, testable in isolation against the existing single-line setup) then rewiring workflows to consume it, then importing cuda_bindings_12/ last, would let each step get real scrutiny instead of one 255K-line PR where reviewers rubber-stamp the bulk.

  • Stop tracking the tag family in two places. ci/versions.yml's tag_series and cuda_bindings/pyproject.toml's tag_regex/git_describe_command encode the same CUDA-major fact independently (flagged in the review — they can drift and did in the v13.4.0 scenario). Either generate the pyproject tag_regex from the registry at build time, or drop the registry's tag_series field and derive it from the pyproject regex instead. One source of truth removes a whole class of the findings above.

  • Don't model generality you don't use yet. roles.maintenance is schema'd as a list, but build-wheel.yml hard-errors unless it has exactly one entry, and nothing in this PR needs more than one maintenance line. Collapsing the schema to a single maintenance line (not a list) until a second one is actually needed removes validation code, removes a whole "what if maintenance has 2 entries" test surface, and can be widened later when there's a real second line to design against.

  • Trim the transitional compatibility code in compute_ci_plan.py. The variants dict with the "OR aggregation... consumers migrate to lines" comment is scaffolding for old CUDA-major-keyed workflow consumers. If those consumers are being rewritten in this same PR anyway, migrating them straight to line-keyed output and deleting the compatibility shim removes a chunk of logic (and a source of the empty-matrix / dual-bookkeeping risk flagged earlier).

Comment on lines +68 to +76
- name: Checkout docs control plane
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.sha }}
path: .ci-control

- name: Install CI tool dependencies
run: python3 -m pip install -r .ci-control/ci/tools/requirements.txt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is treating ci/tools as a sort of poor version of a package, all just so it can use PyYAML.

The modern way to handle dependencies of standalone scripts is to use PEP 723 metadata and then use a PEP 723-supporting tool like uv, pixi or hatch to run it. I think that would be way less cumbersome than this. Or we go all in and make it a proper package which might have other benefits given how big it's getting. But this approach is sort of worst-of-both-worlds, IMHO.

Comment thread .github/workflows/build-docs.yml Outdated
Comment on lines +83 to +107
set -euo pipefail
if [[ -n "$BINDINGS_LINE" ]]; then
bindings_line="$BINDINGS_LINE"
elif [[ "${IS_RELEASE}" == "true" && "$RELEASE_TAG" == v* ]]; then
bindings_line=$(python3 .ci-control/ci/tools/resolve_release_bindings_line.py \
--release-tag "$RELEASE_TAG" \
--release-source-root . \
--control-config .ci-control/ci/versions.yml)
else
echo "error: cannot find ci/versions.yml or ci/versions.json" >&2
exit 1
bindings_line=$(python3 .ci-control/ci/tools/bindings_config.py get --role current)
fi
BUILD_CTK_VER=$(jq -er '.toolkit_version' <<< "$bindings_line")
BINDINGS_COMPONENT_DIR=$(jq -er '.release_source_dir // .source_dir' <<< "$bindings_line")
BINDINGS_REGISTRY_ORIGIN=$(jq -er '.release_registry_origin // "tag"' <<< "$bindings_line")
if [[ ! "${BUILD_CTK_VER}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "error: derived CTK build version ${BUILD_CTK_VER} does not match MAJOR.MINOR.MICRO" >&2
exit 1
fi
if [[ ! -d "$BINDINGS_COMPONENT_DIR" ]]; then
echo "error: resolved bindings source directory does not exist: $BINDINGS_COMPONENT_DIR" >&2
exit 1
fi
echo "BUILD_CTK_VER=${BUILD_CTK_VER}" >> "$GITHUB_ENV"
echo "BINDINGS_COMPONENT_DIR=${BINDINGS_COMPONENT_DIR}" >> "$GITHUB_ENV"
echo "BINDINGS_REGISTRY_ORIGIN=${BINDINGS_REGISTRY_ORIGIN}" >> "$GITHUB_ENV"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, the resolve_release_bindings_line.py or bindings_config.py scripts read in the versions.yaml metadata and output json, which is then parsed with jq to convert to environment variables. And there is additional validation of the values coming out of scripts that we control. Can't we skip that middle steps and have the scripts output what is needed (envvar pairs)? The long standing env-vars script does that, for example. I'll probably need to read further to discover where using JSON as an intermediary might be relevant, though. My concern isn't efficiency, it's that there are so many transformation steps and therefore places for bugs to slip in.

I think fixing this will require stepping back and understanding all of the places these JSON-emitting scripts are used and providing output in the most convenient way possible for those contexts.

Comment thread cuda_bindings/pyproject.toml Outdated
Comment on lines +106 to +107
tag_regex = "^(?P<version>v13\\.\\d+\\.\\d+(?:[ab]\\d+)?(?:\\.post\\d+)?)"
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v13.*"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the metadata in versions.yml will not affect this. How do we ensure they stay in sync?

Comment thread ci/tools/bindings_config.py Outdated
_TOOLKIT_VERSION_PATTERN = re.compile(r"[1-9][0-9]*\.[0-9]+\.[0-9]+(?:[.-][A-Za-z0-9]+)*")
_TAG_SERIES_PATTERN = re.compile(r"v[1-9][0-9]*(?:\.[0-9]+)*\.")
_FINAL_TAG_SUFFIX_PATTERN = re.compile(r"[0-9]+(?:\.post[0-9]+)?")
_ALPHA_BETA_TAG_SUFFIX_PATTERN = re.compile(r"[0-9]+(?:[ab][0-9]+)?(?:\.post[0-9]+)?")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be PEP 440 compliant so it can support anything we might want to do on PyPI, and I don't think it is. It would be better to use a library for this than reinventing here.

Comment thread .github/workflows/build-wheel.yml Outdated
Comment on lines +96 to +97
build_bindings_current=$(jq -r --arg id "$current_line_id" '.modules.bindings.lines[$id].needs_build | if type == "boolean" then . else error("invalid current bindings build gate") end' <<< "$WORKPLAN")
build_bindings_maintenance=$(jq -r --arg id "$maintenance_line_id" '.modules.bindings.lines[$id].needs_build | if type == "boolean" then . else error("invalid maintenance bindings build gate") end' <<< "$WORKPLAN")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got me thinking about whether the current and maintenance lines are built and tested every time, even if only one or the other changed? Part of Keith's recent work was to limit the amount that is rebuilt and tested every time, and it would be nice not to step back from that.

I had my agent investigate this and it sees that is more-or-less the case.

Comment on lines +88 to +97
for relative in shared_paths:
candidates = [(root, repo_root / root / relative) for root in roots]
symlinks = [root for root, path in candidates if path.is_symlink()]
if symlinks:
violations.append(f"{relative}: symlink in {', '.join(symlinks)}")
continue
missing = [root for root, path in candidates if not path.is_file()]
if missing:
violations.append(f"{relative}: missing from {', '.join(missing)}")
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my agent:

Only the leaf path and root are checked for is_symlink(); an intermediate directory symlink is followed transparently by is_file()/read_bytes() and reported as "identical," defeating the stated symlink guard for everything under it.

Comment thread ci/tools/env-vars Outdated
echo "SETUP_SANITIZER=${SETUP_SANITIZER}"
echo "BINDINGS_SOURCE=${BINDINGS_SOURCE}"
echo "CUDA_BINDINGS_ROOT=${CUDA_BINDINGS_ROOT}"
echo "CUDA_PYTHON_ARTIFACT_NAME=cuda-python-wheel-cuda${BINDINGS_BUILD_CUDA_VER:-${CUDA_VER}}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my agent:

CUDA_PYTHON_ARTIFACT_NAME falls back to ${CUDA_VER} (the test runner's CTK) rather than the build-time toolkit version in published mode, since BINDINGS_BUILD_CUDA_VER is only set in the local branch. Any workflow consuming this name in that mode downloads a nonexistent artifact.

Comment thread .github/workflows/build-wheel.yml Outdated
' <<< "$BINDINGS_CONFIG")
maintenance_line_id=$(jq -er '
.roles.maintenance
| if length == 1 then .[0] else error("wheel builder currently requires one maintenance line") end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my agent:

roles.maintenance is schema'd as a list, but the wheel builder hard-errors unless it has exactly one entry, with the job otherwise hardwired to fixed CURRENT_/MAINTENANCE_ env pairs. Adding a second maintenance line — the stated point of a registry — breaks every build job. Fails loudly, so it's a documented design limit rather than silent corruption, but worth flagging as inconsistent with the registry's stated generality.

Comment thread CONTRIBUTING.md

### CI Pipeline Flow

![CUDA Python CI Pipeline Flow](ci/ci-pipeline.svg)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My agent flagged that this diagram is now out-of-date.

Comment thread ci/tools/install_bindings_test_wheel.py Outdated
Comment on lines +19 to +26
active_section = ""
for line in pyproject.read_text(encoding="utf-8").splitlines():
if match := _SECTION_PATTERN.fullmatch(line):
active_section = match.group(1).strip()
continue
if active_section == section and (match := _KEY_PATTERN.match(line)) and match.group(1) == key:
return True
return False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use tomllib rather than regexes to read toml.

@rwgk

rwgk commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 22108c1

rwgk added 3 commits September 2, 2026 16:14
Treat carriage returns as delimiters in both jq TSV reads. Native jq on Windows emits CRLF, which otherwise leaves the final field contaminated and silently disables maintenance-line cuda.core Cython test artifacts.
Synchronize the applicable thread-safety markers from NVIDIA#2229 into the maintenance test tree. NVML initialization and graph-memory accounting use process-global state and must not run alongside parallel tests under free-threaded Python.
@rwgk

rwgk commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 889062e

@rwgk

rwgk commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7e2b151

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

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit cuda-bindings branching strategy

3 participants