The llama.cpp project released version b11140, which includes a CUDA optimization enabling sparse-fa for dsv4 prefill. This update addresses performance issues in the flash attention mask scanning process by templating kernels to allow compile-time loop unrolling.
- The query loop of `flash_attn_mask_to_sparse_indices` is now bounded at compile time, reducing scan time from 46 to 17 microseconds for sparse decode shapes with 49k columns.
- Out-of-bounds checks for the sparse mask scan are moved to host code, allowing the batched sparse operation at 49k context to drop from 586 to 244 microseconds.
This release provides binaries for macOS, Linux, Windows, Android, and openEuler across CPU, GPU, and NPU backends.