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 1142000 |
|
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1142000 to
5841a92
Compare
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
mdboom
left a comment
There was a problem hiding this comment.
The most blocking thing here is hard-coding the minor version in the git describe glob. It means there is an extra step required before tagging and merging a release. My agent seems nothing wrong with making it v13.*, though it would require updating a test here.
| - name: Set up Python for CI tool tests | ||
| uses: ./.github/actions/setup-hardened-python | ||
| with: | ||
| python-version: "3.12" |
There was a problem hiding this comment.
Why Python 3.12? We could use the latest, but probably the right conservative thing here to avoid breaking any outside users who might want to compile cuda-python themselves is to use the oldest supported (currently 3.11).
| - name: Test CI tools | ||
| run: | | ||
| python -m pip install pytest==9.1.0 pyyaml==6.0.3 setuptools-scm | ||
| python -m pytest -v --noconftest ci/tools/tests |
There was a problem hiding this comment.
Is there an explicit reason for --noconftest? That will be confusing if we ever want a conftest in the future.
|
|
||
| def main() -> int: | ||
| """Verify cuda_bindings_13/cuda_core pixi pins match ci/versions.yml.""" | ||
| """Verify current bindings and cuda_core pixi pins match ci/versions.yml.""" |
There was a problem hiding this comment.
Makes total sense for now. Maybe it's already higher up in the stack, but we should make sure to come back and add this check to legacy (12) as well. If not already in the stack, let's create an issue or just add a TODO comment here so it doesn't fall through the cracks.
| root = ".." | ||
| version_file = "cuda/bindings/_version.py" | ||
| git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"] | ||
| git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v13.4.*"] |
There was a problem hiding this comment.
Note to me: this is a UNIX glob pattern not a regex.
Do we need v13.4.* here? It kind of defeats the purpose of "simply" tagging to make a release, as we would now require a bump to this number at each minor release.
If it /must/ be this way, we need to update the release TODO instructions to add this extra step. By the time we tag the release, it will be too late to update this number, so it shouldn't be forgotten.
| root="..", | ||
| relative_to=__file__, | ||
| git_describe_command=["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"], | ||
| git_describe_command=["git", "describe", "--dirty", "--tags", "--long", "--match", "v13.4.*"], |
|
|
||
| - name: Test CI tools | ||
| run: | | ||
| python -m pip install pytest==9.1.0 pyyaml==6.0.3 setuptools-scm |
There was a problem hiding this comment.
Nit: Since ci/tools is now a package, it should have a pyproject.toml and specify its dependencies there (making it easier to run the tests locally). That can be a "side quest", though. Maybe create an issue to come back to it.
EDIT: It looks like #3315 does this.
| from .bindings_config import load_config | ||
|
|
||
| ROOT = Path(__file__).resolve().parents[2] | ||
| VERSIONS_FILE_PATH = ROOT / "ci" / "versions.yml" |
There was a problem hiding this comment.
Nit: Duplicated from bindings_config.py which should own knowing where the canonical location of this file is. Rather than checking for its existence here, bindings_config.py should (and already does) raise an exception when the file doesn't exist.
| if not VERSIONS_FILE_PATH.is_file(): | ||
| print(f"error: {VERSIONS_FILE_PATH} not found", file=sys.stderr) | ||
| return 2 |
| build_version = yaml.safe_load(VERSIONS_FILE_PATH.read_text(encoding="utf-8"))["cuda"]["build"]["version"] | ||
| except (KeyError, TypeError): | ||
| print(f"error: cuda.build.version not found in {VERSIONS_FILE_PATH}", file=sys.stderr) | ||
| current = load_config(VERSIONS_FILE_PATH).package_for_release_status("current") |
There was a problem hiding this comment.
| current = load_config(VERSIONS_FILE_PATH).package_for_release_status("current") | |
| current = load_config().package_for_release_status("current") |
| print(f"error: cuda.build.version not found in {VERSIONS_FILE_PATH}", file=sys.stderr) | ||
| current = load_config(VERSIONS_FILE_PATH).package_for_release_status("current") | ||
| except (KeyError, TypeError, ValueError) as exc: | ||
| print(f"error: invalid CUDA toolkit pins in {VERSIONS_FILE_PATH}: {exc}", file=sys.stderr) |
There was a problem hiding this comment.
| print(f"error: invalid CUDA toolkit pins in {VERSIONS_FILE_PATH}: {exc}", file=sys.stderr) | |
| print(f"error: invalid CUDA toolkit pins in {bindings_config.DEFAULT_CONFIG}: {exc}", file=sys.stderr) |
— codex GPT-6 on behalf of Ralf —
Layer 1 of 7 of the staged "CUDA 12 bindings on
main" stack. Next: #3315. Stack map at the bottom.What this PR does
Two small preparations. Nothing CI does today changes.
ci/tools/bindings_config.py(60 lines) turns the existingcuda.build.version/cuda.prev_build.versionpins inci/versions.ymlinto two records:cuda_bindings_13is current (13.4.2),cuda_bindings_12is maintenance (12.9.1). The pixi pin check is its first consumer.ci/becomes an importable package, anddetect-changesnow runs the wholeci/tools/testssuite with pytest (before: only the planner test, viaunittest).cuda_bindings_13/pyproject.tomlandcuda_python/setup.pynarrow the setuptools-scm selector fromv*[0-9]*tov13.4.*. Later layers makev12.9.*tags reachable frommain; without this changegit describewould hand those tags to the CUDA 13 packages.After this merges
mainbuilds, tests, and releases exactly as before.v12.9.11a0tag onmaincan no longer disturb CUDA 13 version derivation (covered bytest_cuda12_milestone_does_not_change_current_package_versions, which derives its current release tag and expected line from the registry).v13.5.*when the toolkit moves). Layer 7 (ci: retire legacy branch-based bindings maintenance #3322) adds the pre-commit check that enforces this; until then it is a manual step.Where to look
ci/tools/bindings_config.py: the data model the rest of the stack builds on.cuda_bindings_13/pyproject.tomlandcuda_python/setup.py: the two one-line selector changes.ci/tools/check_pixi_cuda_version.py: same check as before, now reading the registry.All changes (10 files, +196 / -18)
ci/tools/bindings_config.py(new):BindingsPackage,BindingsConfig,load_config().ci/__init__.py,ci/tools/__init__.py(new, empty): makepython -m ci.tools.<module>work.ci/tools/check_pixi_cuda_version.py: read pins through the registry; same checks.ci/tools/tests/test_bindings_config.py(new): registry normalization, pixi-check drift, and the "CUDA 12 milestone does not change CUDA 13 versions" test (real git repository, real pyproject/setup.py)..github/workflows/ci.yml:detect-changesinstalls pytest/pyyaml/setuptools-scm on hardened Python and runspytest ci/tools/tests..github/workflows/ci-nightly.yml: the release-tooling test job installs setuptools-scm too..pre-commit-config.yaml: the pixi hook runs aspython -m ci.tools.check_pixi_cuda_versionand also triggers on the two tool files.cuda_bindings_13/pyproject.toml,cuda_python/setup.py:--match v13.4.*.Validation
1142000b(run 41171069718, 104 jobs).98ed2a6c9d028ec0c28cc89b6e336c8c23579cf1includes the follow-up fixes. Local validation: 296 CI-tool tests, actionlint passed. Full CI and native Pixi source/GPU checks have not been rerun for it.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.