ggml-webgpu: only use subgroup-matrix path when head dims are divisib…#23020
Merged
reeselevine merged 1 commit intoMay 13, 2026
Merged
Conversation
…le by sg_mat_k / sg_mat_n
CISC
approved these changes
May 13, 2026
Contributor
|
Nice I wonder if this is the same failure I'm observing just now as I try to enable the nvidia ci: https://github.com/ggml-org/llama.cpp/actions/runs/25816362883/job/75845993489?pr=22976#step:4:13081 |
reeselevine
approved these changes
May 13, 2026
Contributor
Author
|
Yea very likely, These tests were also failed on my Jetson Thor as they have |
xxmustafacooTR
pushed a commit
to xxPlayground/llama-cpp-turboquant
that referenced
this pull request
May 14, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
dandm1
pushed a commit
to dandm1/llama.cpp
that referenced
this pull request
May 16, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
rsenthilkumar6
pushed a commit
to rsenthilkumar6/llama.cpp
that referenced
this pull request
May 19, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
baramofme
pushed a commit
to baramofme/llama-cpp-turboquant
that referenced
this pull request
May 23, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
winstonma
pushed a commit
to winstonma/llama.cpp
that referenced
this pull request
May 27, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
fewtarius
pushed a commit
to fewtarius/llama.cpp
that referenced
this pull request
May 30, 2026
…le by sg_mat_k / sg_mat_n (ggml-org#23020)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Previously, WebGPU FlashAttention selected the subgroup matrix path whenever subgroup matrix support was available. However, this fails in certain cases. For example, Jetson Thor’s smallest supported subgroup matrix shape is 16x16x16, which is incompatible with head dimensions such as 40 and 72.
This change adds a shape guard before selecting the subgroup matrix path. Specifically, it requires:
head_dim_qk % sg_mat_k == 0andhead_dim_v % sg_mat_n == 0.Requirements
I used an AI agent to help me understand why the tests are failing on my Jetson Thor machine.