CUDA + ggml: add sparse-fa for DSV4/GLM (llama/27970)

This commit is contained in:
Aman Gupta
2026-09-04 13:39:40 +03:00
committed by Georgi Gerganov
parent c2b400754b
commit 519df618df
7 changed files with 324 additions and 86 deletions
+6
View File
@@ -2453,6 +2453,12 @@ extern "C" {
GGML_API enum ggml_prec ggml_flash_attn_ext_get_prec(
const struct ggml_tensor * a);
// Use finite mask entries as a sparse K/V set. Set 0 to disable.
// n_kv_max must bound the number of finite entries in every mask row.
GGML_API void ggml_flash_attn_ext_set_n_kv_max(
struct ggml_tensor * a,
int32_t n_kv_max);
GGML_API void ggml_flash_attn_ext_add_sinks(
struct ggml_tensor * a,
struct ggml_tensor * sinks);