]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
hexagon: Q4_0 and MXFP4 repack fixes (#20527)
authorMax Krasnyansky <redacted>
Sat, 14 Mar 2026 18:09:08 +0000 (11:09 -0700)
committerGitHub <redacted>
Sat, 14 Mar 2026 18:09:08 +0000 (11:09 -0700)
commit609ea50026a336a6cf3c02e596792477530b5928
tree42c8a1c92be1d1f904e913ca5730fb259a4fa0e9
parent9f774e45eea7bc2883920643281b26902c96e6bd
hexagon: Q4_0 and MXFP4 repack fixes (#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
ggml/src/ggml-hexagon/ggml-hexagon.cpp
ggml/src/ggml-hexagon/htp/matmul-ops.c