fix(test): unblock root pixi run test workflow#1978
Open
rparolin wants to merge 3 commits intoNVIDIA:mainfrom
Open
fix(test): unblock root pixi run test workflow#1978rparolin wants to merge 3 commits intoNVIDIA:mainfrom
rparolin wants to merge 3 commits intoNVIDIA:mainfrom
Conversation
`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>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pixi run testwas failing end-to-end. Two stacked root causes:cmdarrays didn't expand$PIXI_ENVIRONMENT_NAME. The roottest-*tasks dropped into each sub-package without forwarding the active environment, so the innerpixi runpicked thecuda_bindingsdefault environment (no cuda-version pin). The conda solver resolvedcuda-version=12.9, and the build failed compiling Cython output that referencesCUatomicOperation_enum(a CUDA-13.x-only symbol). Fix: wrap eachtest-*task inbash -c '…'so the shell expands$PIXI_ENVIRONMENT_NAMEand forwards it explicitly via-eto the innerpixi run..pxdfiles incuda_core's cython tests. pixi-build installscuda-bindingsvia a PEP 660__path_hook__finder; runtime imports honor it but Cython's filesystem.pxdresolver does not. Fix: replace thecythonizeCLI invocation incuda_core/tests/cython/build_tests.shwith a small Python wrapper (build_tests.py) that callsCython.Build.cythonize()with an explicitinclude_pathresolved from the importedcuda.bindingspackage.Files changed
pixi.toml— threetest-*tasks switched tobash -c '…'form forwarding-e "$PIXI_ENVIRONMENT_NAME".cuda_core/tests/cython/build_tests.sh— invokes the newbuild_tests.pyinstead ofcythonizeCLI; still ownsCPLUS_INCLUDE_PATH/CLsetup.cuda_core/tests/cython/build_tests.py— new; resolves the cuda namespace package's parent dir at runtime and runscythonize() + setup(... build_ext --inplace)with an explicitinclude_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.🤖 Generated with Claude Code