mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2070] [CLOSED] sm_75: a hyper-connection up kernel for 3+ tokens and the staged down kernel in token pairs (bitwise) #3839
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#3839
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/2070
Author: @rafatxf
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:pr/sm75-hc-up📝 Commits (1)
c478a02sm_75: hc up kernel with batched row loads for 3+ tokens, down token pairs for T 4/6📊 Changes
1 file changed (+169 additions, -7 deletions)
View changed files
📝
src/kernels/cuda/fused_gr.cu(+169 -7)📄 Description
The hyper-connection read is ~19 % of an RTX 2080 Ti's decode GPU time (96 reads per window, 13 MB of BF16 weights each). Two Turing-only changes, both bitwise equal to the kernels they replace (
gr_parity,gr_multi_parity, and the samefused_gr_benchhashes):gr_up75_kernelfor 3+ tokens: two batches of 4 rows ofw_uploaded before the dots (was: one row's load after the previous row's epilogue; ncu showed ~9k of a warp's ~22k cycles waiting on memory), each token's activations read from shared memory once per batch, the 4 xor reductions interleaved, and the rows' last 8 chunks held 4 rows to auint4and shuffled to their lane. Every row's lane sums, xor tree and epilogue aregr_up_multi_kernel's. At 1-2 tokensgr_up_multi_kernelis as fast or faster, so it stays there.STRATA_GR_UP75=0turns it off.blockIdx.y: on sm_75 a launch of 4 or 6 tokens runs as pairs, more blocks for the 41-block grid; every (row, token) is still summed by one warp exactly as before.STRATA_GR_DOWN_TG=nforces groups of n (0 = off). One token per group is slower at every T (the weights are read from L2 once per group), so only pairs.fused_gr_bench 300 1 6 8(cold: 8 weight sets rotated),STRATA_HC_SPLIT=2, RTX 2080 Ti at 1650 MHzWhole read (norm + down + up), µs:
Engine: same binary, switches off / on
One-shot, 256 new tokens, greedy, runs interleaved off / on / on / off (off =
STRATA_GR_UP75=0 STRATA_GR_DOWN_TG=0; measured with the Turing tables of #2069 on, both arms), decode tok/s:At 4K all four runs wrote the same tokens. A verify window here averages ~2.2 tokens, where the kernels change little; the gain grows with the window (T 4-6 above), so it is larger with
--specabove 4 or a layer split's larger windows.Tests
gr_parity --selftest: OK.gr_multi_parity: 32 cases, 0 failures.fused_gr_bench: bitwise equal, the same hashes with the switches on and off.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.