mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #187] [CLOSED] decode: QSA block scores read each key block once per window (bit-identical) #2497
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#2497
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/187
Author: @q8atnight
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/qsa-scores-multi📝 Commits (2)
16df125decode: QSA block scores read each key block once for all of a window's queries (bit-identical; STRATA_SCORES_MULTI=0 = old grid)7206157decode: QSA scores multi - comment names every caller that takes it (decode captured or not, prefill's pooled16); no box-specific note (review)📊 Changes
1 file changed (+56 additions, -0 deletions)
View changed files
📝
src/kernels/cuda/qsa_select.cu(+56 -0)📄 Description
Summary
In a captured decode window
qsa_block_scoreslaunched a (max_blocks / 8) x nq grid (~24,600 mostly idle blocks perlayer) and re-read every pooled key block once per query. New kernel: a fixed grid strides over the key blocks, reads
each once and scores it for all of the window's queries (up to 8); per (block, query) the same arithmetic in the same
order as
block_scores_kernel. Used only when no active-block count is given (the captured decode window).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): at 32K context the
"scores+topk" stage 1.02 -> 0.90 ms per window; verify window 20.28 -> 20.04 ms.
Correctness
Bit-identical scores.
Switch
STRATA_SCORES_MULTI=0= the old grid.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.