Skip to content

fix(test): unblock root pixi run test workflow#1978

Open
rparolin wants to merge 3 commits intoNVIDIA:mainfrom
rparolin:fix-pixi-run-test
Open

fix(test): unblock root pixi run test workflow#1978
rparolin wants to merge 3 commits intoNVIDIA:mainfrom
rparolin:fix-pixi-run-test

Conversation

@rparolin
Copy link
Copy Markdown
Collaborator

@rparolin rparolin commented Apr 25, 2026

Summary

pixi run test was failing end-to-end. Two stacked root causes:

  1. List-form pixi cmd arrays didn't expand $PIXI_ENVIRONMENT_NAME. The root test-* tasks dropped into each sub-package without forwarding the active environment, so the inner pixi run picked the cuda_bindings default environment (no cuda-version pin). The conda solver resolved cuda-version=12.9, and the build failed compiling Cython output that references CUatomicOperation_enum (a CUDA-13.x-only symbol). Fix: wrap each test-* task in bash -c '…' so the shell expands $PIXI_ENVIRONMENT_NAME and forwards it explicitly via -e to the inner pixi run.
  2. Cython couldn't find cross-package .pxd files in cuda_core's cython tests. pixi-build installs cuda-bindings via a PEP 660 __path_hook__ finder; runtime imports honor it but Cython's filesystem .pxd resolver does not. Fix: replace the cythonize CLI invocation in cuda_core/tests/cython/build_tests.sh with a small Python wrapper (build_tests.py) that calls Cython.Build.cythonize() with an explicit include_path resolved from the imported cuda.bindings package.

Files changed

  • pixi.toml — three test-* tasks switched to bash -c '…' form forwarding -e "$PIXI_ENVIRONMENT_NAME".
  • cuda_core/tests/cython/build_tests.sh — invokes the new build_tests.py instead of cythonize CLI; still owns CPLUS_INCLUDE_PATH / CL setup.
  • cuda_core/tests/cython/build_tests.py — new; resolves the cuda namespace package's parent dir at runtime and runs cythonize() + setup(... build_ext --inplace) with an explicit include_path.

Test plan

  • pixi run test — passes 4,293 tests (971 pathfinder + 384 bindings + 2,938 core), 208 skipped, 3 xfailed.
  • pixi run -e cu13 test — passes (same totals).
  • pixi run test-pathfinder, pixi run test-bindings, pixi run test-core — each passes individually.
  • CI: full matrix run on this PR.

🤖 Generated with Claude Code

`pixi run test` failed at the cuda_bindings build stage because list-form
pixi `cmd` arrays didn't expand `$PIXI_ENVIRONMENT_NAME` reliably, so the
inner per-package `pixi run` calls picked the cuda_bindings default
environment (no cuda-version pin). The conda solver then resolved
cuda-version=12.9 and the build failed with a missing `CUatomicOperation_enum`
(a CUDA-13.x-only symbol).

Wrap the three test-* tasks in `bash -c '...'` so the shell expands
`$PIXI_ENVIRONMENT_NAME` and forward it explicitly via `-e` to each inner
pixi run.

Once the bindings build was unblocked, cuda_core's cython test build hit a
second issue: `cythonize` cannot resolve `cimport cuda.bindings.*` against
pixi-build's editable install, which exposes the cuda namespace package via a
finder hook that Cython's filesystem .pxd resolver does not consult. Replace
the `cythonize` CLI invocation with a small Python wrapper that calls
`Cython.Build.cythonize()` with an explicit `include_path` resolved from the
imported `cuda.bindings` package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rparolin rparolin added this to the cuda.core v1.0.0 milestone Apr 25, 2026
@rparolin rparolin added bug Something isn't working CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module labels Apr 25, 2026
@rparolin rparolin requested a review from cpcloud April 25, 2026 08:13
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rparolin rparolin self-assigned this Apr 25, 2026
Drop cuda_core/tests/cython/build_tests.py in favor of a small PYTHONPATH
shim in build_tests.sh. Same outcome (Cython's .pxd resolver finds
cuda.bindings via the package's parent directory), three lines instead of
a separate setuptools entry point.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

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

Labels

bug Something isn't working CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant