From c1c766da59baa97ddc887e49b82cce718325c834 Mon Sep 17 00:00:00 2001 From: fairydreaming <166155368+fairydreaming@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:07:12 +0200 Subject: [PATCH] webgpu : reorder includes since V that appears in common_decls.tmpl may be defined as K in flash_attn_decls.tmpl if KV_OVERLAP (#27545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stanisław Szymczyk --- ggml/src/ggml-webgpu/wgsl-shaders/flash_attn.wgsl | 3 +-- ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_tile.wgsl | 2 +- ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_vec_split.wgsl | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn.wgsl b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn.wgsl index d5bf2af8d2..a7dee65128 100644 --- a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn.wgsl +++ b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn.wgsl @@ -5,10 +5,9 @@ enable subgroups; enable chromium_experimental_subgroup_matrix; #define BYTE_HELPERS -#include "common_decls.tmpl" - #define FLASH_ATTN_SCALAR_KV #include "flash_attn_decls.tmpl" +#include "common_decls.tmpl" // Default values // The actual values are defined in shader-lib. diff --git a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_tile.wgsl b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_tile.wgsl index 8cd18b9218..7edca84fc0 100644 --- a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_tile.wgsl +++ b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_tile.wgsl @@ -2,8 +2,8 @@ enable f16; enable subgroups; #define BYTE_HELPERS -#include "common_decls.tmpl" #include "flash_attn_decls.tmpl" +#include "common_decls.tmpl" // Default values // The actual values are defined in shader-lib. diff --git a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_vec_split.wgsl b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_vec_split.wgsl index 42f3b10890..ae941245cd 100644 --- a/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_vec_split.wgsl +++ b/ggml/src/ggml-webgpu/wgsl-shaders/flash_attn_vec_split.wgsl @@ -3,9 +3,9 @@ enable f16; enable subgroups; #define BYTE_HELPERS -#include "common_decls.tmpl" #define FLASH_ATTN_VEC_SPLIT #include "flash_attn_decls.tmpl" +#include "common_decls.tmpl" // Default values // The actual values are defined in shader-lib.