Repository navigation
hexagon: add support for Q1_0 and Q2_0 - #30122
Merged
max-krasnyansky merged 10 commits intoOct 17, 2026
Merged
Conversation
tboinovski1
force-pushed
the
tb/hexagon-q1_0-support
branch
4 times, most recently
from
October 16, 2026 22:53
a5f1fc3 to
9c21deb
Compare
max-krasnyansky
force-pushed
the
tb/hexagon-q1_0-support
branch
from
October 17, 2026 20:04
9c21deb to
2fcd79f
Compare
max-krasnyansky
marked this pull request as ready for review
October 17, 2026 20:04
Member
|
@tboinovski1 I ended up doing a pass to optimize / generalize the dispatch and ukernels to make things more generic (ie removing one-off checks for Q1_0). @lhez for another review/ack |
max-krasnyansky
approved these changes
Oct 17, 2026
lhez
approved these changes
Oct 17, 2026
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 24, 2026
* hexagon: add support for q1_0 quant * hexagon: enable Q1_0 weights in the 2D HMX MUL_MAT path * hex-q1: cleanup gates, generalize tiling and remove in-loop divs * hex-tiling: document tiled formats in developer.md and update htp-tensor.h * hex-q2: add support for Q2_0 * hex-q2: remove stale asserts and speacial cases * hex-mm: fix MUL_MAT_NX assumption about square tiling, Q1/Q2 have non-square tiles * hex-q1/2: minor optimizations (unrolls/un-unrolls/...) * hex-q1: optimize Q1_0 layout to reduce unpack/vrmpy overhead * hex-q1/q2_0: further optimize vec_dots --------- Co-authored-by: Max Krasnyansky <[email protected]>
auRose94
pushed a commit
to auRose94/llama.cpp
that referenced
this pull request
Oct 28, 2026
* hexagon: add support for q1_0 quant * hexagon: enable Q1_0 weights in the 2D HMX MUL_MAT path * hex-q1: cleanup gates, generalize tiling and remove in-loop divs * hex-tiling: document tiled formats in developer.md and update htp-tensor.h * hex-q2: add support for Q2_0 * hex-q2: remove stale asserts and speacial cases * hex-mm: fix MUL_MAT_NX assumption about square tiling, Q1/Q2 have non-square tiles * hex-q1/2: minor optimizations (unrolls/un-unrolls/...) * hex-q1: optimize Q1_0 layout to reduce unpack/vrmpy overhead * hex-q1/q2_0: further optimize vec_dots --------- Co-authored-by: Max Krasnyansky <[email protected]>
1 task done
yuubinnkyoku
added a commit
to yuubinnkyoku/llama.cpp
that referenced
this pull request
Nov 25, 2026
Measured on host, no device needed. ceefd16 (ggml-org#30581 HMX FA sinks) and 27c7a76 (ggml-org#30435 softplus HVX) apply with zero conflicts. Not committed here, because the branch should not advance past what the device has validated; they are the first two for Phase 65. 797de63 (ggml-org#30122 Q1_0/Q2_0) is the next wall at 39 hunks across four files, 28 of them in matmul-ops.c where the fork's four-column dispatch and upstream's generic repack dispatch claim the same table. It needs the repack layer that b797b9c (ggml-org#30635) introduces, and that file pair does not exist in the fork. So the shape is: repack rework is the gate, and Q1_0/Q2_0 and Op Fusion both sit behind it. Phase 65's real work is one PR with ten files and 39+ hunks. Assisted-by: DeepSeek Harness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Support for Q1_0 and Q2_0 formats.
Enables tiling layouts for both HMX and HVX kernels.
Native Q1_0, Q2_0 MUL_MAT through HVX.
Direct {-1,+1} expansion against tiled Q8_0 activations.
32x1, 32x2, 2D, 4D, and matvec workers.
Exact host repacking and arbitrary byte-range readback.
Enabled Q1_0 and Q2_0 weights in the 2D HMX MUL_MAT path.
Support for GET_ROWS are in the works but likely will a follow-on.
Verification
Requirements