llama.cpp b12094

b12094Pre-release
Changed 4
  • Faster TOP_K for the Hexagon backend sampler by skipping tiles whose max cannot reach the running k-th best value before sorting.
  • Replaced the Hexagon tile bitonic sort with a top_k_scan() routine that rejects 256-float blocks with a single HVX max-reduce and inserts only surviving elements into a sorted k-entry list.
  • Hexagon TOP_K fast path is used for k in 2..64 and rows wider than 1024, in both the single-row and multi-row paths.
  • Hexagon TOP_K keeps the first-seen index on ties and treats NaN as -INF.
Fixed 1
  • Hexagon TOP_K no longer performs scalar reads from VTCM.

From llama.cpp

hexagon: faster TOP_K for the backend sampler (#31279)

  • hexagon: faster TOP_K for the backend sampler (skip tiles, then block scan)

Skip the bitonic sort for tiles whose max cannot reach the running k-th best value, then replace the tile sort with top_k_scan(): reject 256-float blocks with one HVX max-reduce and insert only surviving elements into a sorted k-entry list. Used for k in 2..64 and rows wider than 1024, in both the single-row and multi-row paths.

Ties keep the first-seen index. NaN is treated as -INF.

  • hex-top-k: eliminate scalar reads from vtcm

Co-authored-by: Max Krasnyansky maxk@qti.qualcomm.com

Website:

Attestations:

macOS/iOS:

Linux:

Android:

Windows:

openEuler:

  • DISABLED
  • openEuler x86 (310p)
  • openEuler x86 (910b, ACL Graph)
  • openEuler aarch64 (310p)
  • openEuler aarch64 (910b, ACL Graph)

UI:

View original

Upgraded? How did it go?

Discussion