]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
vulkan: optimize decodeFuncB in coopmat2 mul_mat_id shader (llama/18349)
authorJeff Bolz <redacted>
Fri, 26 Dec 2025 17:15:50 +0000 (11:15 -0600)
committerGeorgi Gerganov <redacted>
Wed, 31 Dec 2025 15:52:09 +0000 (17:52 +0200)
commite37c8ed94ed0ef583de68c41e8d7cca764867093
tree0cfa01214f02f021d5e008a0469988ff46a6b3c9
parent331c6ccd31b0639da088ea093fe6b9d38ec18ee4
vulkan: optimize decodeFuncB in coopmat2 mul_mat_id shader (llama/18349)

* vulkan: Use BK=32 for coopmat2 mul_mat_id

* vulkan: optimize decodeFuncB in coopmat2 mul_mat_id shader

Disable robustness, remove the OOB check in decodeFuncB, and initialize the
row_ids to zero to avoid OOB access.

Don't slice/offset the B matrix to ic * BN, only to adjust the coord back down
to the range [0, BN) in decodeFuncB. Instead just slice with a row offset of
zero and remove the '& (BN - 1)'. This allows the compiler to common some of
the shared memory loads.
ggml/src/ggml-vulkan/ggml-vulkan.cpp
ggml/src/ggml-vulkan/vulkan-shaders/mul_mm_cm2.comp