]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml-cpu: Use tiled FA for prompt-processing (#19012)
authorAman Gupta <redacted>
Sun, 25 Jan 2026 15:25:58 +0000 (23:25 +0800)
committerGitHub <redacted>
Sun, 25 Jan 2026 15:25:58 +0000 (23:25 +0800)
commitbcb43163aed6a8986cf3d66e90848c9c258d4936
treee0f07edf0c8dec79ea11ba986c1955b235071281
parentd9c6ce46f747189cd6238ca7699253613f77c016
ggml-cpu: Use tiled FA for prompt-processing (#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
ggml/src/ggml-cpu/common.h
ggml/src/ggml-cpu/ggml-cpu.c
ggml/src/ggml-cpu/ops.cpp