Fix bug in CPU floash attention for bf16 KV cache (#1521)

This commit is contained in:
Kawrakow 2026-03-26 17:22:27 +01:00 committed by GitHub
parent e46601cb19
commit 8ab016e2d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -2008,6 +2008,7 @@ struct FlashAttnBF16 {
q += q_step*stride_q;
mask += q_step*stride_m;
qkv += q_step*stride_qkv;
if (M && S) { M += q_step; S += q_step; }
}
int n_left = nq1 - q_step*(nq1/q_step);
if (n_left > 0) {