mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #108] [CLOSED] prefill: bit-identical kernel speed-ups (batched indexer append, parallel GDN conv, column-split GDN recurrence, one-launch embedding gather) #2461
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#2461
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/108
Author: @q8atnight
Created: 9/29/2026
Status: ❌ Closed
Base:
main← Head:pr/prefill-kernels📝 Commits (1)
acd4872prefill: bit-identical kernel speed-ups - batched QSA indexer append, GDN conv parallel over tokens, GDN recurrence split over value columns (+ software-pipelined loads), one-launch embedding gather; STRATA_PF_*_CHECK debug compares📊 Changes
5 files changed (+452 additions, -13 deletions)
View changed files
📝
include/strata/kernels/native_qsa_indexer.hpp(+6 -0)📝
include/strata/prefill/kernels.hpp(+5 -2)📝
src/kernels/cuda/native_qsa_indexer.cu(+106 -0)📝
src/prefill/kernels.cu(+193 -4)📝
src/prefill/prefill.cpp(+142 -7)📄 Description
What
Four prompt-path kernels that were launch- or latency-bound, rewritten so that every output stays bit-identical
(each change has an env switch back to the old path and a debug self-check that runs both from the same state and
compares every byte):
native_qsa_indexer_append_chunk: each block does what the per-token kernel does at a completing position; placeholders/tail written by a finishing kernel)STRATA_PF_IDX_BATCH=0/STRATA_PF_IDX_CHECK=1STRATA_PF_CONV_PAR=0/STRATA_PF_CONV_CHECK=1STRATA_GDN_PIPELINE=0,STRATA_PF_REC_SPLIT=0/STRATA_PF_REC_CHECK=1gather_devlaunch per chunk (same dequantizer); picture rows uploaded over itSTRATA_PF_EMBED_BATCH=0Measured
RTX 3090, IQ3_S, 34K-token prompt (
STRATA_PREFILL_TIMING=1, GPU timeline of the prompt path):The self-checks printed
IDENTICALfor every layer and chunk, including chunk boundaries (p0 = 8192, 16384) and acontinuation starting at a non-4-aligned position (p0 = 9229).
Measured on 2x RTX 3090 / Ryzen 9 3950X / 121 GB RAM (the numbers above are the primary card's own work, so they apply
to a single card too). Developed with an AI coding assistant; all numbers measured on the hardware above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.