mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1020] [CLOSED] qsa_prompt_attn: the Volta kernel's latency pipeline (32K int8 12.1 -> 10.2 ms, +1.5% e2e) #2971
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#2971
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/1020
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v100/prompt-attn-pipeline📝 Commits (10+)
fa16567setup: an earlier config that does not parse is skipped, not a crash; configs are written atomically (#459)749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it📊 Changes
3 files changed (+266 additions, -28 deletions)
View changed files
📝
CMakeLists.txt(+7 -0)➕
bench/qsa_prompt_attn_sm70_bench.cpp(+198 -0)📝
src/kernels/cuda/qsa_prompt_attn.cu(+61 -28)📄 Description
What
Main already runs the Volta prompt attention on
prompt_attn_v70_kernel(#600). This adds the kernel's latency pipeline: the pool-row lookups are double-buffered (the next chunk's rows are prefetched under the previous chunk's p.v), and a thread's staging loads are batched before its stores. No arithmetic, layout or output changes - the sums are formed in the same order.This is the remaining piece of the Volta prompt attention in #627 (the base kernel was already taken from #600; only the pipeline commit is left).
Gating
All changes are inside the existing
#if !defined(__HIPCC__) && defined(STRATA_EXPERIMENTAL_SM60)block insrc/kernels/cuda/qsa_prompt_attn.cu; the ready-made engine is untouched.Measured
V100-SXM2-16GB, CUDA 12.8,
qsa_prompt_attn_sm70_bench, 2,048 queries of a 32K selection, 5 reps:Tests
qsa_prompt_attn_parity 32768 2048 5: PASS, 0 failures. Every FP64 and new-vs-old figure is identical before/after the patch (int8 32768: new vs old 1.25e-05, 3.3e-06 of the output scale): the port is numerically bit-identical.max |old-new|is unchanged and covers mode 3, which the parity test skips on sm_70.32K end-to-end
Same setup. Interleaved A/B (baseline / this branch, 5 rounds each): dual-card prefill 2191.6 -> 2225.2 tok/s (+1.5%), single-card 1557.1 -> 1575.1 (+1.2%). The branch repeats within 0.2% across sessions, and so does the baseline. Decode is unchanged (within its +-15% session noise).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.