Skip to content

Commit 6df4e75

Browse files
rparolinclaude
andauthored
Fix pixi run test: CUDA 13.3 pin lag + cython-test .so placement (#2180)
* 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> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a3dfb8c commit 6df4e75

6 files changed

Lines changed: 1201 additions & 1297 deletions

File tree

cuda_bindings/pixi.lock

Lines changed: 445 additions & 517 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cuda_bindings/pixi.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ preview = ["pixi-build"]
1010
[workspace.build-variants]
1111
python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"]
1212
# Keep source-package metadata aligned with the consuming environment's CUDA major.
13-
cuda-version = ["12.*", "13.2.*"]
13+
cuda-version = ["12.*", "13.3.*"]
1414

1515
[feature.test.dependencies]
1616
cuda-bindings = { path = "." }
@@ -74,7 +74,7 @@ CUDA_HOME = "$CONDA_PREFIX/Library"
7474
cuda-version = "12.*"
7575

7676
[feature.cu13.dependencies]
77-
cuda-version = "13.2.*"
77+
cuda-version = "13.3.*"
7878

7979
[environments]
8080
default = { features = ["test", "cython-tests"], solve-group = "default" }

cuda_bindings/tests/cython/build_tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from __future__ import annotations
1414

15+
import os
1516
import sys
1617
from pathlib import Path
1718

@@ -45,6 +46,13 @@ def main() -> None:
4546
compiler_directives={"freethreading_compatible": True},
4647
)
4748

49+
# `build_ext --inplace` places the compiled .so relative to the current
50+
# working directory, but pixi runs this task from the project root. pytest
51+
# imports each extension by bare module name (see test_cython.py), which
52+
# only resolves when the .so sits in tests/cython (the dir pytest puts on
53+
# sys.path). chdir here so the .so lands next to its .pyx regardless of the
54+
# invoking cwd.
55+
os.chdir(script_dir)
4856
sys.argv = [sys.argv[0], "build_ext", "--inplace"]
4957
setup(name="cuda_bindings_cython_tests", ext_modules=ext_modules)
5058

0 commit comments

Comments
 (0)