mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-22 03:48:19 +02:00
metal : fix mask bounds in flash attention block pre-pass (llama/29220)
This commit is contained in:
committed by
Georgi Gerganov
parent
0e640a1801
commit
63412d34b8
@@ -142,7 +142,7 @@ kernel void kernel_flash_attn_ext_blk(
|
||||
const int32_t i1 = tgpig[1];
|
||||
const int32_t i0 = tgpig[0];
|
||||
|
||||
char res = i0*C + C > args.ne30 ? 1 : 0;
|
||||
char res = i0*C + C > args.ne30 || i1*Q + Q > args.ne31 ? 1 : 0;
|
||||
|
||||
device const half * mask_src = (device const half *) (mask + (i1*Q)*args.nb31 + i2*args.nb32 + i3*args.nb33) + i0*C + tiisg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user