Skip to content

ggml-webgpu: Fix bug in FlashAttention support check#22492

Merged
ggerganov merged 2 commits into
ggml-org:masterfrom
reeselevine:flashattn-support-fix
Apr 29, 2026
Merged

ggml-webgpu: Fix bug in FlashAttention support check#22492
ggerganov merged 2 commits into
ggml-org:masterfrom
reeselevine:flashattn-support-fix

Conversation

@reeselevine

Copy link
Copy Markdown
Contributor

#22199 enabled FlashAttention in the browser (non subgroup-matrix paths). However, the check in supports-op had a fallback to the subgroup-matrix path if the new tile path wasn't supported (e.g., if the browser doesn't support subgroups). This caused an error when calculating some of the shader parameters. This PR fixes the issue by returning false early in the support check if none of the flashattention variants will work.

fyi @ArberSephirotheca.

Requirements

@reeselevine
reeselevine requested a review from a team as a code owner April 29, 2026 00:25
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning WebGPU labels Apr 29, 2026
Comment thread ggml/src/ggml-webgpu/ggml-webgpu-shader-lib.hpp
@reeselevine reeselevine added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Apr 29, 2026
@ggerganov
ggerganov merged commit d6a5094 into ggml-org:master Apr 29, 2026
44 of 46 checks passed
samuraieng pushed a commit to samuraieng/llama.cpp that referenced this pull request May 6, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
meh pushed a commit to meh/llama.cpp that referenced this pull request May 10, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
winstonma pushed a commit to winstonma/llama.cpp that referenced this pull request May 27, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
MrLordCat referenced this pull request in MrLordCat/llama.cpp-with-GUI Jul 16, 2026
* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. WebGPU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants