llama.cpp
5e86149b - metal : fix flash attention kv_rows with partial K/V chunks

Commit
1 hour ago
metal : fix flash attention kv_rows with partial K/V chunks The kv_rows path assumed the row lists are padded to the kernel chunk (256/64/32) and asserted it, so a partial last chunk was mishandled: - the pad kernel copied cache columns instead of the gathered rows, and the pad buffer was sized/indexed per cache stream (ne13) instead of per q slice (ne03), so slices >= 1 read the wrong region - the vec path did not gather the partial chunk through the row list and read V at the wrong pad offset, dropping the last chunk - direct row reads applied the cache stream stride to a shared cache Gather the partial chunk through the row list, size the pad per slice, and zero the stream stride for direct row reads. Also allow BF16 K/V with kv_rows: the non-vec gather converts to F16 and the tensor path uses the f16 kernel over the gathered rows. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB)
Author
Parents
Loading