Skip to content

Fix pixi run test: CUDA 13.3 pin lag + cython-test .so placement - #2180

Merged
rparolin merged 2 commits into
NVIDIA:mainfrom
rparolin:fix/pixi-run-test-cuda-13-3
Jun 9, 2026
Merged

Fix pixi run test: CUDA 13.3 pin lag + cython-test .so placement#2180
rparolin merged 2 commits into
NVIDIA:mainfrom
rparolin:fix/pixi-run-test-cuda-13-3

Conversation

@rparolin

@rparolinrparolin commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

pixi run test did not complete from a clean checkout. Two independent root causes, both downstream of CUDA toolkit drift:

  1. CUDA version pin lag. The bindings were regenerated against CUDA 13.3.0 (cc50515, "Support CUDA 13.3"), adding NVRTC symbols (NVRTC_ERROR_BUSY, nvrtcBundledHeadersInfo, nvrtcGetBundledHeadersInfo), but the pixi cuda-version pins stayed at 13.2 in cuda_bindings/pixi.toml and cuda_core/pixi.toml. The local build then compiled 13.3-referencing Cython code against a 13.2 nvrtc.h:

    'nvrtcBundledHeadersInfo' was not declared in this scope
    

    CI was unaffected because it builds wheels from ci/versions.yml (13.3.0), not via pixi run test.

  2. Cython-test .so placement bug (latent since fix(test): unblock root pixi run test workflow #1978).tests/cython/build_tests.py runs build_ext --inplace, which writes the .so relative to cwd. pixi runs the task from the project root, so the .so landed in the package root instead of tests/cython/, where pytest imports it by bare module name. fix(test): unblock root pixi run test workflow #1978's verification silently reused a correctly-placed .so from an earlier build; a clean checkout fails with ModuleNotFoundError.

Changes

  • Pin bump13.2.* → 13.3.* (build-variants + feature.cu13) in both pixi.toml, matching the regenerated sources and ci/versions.yml; re-solved pixi.lock ×2.
  • os.chdir(script_dir) before build_ext --inplace in both build_tests.py (kept aligned per fix(test): unblock root pixi run test workflow #1978) so the .so lands next to its .pyx regardless of cwd.

Verification

pixi run test (env cu13) now completes, exit 0:

SubpackagePassedSkippedxfailed
pathfinder9754
bindings42920
core33732103

Confirmed the rebuilt .so lands in tests/cython/ (package root clean), proving the placement fix rather than a leftover artifact.

🤖 Generated with Claude Code


Closes#2182. Follow-up: #2183.

rparolinand others added 2 commits June 8, 2026 16:53
The bindings were regenerated against CUDA 13.3.0 (cc50515), adding NVRTC
symbols (NVRTC_ERROR_BUSY, nvrtcBundledHeadersInfo, nvrtcGetBundledHeadersInfo),
but the pixi cuda-version pins stayed at 13.2 in cuda_bindings/pixi.toml and
cuda_core/pixi.toml. `pixi run test` then built 13.3-referencing Cython code
against a 13.2 nvrtc.h and failed with "'nvrtcBundledHeadersInfo' was not
declared in this scope". CI was unaffected because it builds wheels from
ci/versions.yml (13.3.0) rather than via pixi run test.
Bump the cuda-version pins (build-variants + feature.cu13) from 13.2.* to
13.3.* in both packages so the local toolkit matches the regenerated sources
and ci/versions.yml. Re-solved pixi.lock files accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tests/cython/build_tests.py runs `build_ext --inplace`, which writes the
compiled .so relative to the current working directory. pixi runs the
build-cython-tests task from the project root, so the .so landed in the
package root instead of tests/cython/, where pytest imports it by bare module
name. The test only passed previously because a correctly-placed .so from an
earlier build persisted (gitignored); a clean checkout fails with
ModuleNotFoundError.
chdir to the script directory before build_ext --inplace so the .so lands next
to its .pyx in both cuda_bindings and cuda_core (kept aligned per NVIDIA#1978).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rparolinrparolin added this to the cuda.bindings next milestone Jun 8, 2026
@rparolinrparolin added bug Something isn't working CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module labels Jun 8, 2026
@github-actionsgithub-actionsBot added the cuda.core Everything related to the cuda.core module label Jun 8, 2026
@rparolinrparolin self-assigned this Jun 8, 2026
@rparolin
rparolin requested review from leofang and mdboomJune 8, 2026 23:55
@github-actions

This comment has been minimized.

rparolin added a commit to rparolin/cuda-python that referenced this pull request Jun 9, 2026
Main CI tests prebuilt wheels and never exercises the pixi source build, so
that developer path rots silently on CUDA-pin / generated-source / conda-forge
/ cython-build drift (NVIDIA#2182, NVIDIA#2183).
Add a workflow that runs the pixi source build:
- build-smoke (PRs touching the at-risk files): CPU-only. Source-builds
bindings + core, imports them, builds the cython test extensions and checks
placement. Catches the compile / ABI / .so-placement regressions without a GPU.
- full-test (nightly + manual): GPU runner, full `pixi run test`.
Shared pixi install factored into a composite action with an explicit,
asserted version pin.
Relates to NVIDIA#2183 (validate the source-build path over time); the regressions
this guards against are NVIDIA#2182, fixed by NVIDIA#2180.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment threadcuda_bindings/pixi.toml
@rparolin
rparolin merged commit 6df4e75 into NVIDIA:mainJun 9, 2026
104 of 108 checks passed
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

rparolin added a commit that referenced this pull request Jun 9, 2026
…2185)
* Fix cuda-version pin lag breaking local pixi run test
The bindings were regenerated against CUDA 13.3.0 (cc50515), adding NVRTC
symbols (NVRTC_ERROR_BUSY, nvrtcBundledHeadersInfo, nvrtcGetBundledHeadersInfo),
but the pixi cuda-version pins stayed at 13.2 in cuda_bindings/pixi.toml and
cuda_core/pixi.toml. `pixi run test` then built 13.3-referencing Cython code
against a 13.2 nvrtc.h and failed with "'nvrtcBundledHeadersInfo' was not
declared in this scope". CI was unaffected because it builds wheels from
ci/versions.yml (13.3.0) rather than via pixi run test.
Bump the cuda-version pins (build-variants + feature.cu13) from 13.2.* to
13.3.* in both packages so the local toolkit matches the regenerated sources
and ci/versions.yml. Re-solved pixi.lock files accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Place cython-test .so in tests/cython regardless of cwd
tests/cython/build_tests.py runs `build_ext --inplace`, which writes the
compiled .so relative to the current working directory. pixi runs the
build-cython-tests task from the project root, so the .so landed in the
package root instead of tests/cython/, where pytest imports it by bare module
name. The test only passed previously because a correctly-placed .so from an
earlier build persisted (gitignored); a clean checkout fails with
ModuleNotFoundError.
chdir to the script directory before build_ext --inplace so the .so lands next
to its .pyx in both cuda_bindings and cuda_core (kept aligned per #1978).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: validate pixi run test source-build (PR smoke + nightly GPU)
Main CI tests prebuilt wheels and never exercises the pixi source build, so
that developer path rots silently on CUDA-pin / generated-source / conda-forge
/ cython-build drift (#2182, #2183).
Add a workflow that runs the pixi source build:
- build-smoke (PRs touching the at-risk files): CPU-only. Source-builds
bindings + core, imports them, builds the cython test extensions and checks
placement. Catches the compile / ABI / .so-placement regressions without a GPU.
- full-test (nightly + manual): GPU runner, full `pixi run test`.
Shared pixi install factored into a composite action with an explicit,
asserted version pin.
Relates to #2183 (validate the source-build path over time); the regressions
this guards against are #2182, fixed by #2180.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: declare linux-amd64-gpu-l4-latest-1 self-hosted runner label for actionlint
actionlint validates static runner labels against its known set; the new
full-test job uses a literal GPU label (existing GPU jobs dodge this by
building the label from a matrix expression). Declare it so pre-commit's
actionlint hook passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: checkout full history + tags so setuptools-scm derives the real version
A shallow checkout has no tags, so the source-built packages get
setuptools-scm's 0.1.dev1 fallback. cuda.core's import-time guard then
rejects cuda.bindings ("12.x or 13.x must be installed"). Use fetch-depth: 0
in both jobs so the build resolves the real 13.x version.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: use pinned prefix-dev/setup-pixi instead of curl|bash installer
Addresses review (@mdboom): the composite action shelled out to
`curl -fsSL https://pixi.sh/install.sh | bash`, an unverified installer
(the codecov.io supply-chain failure mode). Replace it with
prefix-dev/setup-pixi pinned to a commit SHA (v0.9.6) — its install logic
is auditable and pinned — and delete the composite action file.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: switch workflow to pinned prefix-dev/setup-pixi (fixup)
The prior commit only removed the composite action file; this commits the
workflow change that actually uses prefix-dev/setup-pixi@<sha> in both jobs
(and drops the now-unneeded curl from the container apt install). Without
this the workflow referenced the deleted ./.github/actions/setup-pixi.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingCI/CDCI/CD infrastructurecuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pixi run test fails on main: CUDA 13.2 pin lags 13.3 bindings + cython-test .so misplacement

2 participants

@rparolin@leofang