From c6c0ec6d5c7769f8e6c52df484d0abb90c2a3f8b Mon Sep 17 00:00:00 2001 From: Jhen-Jie Hong Date: Sun, 15 Nov 2026 02:06:01 +0800 Subject: [PATCH] hexagon: fix fa no-mask tail (#32243) --- ggml/src/ggml-hexagon/htp/flash-attn-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-hexagon/htp/flash-attn-ops.c b/ggml/src/ggml-hexagon/htp/flash-attn-ops.c index 0b7fc2dae..6506f28fc 100644 --- a/ggml/src/ggml-hexagon/htp/flash-attn-ops.c +++ b/ggml/src/ggml-hexagon/htp/flash-attn-ops.c @@ -1404,7 +1404,7 @@ static inline void fa_softmax_impl( } } else { size_t c = 0; - for (; c + 64 < kv_rows; c += 128) { + for (; c + 128 <= kv_rows; c += 128) { size_t ci0 = c / 64; size_t ci1 = ci0 + 1; v_s_rowmax0 = Q6_Vhf_vmax_VhfVhf(v_s_rowmax0, my_row_buf0[ci0]);