]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
vulkan: Preprocess FA mask to detect all-neg-inf and all-zero. (llama/19281)
authorJeff Bolz <redacted>
Thu, 5 Feb 2026 15:26:38 +0000 (09:26 -0600)
committerGeorgi Gerganov <redacted>
Sun, 8 Feb 2026 07:29:10 +0000 (09:29 +0200)
commita567c140a3d8a043f9bf78d48a79066f30d8d7a7
tree4ce12098e7c3fcdeeddefe62edacd62afe0d6a7d
parent0781df25183fc674d84db01a0da94289c83b3a03
vulkan: Preprocess FA mask to detect all-neg-inf and all-zero. (llama/19281)

Write out a 2-bit code per block and avoid loading the mask when it
matches these two common cases.

Apply this optimization when the mask is relatively large (i.e. prompt
processing).
ggml/src/ggml-vulkan/ggml-vulkan.cpp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn.comp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_base.glsl
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm1.comp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp
ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_mask_opt.comp [new file with mode: 0644]
ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp