llama.cpp
4c1004c4 - cuda: cap MMQ Stream-K blocks at available work (#30553)

Commit
13 days ago
cuda: cap MMQ Stream-K blocks at available work (#30553) * cuda: cap Stream-K blocks at the number of k-blocks Stream-K normally launches one CUDA block per SM. For small matrices, this can exceed the total number of output-tile/k-block pairs, leaving blocks with no work and adding launch and fixup overhead. Cap the grid at that count to remove these excess blocks without changing the useful rounded K ranges or numerical results. Assisted-by: Codex * cuda: cap Stream-K blocks at the number of k iterations Cap the grid at the number of K_vram iterations across all output tiles, rounding up partial iterations. This removes extra CUDA blocks left by the k-block cap. Partial iterations can change FP32 summation grouping. MUL_MAT and MUL_MAT_ID backend tests pass on RTX 5090. * Update ggml/src/ggml-cuda/mmq.cuh --------- Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
Author
Parents
Loading