ggml-webgpu: Fix bug in FlashAttention support check (llama/22492)

* Fix flashattention support check for devices that don't support subgroups

* set path to none if kv_tile doesn't fit
This commit is contained in:
Reese Levine
2026-04-30 11:29:23 +03:00
committed by Georgi Gerganov
parent 3076725eb0
commit fa20229eeb
2 changed files with 31 additions and 17 deletions
+4
View File
@@ -3918,6 +3918,10 @@ static bool ggml_backend_webgpu_device_supports_op(ggml_backend_dev_t dev, const
shader_lib_ctx, ctx->webgpu_global_ctx->capabilities.limits.minStorageBufferOffsetAlignment);
const size_t limit_bytes = ctx->webgpu_global_ctx->capabilities.limits.maxComputeWorkgroupStorageSize;
const bool has_mask = op->src[3] != nullptr;
if (decisions.path == GGML_WEBGPU_FLASH_ATTN_PATH_NONE) {
supports_op = false;
break;
}
if (decisions.path == GGML_WEBGPU_FLASH_ATTN_PATH_VEC) {
const size_t min_bytes =
ggml_webgpu_flash_attn_wg_mem_bytes(decisions.q_tile, decisions.kv_tile, (uint32_t) src0->ne[0],