]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
hexagon: Q4_0 and MXFP4 repack fixes (llama/20527)
authorMax Krasnyansky <redacted>
Sat, 14 Mar 2026 18:09:08 +0000 (11:09 -0700)
committerGeorgi Gerganov <redacted>
Sun, 15 Mar 2026 19:50:13 +0000 (21:50 +0200)
commit547e41952cae642602d1c9a15c1c7206cae04150
treecf8fbea3fcd577d467226a37bfa52ee9353ee443
parent5b70874c5a3b26bd6a077482c64fe1785698c2fa
hexagon: Q4_0 and MXFP4 repack fixes (llama/20527)

* hexagon: fix tail corruption with rows sizes not multiple of 256

* hexagon: use different stride for repacking partial blocks

* hex-mm: update repack and kernels to avoid shuffles for full 256-element blocks

Previous commit changed the repacking to use even:odd (0:1,2:3,..) packing
instead of the original (0:128,1:129,...) packing in order to fix tail corruption.
Since the mm kernels already deal with partial tails we can use even:odd
packing only for the last block.
This avoid performance penalty of having to shuffle to zip the elements
in the common case.

* hex-mm: update rmpy x8 for better optimizations

* hex-mm: tighten supported MUL_MAT checks to avoid spurios failures

* hex-mm: use vzero to init accumulators

* hex-mm: properly call partial rmpy_x8
src/ggml-hexagon/ggml-hexagon.cpp
src/ggml-hexagon/htp/matmul-ops.c