mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2222] [CLOSED] sm_75: fewer launches per decode layer: plan wait folded, fused quantize + interleave (bitwise) #3932
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#3932
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/2222
Author: @rafatxf
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:pr/sm75-decode-fusions📝 Commits (1)
c3c4441sm_75: two launches fewer per decode layer (bitwise)📊 Changes
3 files changed (+105 additions, -8 deletions)
View changed files
📝
include/strata/kernels/native_mmvq.hpp(+2 -0)📝
src/core/verify.cpp(+56 -8)📝
src/kernels/cuda/native_mmvq.cu(+47 -0)📄 Description
A verify window launches ~35 dependent kernels per layer on its main stream, and on Turing each dependent graph node costs ~0.8 µs of gap (kernel-node nsys). This folds two pairs that always run back to back into one launch each, writing the same bytes:
wait_copy_i32_from_mapped, gfx12-only until now. On CUDASTRATA_FUSE_WAITselects it:2= the plan only (the Turing default),1= also the CPU rows'copy_rows_from_mapped_after,0= neither. The rows' version makes every row block of the copy poll the flag over PCIe and was −1.5 % on an RTX 2080 Ti, so it stays opt-in.STRATA_FUSE_HITSis unchanged (off on CUDA; measured neutral here).native_quantize_q8_1_il: a projection input's q8_1 blocks and their interleaved copy (native_q8_1_interleave) in one kernel. The quantization isnative_quantize_q8_1_kernel's; an int of the interleaved copy is four codes gathered from lanes4p..4p+3with two shuffles, and the copy's scale is the block's__low2float(ds). Used for the GDN qkv and out-projection inputs and the QSA input and out-projection (quant_ininrecord_window); the head keeps its two launches.STRATA_QIL=0/1forces it off / on; the default is on for sm_75.Both bitwise: the fused quantize was compared byte for byte with quantize + interleave (both buffers) at 2,560 / 6,144 / 10,240 inputs and 2-4 columns, all-zero blocks included.
Setup
RTX 2080 Ti 22 GB (sm_75), i7-6700, CUDA 13.0, SM 1650 MHz, 240 W. Flash-Next, canonical Q2_0 pack,
--max-context 524288,--serve, with the other open Turing decode PRs applied.Engine (512 new tokens, two runs each, two separate A/Bs)
STRATA_FUSE_WAIT=2)* one of the two runs had low draft acceptance (240/337 against
258/338); the other was 91.4. Small gains (+1 % and ~+0.5-1 %), but up to three fewer launches per layer in every window, for the same bytes.Part of the Turing set tracked in #2197.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.