]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Increase number of output elements per-thread block if the K-dimension is small ...
authorGaurav Garg <redacted>
Sun, 22 Mar 2026 08:49:35 +0000 (14:19 +0530)
committerGeorgi Gerganov <redacted>
Sun, 29 Mar 2026 12:04:36 +0000 (15:04 +0300)
commit77b635e9c4f0e3a8fe0252f2197f61b37a62a22c
treee0dac83e0f069ef6de04b5e3018fefd45acd6e25
parent5f3428219a79f5c24604d9d34a3a4a0cbbc1e212
Increase number of output elements per-thread block if the K-dimension is small (llama/20635)

* Increase per-thread work if the K-dimension is small

With tensor parallelism, the K-dimension of the FFN-down matrices is split, which makes it quite small, especially for MOEs. For example, Qwen3-30b-A3B has a K-dimension of 768, and Qwen3235B-A22B has k-dimension of 1536.
The current heuristic uses a group of 4 warps irrespective of K-dimension size, resulting in some of the threads being idle. This results in poor performance for these matrices.

This change increases the number of output elements per block for such cases.

* Limit this change to ncols_dst = 1

* tab to space
ggml/src/ggml-cuda/mmvq.cu