-
Notifications
You must be signed in to change notification settings - Fork 465
Description
Checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
Reproducer:
$ pixi --version
pixi 0.49.0
$ git clone --recursive https://github.com/cupy/cupy.git
$ cd cupy
$ # add the pixi.toml below to the root
$ pixi install -e cu129 -vv
$ pixi install -e cu128 -vvThis is my pixi.toml
# Specifies properties for the whole workspace
[workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64", "win-64"]
preview = ["pixi-build"] # the feature is in preview
[workspace.build-variants]
cuda-version = ["12.9.*", "12.8.*"]
[feature.cu129.dependencies]
cuda-version = "12.9.*"
[feature.cu128.dependencies]
cuda-version = "12.8.*"
[environments]
cu129 = ["cu129"]
cu128 = ["cu128"]
# There can be multiple packages in a workspace
# In `package` you specify properties specific to the package
[package]
name = "cupy"
version = "14.0.0a0"
# Here the build system of the package is specified
# We are using `pixi-build-python` in order to build a Python package
[package.build]
backend = { name = "pixi-build-python", version = "*" }
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
]
[package.build.configuration]
env = { NVCC = "$PREFIX/bin/nvcc", CUDA_PATH = "$PREFIX/targets/x86_64-linux/", CUPY_NVCC_GENERATE_CODE = "arch=compute_86,code=sm_86;arch=compute_89,code=sm_89", CUPY_NUM_BUILD_JOBS = "$(nproc)" }
noarch = false # Build platform-specific package
[package.host-dependencies]
cuda-version = "*"
libcublas-dev = "*"
libcusolver-dev = "*"
libcusparse-dev = "*"
libcufft-dev = "*"
libcurand-dev = "*"
cuda-nvcc = "*"
cuda-nvrtc-dev = "*"
cuda-nvtx-dev = "*"
cuda-profiler-api = "*"
fastrlock = ">=0.5"
setuptools = ">=77"
cython = ">=3.0,<3.2"
python = ">=3.9"
# We add our package as dependency to the workspace
# If the directory contains a `pixi.toml`, `pixi-build` will be used to build the package
[dependencies]
cupy = { path = "." }
python = ">=3.9"
numpy = "*"
fastrlock = ">=0.5"which more or less follows what we have in cupy-feedstock.
Issue description
Hey team, I made a pixi.toml for building CuPy from source (with CuPy developers in mind) and it’s blazingly fast, thank you very much for the awesome work!!!
I have one observation on the caching behavior for variants. I wanted to have variants cu120, cu121, …, cu129 so that I can build/test against any CUDA 12.x version. However I find if I run the above reproducer, the 2nd time onward there won’t be any rebuild (so installing cu128 does not re-compile at all). Am I doing something wrong?
Expected behavior
Each variant should be built once and then cached; installing an uncached variant should trigger a build.