]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
vulkan: Support FA with any multiple of 8 head sizes (llama/15537)
authorJeff Bolz <redacted>
Sun, 24 Aug 2025 09:24:25 +0000 (04:24 -0500)
committerGeorgi Gerganov <redacted>
Sat, 20 Sep 2025 10:42:40 +0000 (13:42 +0300)
commit85d4d2c875edcb1e850208b4817c8e0d1536911e
tree998e4929f58b479bcc02429a6d320841817fed31
parent8c7872d6edad65c6658036049369d020a09180d8
vulkan: Support FA with any multiple of 8 head sizes (llama/15537)

The scalar FA shader already handled multiples of 8. The coopmat1 FA
shader assumed 16x16x16 and the shared memory allocations need the HSK
dimensions padded to a multiple of 16. NVIDIA's coopmat2 implementation
requires multiples of 16 for N and K, and needs the matrix dimensions
padded and loads clamped.

Store the FA pipelines in a map, indexed by the pipeline state.
ggml/src/ggml-vulkan/ggml-vulkan.cpp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_base.comp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm1.comp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp