mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2340] [CLOSED] sycl mmvq: Q6_K decode kernels no longer ALU-bound; Q6_K output heads as aligned planes; int4 activation loads #3991
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3991
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2340
Author: @leadgtr7
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:sycl-mmvq-q6k📝 Commits (1)
fd3a00fsycl mmvq: Q6_K decode kernels no longer ALU-bound; output heads as aligned planes; int4 activation loads📊 Changes
4 files changed (+286 additions, -12 deletions)
View changed files
📝
sycl/include/strata/kernels/native_mmvq.hpp(+12 -0)📝
sycl/src/core/mtp.cpp(+17 -1)📝
sycl/src/core/native_head.cpp(+2 -0)📝
sycl/src/kernels/cuda/native_mmvq.dp.cpp(+255 -11)📄 Description
What it changes (SYCL port only,
sycl/):v - 32with dpct's per-byte saturatingchar4subtract (dpct::vectorized_binary(sub_sat)), which compiles to a per-byte loop on Xe. No byte can saturate there, so a 4-operation SWAR form gives the same bits. Q6_K dense matvec: 59.5 -> 30.8 us (1 row), 77.4 -> 45.5 us (4 rows).STRATA_Q6_PLANAR(on by default,=0turns it off). The Q6_K LM head and the MTP draft head are converted at load into ql / qh / scales / d planes (the same bytes; the GGUF-layout allocation is freed, so VRAM does not change), so each lane's loads are single aligned 16-byte loads. The draft head's subset is gathered from the planar head.native_q6_k_mmvqserves every registered matrix at any column count.ld_i4_a4: the Q8_1 activation quants (4-byte aligned) are read as one dword-vector load in the Q4_K / Q5_K / IQ4_XS wide kernels (Q5_K, 4 rows: 81 -> 68 us).These are three parts of one kernel pass and are sent together. Each gives bitwise-equal outputs; I can split them if you prefer.
What it leaves alone: CUDA and HIP (
src/), the prompt path, every other quant type's math. Greedy output is byte-identical to the build without the change (below).How it was checked, on one Arc Pro B65 32 GB (Xe2, AOT
bmg-g31, xe driver, oneAPI 2026.1strata-sycl-devimage), Swift 1.5 GSQ-RCO IQ3_S with--stream-experts(about 13,000 of 24,576 expert slots in VRAM, the rest in the pinned host mirror),--spec 4+ MTP, single slot, v0.1.44 (ed4773eb) with and without this commit, same config, 3 interleaved pairs, 3 greedy 256-token prompts + one ~9.4K-token prompt per arm:The kernel timings above were measured on 0.1.41 with the same kernels. The same change has been in our daily server since 0.1.41.
Not tested: Arc A-series (i915) and Arc B580/B570 (
bmg-g21); models whose expert tensors are Q6_K (the Unsloth UD files); the SYCL kernel parity tests (not registered in our build image: no numpy). Windows (no SYCL launcher there).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.