]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml-cpu: Use tiled FA for prompt-processing (llama/19012)
authorAman Gupta <redacted>
Sun, 25 Jan 2026 15:25:58 +0000 (23:25 +0800)
committerGeorgi Gerganov <redacted>
Fri, 30 Jan 2026 11:49:29 +0000 (13:49 +0200)
commit10e7b315af0ad8db0a5110d01f89e04878a5c285
treee7cdf3a4cab8418d8b48866e0bb407494f370ee1
parentfce2ea41b8c2b9bfd59a6f228c1fb9ca4c56f71e
ggml-cpu: Use tiled FA for prompt-processing (llama/19012)

* ggml-cpu: Use tiled FA for prompt-processing

the FA performance is gimped on CPU on long contexts because it essentially uses a vector kernel. This PR adds a tiled FA for PP. Perf tuning for tile sizes done on a AMD EPYC single-socket 64-c machine.

* fix out of bounds for mask

* skip rows where there are all masks

* skip tile if mask is inf

* store mask in worksize

* check inf tile earlier
src/ggml-cpu/common.h
src/ggml-cpu/ggml-cpu.c
src/ggml-cpu/ops.cpp