-
Notifications
You must be signed in to change notification settings - Fork 103
Build failure on modern toolchains (GCC 13+ / CUDA 13) due to redefinition errors from forced -include,cassert #122
Open
Description
When compiling SpargeAttn on a modern system using GCC 13+ and newer CUDA toolkits, the build fails via ninja with multiple redefinition errors, such as:
error: redefinition of ‘void std::__terminate()’
Root Cause:
In setup.py, the compilation flags force a global include of cassert:
"-Xcompiler", "-include,cassert"
However, csrc/qattn/qk_int_sv_f8_cuda_sm90.cuh also explicitly declares #include on line 21. On stricter, modern compilers, this double-inclusion bypasses header guards during command-line pre-processing and breaks standard library macros.
Fix:
Remove or comment out "-Xcompiler", "-include,cassert" from setup.py, as the required source files already explicitly include natively.
Activity
Metadata
Metadata
Assignees
Labels
No labels