]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
hexagon: support for IQ4_NL and MXFP4 (#21018)
authorYiwei Shao <redacted>
Fri, 27 Mar 2026 16:22:41 +0000 (09:22 -0700)
committerGitHub <redacted>
Fri, 27 Mar 2026 16:22:41 +0000 (09:22 -0700)
commitee051c1e4e6ceddc2fa516eb067496328ac1a2dd
tree7c2fe60faec463cf53d8d35b858b378b9249f7d0
parente6f6770515d4b5db2300f32ec6bb504e997774df
hexagon: support for IQ4_NL and MXFP4 (#21018)

* ggml-hexagon: add IQ4_NL and MXFP4 HMX matmul support

- Add IQ4_NL quantization type support to Hexagon backend (buffer
  set/get tensor repack, mul_mat, mul_mat_id dispatch)
- Implement HVX IQ4_NL vec_dot kernels (1x1, 2x1, 2x2) with
  LUT-based 4-bit index to int8 kvalue dequantization
- Add MXFP4 HMX dequantization path with E8M0 scale conversion,
  including batch-4 fast path and single-tile fallback
- Unify quantized row size / scale offset logic to handle Q4_0,
  Q8_0, IQ4_NL, and MXFP4 in the DMA fetch path

* ggml-hexagon: fix SKIP_QUANTIZE src1 address mismatch in mixed-quant models

* Fix the pragma indent
ggml/src/ggml-hexagon/ggml-hexagon.cpp
ggml/src/ggml-hexagon/htp/hmx-matmul-ops.c
ggml/src/ggml-hexagon/htp/htp-ctx.h
ggml/src/ggml-hexagon/htp/main.c
ggml/src/ggml-hexagon/htp/matmul-ops.c