Skip to content

et-backend: F32 decode GEMV rewrite for register-resident vecdot#13

Closed
RehanQasim-dev wants to merge 1 commit into
etfrom
feat/f32-vecdot-decode
Closed

et-backend: F32 decode GEMV rewrite for register-resident vecdot#13
RehanQasim-dev wants to merge 1 commit into
etfrom
feat/f32-vecdot-decode

Conversation

@RehanQasim-dev

@RehanQasim-dev RehanQasim-dev commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Stripes output elements across every hart of all 32 shires instead of blocking work into 16-element chunks, which only filled 8 shires for a typical decode GEMV.
  • Adds a register-resident f32 row-dot helper with L2 prefetch for the streamed weight row, and stages the reused B activation vector into per-shire L2 SCP.
  • Fixes the matrix-engine GEMV dispatch check, which compared src1->ne[0] instead of src1->ne[1] and so never actually caught the n=1 decode case, sending it to the matrix engine kernel where it stalls on a single-column matmul.

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

Decode improved roughly 1.9x. Prefill is the same as et since it already uses the matrix-engine path, untouched by this PR.

Decode t/s (@context=32)

tg et optimized speedup
15 3.14 6.10 1.94x
30 3.19 6.11 1.92x
55 3.23 6.08 1.88x
85 3.25 6.09 1.87x
120 3.20 6.09 1.90x

Testing

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

Stripe output elements across every hart of all 32 shires instead of
blocking work into 16-element chunks, which only filled 8 shires for a
typical decode GEMV. Adds a register-resident f32 row-dot helper with
L2 prefetch for the streamed weight row, and stages the reused B
activation vector into per-shire L2 SCP.

Also fixes the matrix-engine GEMV dispatch check, which compared
src1->ne[0] instead of src1->ne[1] and so never actually caught the
n=1 decode case, sending it to the matrix engine kernel where it
stalls on a single-column matmul.
@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