local-ai · review · first seen Nov 30, 10:32 UTC
llama.cpp adds Vulkan flash-attention row-tile folding
llama.cpp b12857 shipped Vulkan flash-attention row-tile folding for verify tokens and GQA heads, with shape-gated query-token folding and a CM2 shader port. A builder should care if their Vulkan workload uses those cases, but the supplied source does not establish a performance benefit.
In short
- b12857 shipped Vulkan row-tile folding for verify tokens and GQA heads.
- Query-token folding is shape-gated; the eligible shapes are not specified here.
- CM2 received the port, but no measured workload benefit is supplied.
What shipped
The b12857 pre-release folds verify tokens and GQA heads into one Vulkan flash-attention row tile. That is the specific shipped change, not a claim about every attention operation. The release excerpt also says backend-operations tests were updated and GQA test cases with query tokens and folded tiles were refactored. I would inspect those cases when evaluating the change, but test edits are not evidence of a performance gain. [1]
b12857 also enables shape-gated query-token folding for Vulkan. The gate is an important qualification: selecting Vulkan alone does not establish that a particular query shape takes the folded path. The supplied excerpt gives no eligibility threshold, list of shapes, or way to force folding. I would treat path selection as something to check for each workload, rather than assume the change applies to every request. [1]
The folding work was ported to the CM2 flash-attention shader. The same release excerpt names an accumulator-scaling update in flash_attn.comp and scalar shared-memory support in ggml_vk_flash_attn. It lists Ubuntu x64 and arm64 Vulkan builds, but gives no device-specific results. It also lists an [attestation](https://github.com/ggml-org/llama.cpp/attestations/73936660); that link is not a benchmark in the supplied material. [1][2]
Why it matters if you build
For someone already evaluating llama.cpp on Vulkan, the immediate question is whether their verify-token and GQA-head workload reaches the folded row tile. I would compare that workload on my current build and b12857 with the same inputs. The release establishes that the implementation shipped, but supplies no latency, throughput, memory-use, or correctness measurements for a builder's workload. It cannot, by itself, justify a performance-based rollout. [1][2]
The shape gate limits what a trial can tell you. A result for one query shape does not establish the result for another. Record the shapes you exercise and keep observations separate by case. Because the excerpt gives no eligibility rule, a run with no observed difference would not, on its own, tell me whether folding was ineligible or whether its effect was not apparent in that run. That distinction matters before attributing a result to this change. [1]
If CM2 is part of your Vulkan evaluation, check it separately. The port establishes that folding was added to that shader; it does not establish equal behavior or cost across shaders. The updated GQA and query-token test cases offer a concrete place to examine coverage before relying on the path. The near-term cost is evaluation work: identify the cases you run, check whether they qualify, and measure your own outcomes. No saved time, memory, or deployment cost is quantified here. [1][2][3]
How to try it today
- Identify an existing Vulkan workload with verify tokens and GQA heads.
- Inspect b12857 and its listed Ubuntu x64 or arm64 Vulkan build if one fits your setup.
- Review the updated backend-operations tests, particularly GQA cases with query tokens and folded tiles.
- Compare your current build with b12857 using the same inputs, and record query shapes separately.
- If you use CM2 flash-attention, evaluate that shader separately.
What we checked
Every claim below was walked down the source ladder. The rung is how close the source is to the thing itself; the tense is the source's own.
-
shipped L0 · primary
llama.cpp b12857 folds verify tokens and GQA heads into one Vulkan flash-attention row tile.
per GitHub releases · ggml-org/llama.cpp (L0) -
shipped L0 · primary
llama.cpp b12857 enables shape-gated query-token folding for Vulkan.
per GitHub releases · ggml-org/llama.cpp (L0) -
shipped L0 · primary
llama.cpp b12857 ports folding to the CM2 flash-attention shader.
per GitHub releases · ggml-org/llama.cpp (L0)
What is not confirmed
The supplied source does not identify which query shapes pass the gate or confirm that a given run uses folding. It reports no measured gain in latency, throughput, memory use, or cost, and no equivalent outcome across devices or shaders. The listed attestation does not provide those findings in the excerpt. A release title should not stand in for a path check or a workload measurement. [1][2][3]
Who should act, who should wait
I would test b12857 now if I already used llama.cpp Vulkan with verify-token and GQA-head cases and could compare it against my current setup. I would include CM2 only if it were in my path, and keep query shapes distinct. I would wait before changing a working deployment if I needed a stated eligibility rule, measured benefit, or device-specific evidence first. The supplied source makes this a candidate for evaluation, not a demonstrated improvement for every Vulkan user. [1][2][3]
Sources
- b12857 — GitHub releases · ggml-org/llama.cpp L0 · primary