llama.cpp
hexagon: flash attention rework (optimizations, accuracy improvements, etc)
#25085
Merged

hexagon: flash attention rework (optimizations, accuracy improvements, etc) #25085

max-krasnyansky
github-actions github-actions added ggml
github-actions github-actions added Hexagon
njsyw1997
njsyw1997 commented on 2026-06-30
max-krasnyansky max-krasnyansky force pushed from 1fd4d418 to 74ddd9cd 10 days ago
max-krasnyansky max-krasnyansky force pushed from 2fcf4aab to a6aa8ea3 10 days ago
max-krasnyansky hex-mm: fold mm quant tasks into the main matmul threads
93879d1b
max-krasnyansky hex-mm: minor formatting fixes
0353a74e
max-krasnyansky hex-mm: cleanup is_quant checks in dma dispatch
56d55b25
max-krasnyansky hex-mm: fix dst-spad alignment
692951b0
max-krasnyansky hex-mm: move fp kernels in the hvx-mm-kernels header
ba85f82b
max-krasnyansky hex-mm: fuse with ADD
ab39f62c
max-krasnyansky hex-fa: factor out ukernels into separate headers and unify the rest
919c5e9d
max-krasnyansky hex-fa: move kernel-params compute into the host
4748d680
max-krasnyansky hex-fa: refactor vtcm alloc for consistency
0c5324d9
max-krasnyansky hex-fa: add support for FA_SELECT
50d97efb
max-krasnyansky hex-fa: update tracing insrumentation to cover all functions
c5c33a88
max-krasnyansky hex-fa: update hvx fallback thresholds to recover t/g regressions
a2a8f1e7
max-krasnyansky hex-fa: update tracing instrumentation
baaaf591
max-krasnyansky hex-fa: improved tracing with additional events
beaa2a07
max-krasnyansky hex-fa: optimize mask processing (fastdiv, etc)
950b44a5
max-krasnyansky hex-fa: improve mask dma caching
39fc2979
max-krasnyansky hmx-fa: change loop order to maximize mask cache hits
1a1bd4ab
max-krasnyansky hex-fa: remove over instrumentation
022744fa
max-krasnyansky hex-fa: breakdown QKV prep trace events
cf6060bd
max-krasnyansky hmx-fa: further mask proc optimizations
998367ce
max-krasnyansky hex-fa: mask broadcast is the common case, optimize for that
49ff8fdd
max-krasnyansky hex-fa: use aligned loads where possible
f27a3b9a
max-krasnyansky hex-fa: update loops to use uint32_t indices
ca0a1855
max-krasnyansky hmx-fa: fold vtcm init into q prep task
b9529ef5
max-krasnyansky hex-fa: update rest of the hmx funcs to use uint32_t
c8e1889b
max-krasnyansky hmx-fa: fold build_d into the main softmax loop
3e38899d
max-krasnyansky hmx-fa: start kv dmas earlier
ade6dd4f
max-krasnyansky hmx-fa: start mask dma a bit earlier
c3497dd3
max-krasnyansky hex-fa: precompute rows per task to avoid divs
a8c0be39
max-krasnyansky hmx-fa: specialize fa_o_store for f16 and f32
cb850e99
max-krasnyansky hmx-fa: prelim support for Sinks
12baed10
max-krasnyansky hmx-fa: keep softmax accumulators in fp32
7ef475c3
max-krasnyansky hex-fa: add tanh_f16 and exp2_f16 and use that in FA
83dcc573
max-krasnyansky hex-fa: use fp16 math in the hvx kernel
a8c6152a
max-krasnyansky hex-fa: avoid expensive float -> __fp16 cast for slopes and softcap
272637b3
max-krasnyansky hex-fa: replace most vec_exp_f32 with vec_exp2_f16
4528f546
max-krasnyansky hmx-fa: vectorize sinks update
5251c935
max-krasnyansky hex-fa: minor formatting
b7825677
max-krasnyansky hmx-fa: fold softcap loop into the tile load
32bf5a5b
max-krasnyansky hmx-fa: use vectoralias to populate sinks
54dea952
max-krasnyansky hex-fa: remove redudant check
eb59d190
max-krasnyansky hex-fa: fix vtcm size compute to use fp32 for accumulators
adfdad46
max-krasnyansky hex-mm: fix trailing spaces
51200241
max-krasnyansky hmx-fa: dont use -inf to init mask to avoid conversion overflows
1a07912a
max-krasnyansky hex-fa: no need to explicitly guard -inf in the f16->f32 converter now
61ce103d
max-krasnyansky hmx-fa: cleanup fa sinks handling
bc6d1339
max-krasnyansky hex-mm: fixed src2 stride handling when mm is fused with add
eb03f58b
max-krasnyansky hex-fa: make lto happy
65a315bf
max-krasnyansky max-krasnyansky force pushed from a6aa8ea3 to 65a315bf 10 days ago
max-krasnyansky max-krasnyansky marked this pull request as ready for review 10 days ago
max-krasnyansky max-krasnyansky requested a review 10 days ago
max-krasnyansky
lhez
lhez approved these changes on 2026-07-01
CISC
CISC approved these changes on 2026-07-01
max-krasnyansky max-krasnyansky merged 13e67386 into master 9 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone