You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
candle-kernels custom build script (cudaforge::build_lib()) fails during compilation of the MoE static library on Windows with MSVC + CUDA 13.3. The PTX build (build_ptx()) succeeds, but the subsequent static library build for MoE/quant kernels exits with code 1 and no detailed error message.
All other CUDA crates (mistralrs-quant, mistralrs-paged-attn, mistralrs-core) compile successfully.
Reproduction
Clone the latest master:
git clone https://github.com/EricLBuehler/mistral.rs.git
cd mistral.rs
The error is propagated via ? in the build script, so cudaforge's inner nvcc error message is not displayed. This is likely an nvlink or CRT mismatch issue specific to MSVC + CUDA 13.3.
Building without --features cuda (CPU-only) works fine.
mistralrs-quant, mistralrs-paged-attn, mistralrs-core all compile their CUDA kernels successfully.
The build_lib() output file on MSVC would be out_dir\libmoe.lib rather than libmoe.a, but this is already handled in the build script for MSVC targets.
One related workaround: a user on candle issue #3166 reported that compiling PTX manually via direct nvcc invocation (bypassing bindgen_cuda) resolved a similar issue, though that was a different underlying cause (CUDA path detection).
Describe the bug
candle-kernelscustom build script (cudaforge::build_lib()) fails during compilation of the MoE static library on Windows with MSVC + CUDA 13.3. The PTX build (build_ptx()) succeeds, but the subsequent static library build for MoE/quant kernels exits with code 1 and no detailed error message.All other CUDA crates (
mistralrs-quant,mistralrs-paged-attn,mistralrs-core) compile successfully.Reproduction
Or to isolate the failing crate:
Error output
The build.rs (from
candle-kernelspinned atrev=78e1d85) has two stages:build_ptx()— scanssrc/*.cu, compiles for PTX → succeeds (all .cu files printed)build_lib("libmoe.a")— compiles MoE kernels as a static library → fails with exit code 1The failing
build_lib()call in candle-kernels/build.rs compiles these source files:src/moe/moe_gguf.cusrc/moe/moe_wmma.cusrc/moe/moe_wmma_gguf.cusrc/mmvq_gguf.cusrc/mmq_gguf/mmq_*.cu(6 files)The error is propagated via
?in the build script, so cudaforge's inner nvcc error message is not displayed. This is likely an nvlink or CRT mismatch issue specific to MSVC + CUDA 13.3.Environment
Additional context
--features cuda(CPU-only) works fine.mistralrs-quant,mistralrs-paged-attn,mistralrs-coreall compile their CUDA kernels successfully.build_lib()output file on MSVC would beout_dir\libmoe.librather thanlibmoe.a, but this is already handled in the build script for MSVC targets.bindgen_cuda) resolved a similar issue, though that was a different underlying cause (CUDA path detection).