mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1774] [CLOSED] sycl opt-in: STRATA_IQ3S_WIDE=1, a wide mmvq kernel for the dense IQ3_S matrices #3664
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#3664
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/1774
Author: @recutita
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:sycl-iq3s-wide📝 Commits (1)
66d852fsycl opt-in: STRATA_IQ3S_WIDE=1, a wide mmvq kernel for the dense IQ3_S matrices📊 Changes
2 files changed (+92 additions, -0 deletions)
View changed files
📝
docs/INTEL.md(+6 -0)📝
sycl/src/kernels/cuda/iq_kernels.dp.cpp(+86 -0)📄 Description
Title
Issue: none.
Summary
An opt-in wide kernel for the dense IQ3_S matrices on the SYCL port:
STRATA_IQ3S_WIDE=1. Without it nothing changes (same kernel, same output as main).What changed
sycl/src/kernels/cuda/iq_kernels.dp.cpp:iq3s_wide_kerneland its launcher;iq_mmvqtakes it for IQ3_S (type 21) whenSTRATA_IQ3S_WIDEis set and not 0, and the row length is a multiple of 256. It has the shape of the port's Q4_K..IQ4_XS wide kernels: 8 lanes share a 256-block, lane g takes sub-block g, so a 32-lane sub-group has four blocks in flight; one row per sub-group. It is instantiated for 1 to 8 columns, like the multi kernel.vec_dot_iq3_s_q8_1's (same integer sum, samed * ds * sumi). Only the order the sub-blocks are summed in differs frommmvq_multi_kernel, so the output can differ in the last bits.docs/INTEL.md: the option, the kernel-level numbers below and where the output parts from the default, next to the other switches of the decode kernels (STRATA_GR_DOWN_SLICED=0,STRATA_MMVQ_WIDE_K=0).Why: the multi kernel reads these matrices (attn_q, attn_gate, ssm_out, attn_k, the shared experts' gate/up) at 76-114 GB/s on the B70, while the wide kernels of the other types reach 280-320 GB/s.
How it was checked
unitrace (
--chrome-kernel-logging) on an Arc Pro B70 (32 GB, xe, Linux), AOTbmg-g31, Flash-Next IQ3_XXS on one card,--tokenswith a 40-token prompt, greedy. Time per call, and the weight bytes of the matrix (110 bytes per 256 weights) over that time.T=1 decode (
--spec 2 --mtp-max-t 1 --suffix-draft 0), 64 tokens, one column:MTP (
--spec 4 --spec-min-p 0.5 --mtp), 128 tokens; most calls have 4 columns (the verify window), where the weight bytes are read once for all 4:The numbers below are on top of #1798 (expert parallelism with a second GPU). On two cards with it, this branch (and the other opt-in,
STRATA_GR_FUSE_NORM=1, #1775) applied on top, end to end with--tokens(the same 40-token prompt, greedy, 32K context), the options switched by environment in one binary, interleaved; T=1 256 tokens, median of 4 runs, MTP 512 tokens, mean of 2:STRATA_IQ3S_WIDE=1STRATA_GR_FUSE_NORM=1Output:
STRATA_IQ3S_WIDE=1and with both options the tokens on two cards were the same as off for this prompt (T=1 and MTP); withSTRATA_GR_FUSE_NORM=1alone they part from off, and with MTP the accepted drafts change with the text, so that MTP figure is not a like-for-like speed comparison.Extra Notes
stratatarget was built (AOTbmg-g31).--mtpcrashes at exit and unitrace writes no trace. The kernel is the same.Assisted-by: Claude Code with Opus 5.5 medium
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.