mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #186] [CLOSED] decode: hyper-connection read in 2 kernels, stream-split (-1.5 ms per verify window) #2494
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#2494
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/186
Author: @q8atnight
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/hc-read-v3📝 Commits (2)
33729e1decode: hyper-connection read in 2 kernels - norm folded into a stream-split down kernel (164 blocks), rs/lo/inject in up's prologue (STRATA_GR_V3=0 = old)f9ba00fdecode: hc read v3 is opt-in (STRATA_GR_V3=1: another summation order); its shared memory is sized from the card's opt-in limit - one or two column halves, else the default kernels (Turing/HIP 64 KB fit with two; capability-based split as proposed by @Adamyno); the neutral knobs (DOWN_R2, UP_PF, KSPLIT) dropped (review)📊 Changes
1 file changed (+228 additions, -0 deletions)
View changed files
📝
src/kernels/cuda/fused_gr.cu(+228 -0)📄 Description
Summary
In
fused_gr_read_multithe norm kernel ran on only T blocks (~16 us of pure latency per call, 96 calls per verifywindow) and
downon 41 blocks (~280 GB/s). v3 does the hyper-connection read in 2 kernels instead of 3:downis split over (row group, stream) = 164 blocks; each block stages its stream's R' * w_norm for the T tokens,reduces that stream's sum of squares itself, and writes UNSCALED per-stream partial dots
upapplies it in its prologue (lo, inject, rs)
One commit on top of 0.1.27 (
a790805); all four of my current branches were compile-tested together on 0.1.27.Measured
Measured on 2x RTX 3090, IQ3_S, with the engine this was developed in (0.1.24 + the dual-GPU work): decode verify
window 23.25 -> 21.69 ms (about +7 % decode).
Correctness
Same maths, another summation order, so NOT bitwise identical to the old kernels. Our dual-vs-single exactness gate
passes with it (both paths use it).
Switches
STRATA_GR_V3=0= the old 3 kernels. A/B knobs measured neutral or slower, left off by default:STRATA_GR_KSPLIT=2,STRATA_GR_DOWN_R2=2,STRATA_GR_UP_PF=1.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.