From 77e2db8cabdb83f8da59d8584a381b2299d8a171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Sv=C3=ADtil?= <32205472+mistrjirka@users.noreply.github.com> Date: Wed, 11 Nov 2026 09:45:34 +0100 Subject: [PATCH] cuda : add sm70 FlashAttention config case for DKQ=256, DV=256, ncols=64 (#27997) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CUDA : add sm70 FlashAttention config case for the 256x256 head * CUDA : tune sm70 FlashAttention for 256x256 ncols=32 Assisted-by: Codex --------- Co-authored-by: Jirka Svítil --- ggml/src/ggml-cuda/fattn-mma-f16.cuh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ggml/src/ggml-cuda/fattn-mma-f16.cuh b/ggml/src/ggml-cuda/fattn-mma-f16.cuh index 2ce2fb261..07a6db842 100644 --- a/ggml/src/ggml-cuda/fattn-mma-f16.cuh +++ b/ggml/src/ggml-cuda/fattn-mma-f16.cuh @@ -133,6 +133,9 @@ static constexpr __host__ __device__ fattn_mma_config ggml_cuda_fattn_mma_get_co GGML_CUDA_FATTN_MMA_CONFIG_CASE(576, 512, 32, 128, 2, 32, 160, 128, 64, 1, false); GGML_CUDA_FATTN_MMA_CONFIG_CASE(576, 512, 64, 256, 1, 32, 160, 128, 64, 1, false); + GGML_CUDA_FATTN_MMA_CONFIG_CASE(256, 256, 32, 128, 2, 32, 128, 128, 64, 1, false); + GGML_CUDA_FATTN_MMA_CONFIG_CASE(256, 256, 64, 128, 2, 32, 128, 64, 128, 2, false); + // TODO tune specifically for Volta return ggml_cuda_fattn_mma_get_config_ampere(DKQ, DV, ncols); }