mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1775] [CLOSED] sycl opt-in: STRATA_GR_FUSE_NORM=1, the hyper-connection read in 3 kernels instead of 4 #3666
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#3666
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/1775
Author: @recutita
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:sycl-gr-fuse-norm📝 Commits (1)
ba7fa13sycl opt-in: STRATA_GR_FUSE_NORM=1, the hyper-connection read in 3 kernels instead of 4📊 Changes
2 files changed (+126 additions, -1 deletions)
View changed files
📝
docs/INTEL.md(+6 -0)📝
sycl/src/kernels/cuda/fused_gr.dp.cpp(+120 -1)📄 Description
Title
Issue: none.
Summary
An opt-in way to run the SYCL port's hyper-connection read in 3 kernels instead of 4:
STRATA_GR_FUSE_NORM=1. Without it nothing changes (same kernels, same output as main).What changed
sycl/src/kernels/cuda/fused_gr.dp.cpp, sliced path offused_gr_read_multi(the default,STRATA_GR_DOWN_SLICED): with the option the norm kernel is not launched.gr_down_raw_sliced_kerneltakes the down dot products against the unscaled rows and writes each slice's sum of squares;gr_down_reduce_rs_kernelcomputesrsfrom those, writes it for the up kernel, and sumsrs[c] * partialover the slices in the fixed slice order.xnis not written (nothing reads it after the read).c, and the norm scales all of streamcby one factorrs[c], so a slice's partial isrs[c]times the dot over the unscaled rows. The rounding order differs (the sums of squares are summed per slice,rsis applied after the dot), 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 toSTRATA_GR_DOWN_SLICED=0and the other switches of the decode kernels.Why: the norm kernel and its barriers sit in front of the weight reads. A read is 97 calls per token and reads 13 MB of bf16 weights per call. A variant that kept the norm's exact order inside the down kernel was slower with MTP and was dropped.
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. Median time per call of each kernel of one read:gr_norm_splitgr_down_sliced/gr_down_raw_slicedgr_down_reduce/gr_down_reduce_rsgr_up_multiT=1 is
--spec 2 --mtp-max-t 1 --suffix-draft 0(64 tokens), MTP is--spec 4 --spec-min-p 0.5 --mtp(128 tokens). The down kernel takes 2.6-3.1 us longer and the reduce kernel 0.3-0.6 us longer, less than the norm kernel they replace (6.9-7.2 us).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_IQ3S_WIDE=1, #1774) 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
bmg-g31): all targets including the parity tests, andstrataandgr_parityagain after the last change (astatic_assert).gr_paritywithSTRATA_GR_FUSE_NORM=1prints the same as without it and as main: its fused-read check (a window against single-token calls, direct and graph replays) stays bitwise; its reference checks rungr_read, which this does not touch; its one failure (STRATA_QFUSE, not supported on the port) is the same on main.--mtpcrashes at exit and unitrace writes no trace. The kernels are 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.