]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/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>
Mon, 16 Mar 2026 11:10:15 +0000 (13:10 +0200)
commit55f8cfdaed7f44b1009293e4c032f075a973ded5
treebc9d5b4ef5e6b3778d11ed7ce70f3cc9ce3e2a33
parentc5f9a49b51ac277b6bc0bd12cd5e3c3be64299ee
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
ggml/src/ggml-hexagon/ggml-hexagon.cpp
ggml/src/ggml-hexagon/htp/matmul-ops.c