]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
vulkan: optimize decodeFuncB in coopmat2 mul_mat_id shader (#18349)
authorJeff Bolz <redacted>
Fri, 26 Dec 2025 17:15:50 +0000 (11:15 -0600)
committerGitHub <redacted>
Fri, 26 Dec 2025 17:15:50 +0000 (18:15 +0100)
commit7ac8902133da6eb390c4d8368a7d252279123942
tree092e1cdb5b8dec76a4ecc2d42502393983c7f742
parent9bf20d8ac3dc05dc23e6890144816b4becc85f9d
vulkan: optimize decodeFuncB in coopmat2 mul_mat_id shader (#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