Fix bug in CPU floash attention for bf16 KV cache (#1521)
This commit is contained in:
parent
e46601cb19
commit
8ab016e2d5
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue