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. |
c8ce319 to
ea19ebc
Compare
ea19ebc to
44b64de
Compare
44b64de to
4b8376e
Compare
4b8376e to
2f2eb43
Compare
|
/ok to test 2f2eb43 |
|
2f2eb43 to
b252422
Compare
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
b252422 to
55b92f8
Compare
mdboom
left a comment
There was a problem hiding this comment.
In addition to my comments below, my bot had this to say:
🤖 Registry join can silently disable bindings tests (medium): matrix rows are matched to the registry by exact CUDA_VER == toolkit_version. If versions.yml goes from 13.4.2 to 13.4.3 and the matrix rows aren't updated, those rows silently become floor and skip the bindings and Cython tests with no error. The old logic compared major and minor only. The fix is to join on ctk_target.
| BUILD_MAINTENANCE_BINDINGS: >- | ||
| ${{ !inputs.single-cuda-major && | ||
| (inputs.workplan == '' || | ||
| fromJSON(inputs.workplan).modules.bindings.needs_build || | ||
| fromJSON(inputs.workplan).modules.bindings.needs_test || | ||
| fromJSON(inputs.workplan).modules.core.needs_build || | ||
| fromJSON(inputs.workplan).modules.core.needs_test || | ||
| fromJSON(inputs.workplan).modules.python.needs_build || | ||
| fromJSON(inputs.workplan).modules.python.needs_test) }} |
There was a problem hiding this comment.
This should be a single entry in the workplan JSON and computed from compute_ci_plan.py (so we don't have this logic reimplemented in JS and scattered in the .yml files).
| - name: Prepare local maintenance SCM milestone | ||
| if: ${{ !inputs.single-cuda-major && (env.BUILD_BINDINGS == 'true' || env.TEST_BINDINGS == 'true') }} | ||
| if: ${{ env.BUILD_MAINTENANCE_BINDINGS == 'true' }} | ||
| run: | | ||
| python -m ci.tools.bindings_scm_version \ | ||
| --package-root "${MAINTENANCE_BINDINGS_ROOT}" --sha "${{ github.sha }}" |
There was a problem hiding this comment.
See many previous comments about bindings_scm_version workaround and how it simplifies all of this.
| - name: Build maintenance cuda.core Cython tests | ||
| if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }} | ||
| run: | | ||
| # The current package's test extensions were built in this same source tree. | ||
| # Remove generated outputs so Cython and the compiler cannot reuse them. | ||
| find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}" -maxdepth 1 -type f \ | ||
| \( -name 'test_*.cpp' -o -name 'test_*.so' -o -name 'test_*.pyd' \) -delete | ||
| if [[ -d "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" ]]; then | ||
| find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" -type f -delete | ||
| fi | ||
| pip uninstall -y cuda-bindings cuda-core | ||
| pip install ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl | ||
| if ${{ env.BUILD_CORE == 'true' }}; then | ||
| core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit) | ||
| else | ||
| core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit) | ||
| fi | ||
| if [[ -z "${core_wheel}" ]]; then | ||
| echo "No cuda.core wheel found" >&2 | ||
| exit 1 | ||
| fi | ||
| pip install "${core_wheel}" --group ./cuda_core/pyproject.toml:test | ||
| pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }} | ||
| bash build_tests.sh | ||
| popd | ||
|
|
||
| - name: Upload maintenance cuda.core Cython tests | ||
| if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }} | ||
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||
| with: | ||
| name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-cu${{ env.MAINTENANCE_CUDA_MAJOR }}-tests | ||
| path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }} | ||
| if-no-files-found: error | ||
|
|
There was a problem hiding this comment.
Any way to reduce the duplication here between the current and maintenance versions?
| @@ -0,0 +1,65 @@ | |||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
These tests seem to be so full of monkeypatches as to provide minimal value.
Let's ask the agent if any of these issues would "fail naturally" in the course of running the CI itself, and if so, remove them.
| build_major = os.environ.get("CUDA_PYTHON_BUILD_MAJOR", "13") | ||
| if build_major not in {"12", "13"}: | ||
| raise ValueError(f"CUDA_PYTHON_BUILD_MAJOR must be 12 or 13, got {build_major!r}") |
There was a problem hiding this comment.
Using an environment variable for this seems like a big foot gun. For example, if I'm making a release on a tag v12.9.10 but forget to set this environment variable, the build will fail in an obscure way. I would expect this to need to be set in the release.yml workflow in order to do the right thing, but I don't see that change in this or any PRs further up the stack.
I think it would be better to implement our own custom version number lookup before importing setuptools_scm. It would look for an exact tag match for v12.X.Z and if so, set SETUPTOOLS_SCM_PRETEND_VERSION to that exact value. Otherwise fallback to setuptools_scm's default behavior with the 13.* pattern. Then this will do the right thing by default.
— codex GPT-6 on behalf of Ralf —
Layer 4 of 7 of the staged "CUDA 12 bindings on
main" stack. Previous: #3317. Next: #3319. Stack map at the bottom.What this PR does
Cuts the last dependency on the
12.9.xbranch inside PR CI. Everything that needs CUDA 12 bindings during amainrun now takes the wheel built in the same run.cuda.core's cu12 half is built against the same-run CUDA 12 wheel. Thelookup-run-id --branch 12.9.xartifact download disappears frombuild-wheel.yml.<core artifact>-cu12-tests), with stale-output cleanup between the two ABI builds.CUDA_PYTHON_BUILD_MAJOR=12) next to the CUDA 13 one.Maintenance bindingsjobs from ci: build and test local CUDA 12 bindings #3317 go away. Instead the regular test matrices annotate each row from the registry (BINDINGS_ROOT,BINDINGS_SOURCE, artifact names): 12.9.1 rows test bindings, Core, and metapackage from this run's wheels; 13.0.x / 12.6.x rows keep testing Core against published floor bindings.cuda_python/setup.py+pyproject.toml: a selector table{"12": "v12.9.*", "13": "v13.4.*"};CUDA_PYTHON_BUILD_MAJOR(default 13) picks the line; dependencies follow the resolved version, so a CUDA 12 sdist rebuilt outside Git keeps CUDA 12 dependencies. The CUDA 12 metapackage depends on bindings only; CUDA 13 also on Core and Pathfinder. Covered bytest_cuda_python_setup.py.After this merges
12.9.xbranch any more except nightly for older artifact sources (handled in ci: retire legacy branch-based bindings maintenance #3322).mainas today, CUDA 12 still from12.9.xtooling until ci: release CUDA 12 bindings from main #3319.Where to look
.github/workflows/build-wheel.yml: "Constrain maintenance cuda.core to the same-run cuda.bindings wheel" and "Build maintenance cuda.core Cython tests"..github/workflows/test-wheel-linux.yml: the jq block that annotates matrix rows (mirrored in the Windows file).cuda_python/setup.py: line selection and version-derived dependencies.All changes (14 files, +331 / -237)
.github/workflows/build-wheel.yml: same-run CUDA 12 constraint for Core, maintenance metapackage wheel, maintenance Core Cython tests, removal of the prior-branch lookup..github/workflows/ci.yml: removal of the three temporary jobs; sdist jobs matrixed overpackage_roots;bindings-configpassed to all test jobs..github/workflows/test-sdist-linux.yml,test-sdist-windows.yml:bindings-packageinput replacescuda-version; per-root build, Pathfinder sdist only for the current root..github/workflows/test-wheel-linux.yml,test-wheel-windows.yml: registry-driven row annotation;bindings-onlyinput removed.ci/tools/env-vars:MAINTENANCE_CUDA_MAJOR, registry-driven test routing, Core Cython artifact suffix, metapackage artifact name.cuda_python/setup.py,cuda_python/pyproject.toml,ci/tools/tests/test_cuda_python_setup.py(new).cuda_python/AGENTS.md,cuda_python/docs/README.md,cuda_core/docs/source/install.rst.Validation
2f2eb43e(run 41188280375).55b92f8674510105d2184ad371df4b75ba71e3f0includes the follow-up fixes. Local validation: 306 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.