Skip to content

et-backend: Q8_0 matrix-engine GEMM kernel for prefill#14

Closed
RehanQasim-dev wants to merge 1 commit into
etfrom
feat/q8_0-tensor-gemm
Closed

et-backend: Q8_0 matrix-engine GEMM kernel for prefill#14
RehanQasim-dev wants to merge 1 commit into
etfrom
feat/q8_0-tensor-gemm

Conversation

@RehanQasim-dev

Copy link
Copy Markdown

Summary

  • Adds a Q8_0 matrix-engine mul_mat kernel with static-reuse dequant across N-tiles and K-splitting, plus fused bias support for MUL_MAT+ADD.
  • Routes N >= 47 to the matrix engine and N <= 47 to vecdot.

Performance (Llama-3.2-1B-Instruct, ET-SoC-1)

Prefill improved roughly 6-9x. Decode is the same as et since decode (N=1) always routes to the vecdot kernel, not the matrix-engine path this PR touches.

Prefill t/s

N et optimized speedup
100 99.3 608.4 6.13x
220 100.5 945.2 9.41x
512 95.3 876.9 9.21x
700 96.1 816.0 8.49x
900 95.4 807.4 8.47x

Testing

Verified with llama-cli on ET-SoC-1 hardware (Llama-3.2-1B-Instruct), coherent output.

Adds a Q8_0 matrix-engine mul_mat kernel with static-reuse dequant
across N-tiles and K-splitting, plus fused bias support for MUL_MAT+ADD.
Routes N >= 47 to the matrix engine and N <= 47 to vecdot.

Registers the new kernel in the KERNELS list, which it was missing
from, so the runtime kernel lookup was silently failing and leaving
the destination buffer unwritten.
@github-actions github-actions Bot added the ggml label Jul 14, 2026
@RehanQasim-dev

Copy link
Copy Markdown
Author

Superseded by the upstream PR against ggml-org/llama.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant