mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2092] [CLOSED] sm_75: the v2 int8 prompt attention with register staging instead of cp.async (STRATA_PA_V2T=1) #3856
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#3856
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/2092
Author: @rafatxf
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:pr/sm75-prompt-attn-v2📝 Commits (1)
945c83dsm_75: the v2 int8 prompt attention with register staging instead of cp.async (STRATA_PA_V2T=1)📊 Changes
1 file changed (+30 additions, -2 deletions)
View changed files
📝
src/kernels/cuda/qsa_prompt_attn.cu(+30 -2)📄 Description
On Turing the int8-KV prompt attention runs v1, because v2 (
prompt_attn_i8_kernel) stages each warp's K/V slices withcp.async, which does not exist before sm_80. v1 keeps one 4-warp CTA per SM (37 KB of shared memory) and gathers a chunk, waits, computes; the attention is ~18 % of a 130K prompt read on an RTX 2080 Ti.Here, below sm_80, v2's
issue()loads the warp's next pieces into registers (4 + 4uint4a lane) andstore_stage()writes them into the warp's other stage after the current chunk's p·v, where v2 already stores the next chunk's scales - the same bytes in the same places as the cp.async pipeline; each warp only touches its own stages, so__syncwarpsuffices as before. The MMAs are the m16n8k8 pairs v1 already uses on Turing. Opt-in (STRATA_PA_V2T=1): another summation order than v1, like v2 against v1 on sm_80.Setup
RTX 2080 Ti 22 GB (sm_75), i7-6700, CUDA 13.0, driver 595, SM 1650 MHz, 240 W;
v0.1.43. Model Q2_0,--resident-experts,--max-context 524288,--kv int8 --kv-resident 32768,STRATA_BF16_TC=1,STRATA_SELECT_SIMT=2.qsa_prompt_attn_parity(int8 KV), ms per chunk and error against FP64Engine
98K prompt read (one-shot, two runs each): 1473 → 1550 tok/s (+5.2 %), deterministic run to run.
Quality, teacher-forced as in #655 / #2071 (
--serve, the first P tokens through the prompt path, the next 2,048 resumed through the verify windows,STRATA_LOGPOS_TOPK=20, raw Spanish text):Noise floor: at 32K two v1 runs are identical; at 98K two v1 runs already differ by KL 0.0103 (argmax 95.5 %), so most of the 98K difference is the engine's own run-to-run variation there. Perplexity moves by −1.8 % and −0.1 %.
The server here runs with
STRATA_PA_V2T=1since 2026-10-12.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.