]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
vulkan: enable coopmat2 FA gqa and split_k optimizations more often (#12931)
authorJeff Bolz <redacted>
Wed, 16 Apr 2025 18:37:25 +0000 (13:37 -0500)
committerGitHub <redacted>
Wed, 16 Apr 2025 18:37:25 +0000 (20:37 +0200)
commit015022bb53387baa8b23817ac03743705c7d472b
treeed368f03e6e73e212fc9867fea81f4ca7200b10f
parentb43d89e311c5e7fbf62e5ec3c0401eb536677267
vulkan: enable coopmat2 FA gqa and split_k optimizations more often (#12931)

The grouped query attention optmization doesn't require a power of two ratio,
the only thing relying on it was the modulo operation written as bitwise &.

split_k need not depend on gqa_ratio - enable it any time there's only one
workgroup in the X dimension. The shader gets the split index from the x coord,
and multiple workgroups in the X dimension (pre-split) indicates a larger
FA operation that wouldn't need splitting.
ggml/src/ggml-vulkan/ggml-vulkan.cpp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp
tests/test-backend-ops.cpp