mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1654] [CLOSED] [WIP] cuda: optional SM75 main-model QSA padded MMA #3584
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#3584
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/1654
Author: @Unmaple
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:wip/sm75-qsa-mma-20261009📝 Commits (9)
6108ef9cuda: prototype optional SM75 main-model QSA padded MMAd115ed7cuda: qualify QSA MMA image and add capture parity fixtures832bc0adocs: record QSA GPU timing and controlled model quality checksa1ce870docs: expand MMA quality checks to true 16K contextd62d1addocs: quantify MMA quality on three WikiText segments0eedc17docs: qualify final QSA layers, corpus subset and failure fallback589b12fdocs: report real MTP throughput and CUDA12 fallback qualification3b9cd43docs: record SYCL compile pass and complete three-draft production pairs5b0a0b9docs: clarify completed QSA MTP evidence and draft-head scope📊 Changes
7 files changed (+428 additions, -1 deletions)
View changed files
📝
CMakeLists.txt(+8 -0)➕
docs/SM75_QSA_MMA_WIP.md(+213 -0)📝
include/strata/kernels/qsa_decode_attn.hpp(+4 -0)📝
src/core/verify.cpp(+1 -1)📝
src/kernels/cuda/qsa_decode_attn.cu(+59 -0)➕
src/kernels/cuda/qsa_padded_mma.cuh(+58 -0)➕
src/kernels/qsa_mma_parity.cpp(+85 -0)📄 Description
WIP / 施工中. Default off; not ready for merge or review.
Add optional padded FP16 QK/PV MMA with FP32 accumulation for explicitly marked main-model QSA verifier calls on SM75 at T=2–4 (STRATA_QSA_SM75_MMA=1). The existing function signature is preserved. T=1, the MTP draft head, prefill, other architectures and HIP retain native attention. Main-model verification of MTP drafts can use the candidate when eligible. Insufficient compiled-image PTX or shared-memory configuration failure falls back to native.
Internal attention and layer-prefix performance: significant QSA gain
Modified RTX 2080 Ti (22 GiB), exact 16K prompt, T=4 fixed oracle/follow continuation and captured graphs. CPU experts enabled with six participants, PCIe=0; equal resident expert counts verified. First four rounds excluded. Means aggregate QSA/12 and GDN/36 layers, rather than a single layer. Three independent process pairs in AB/BA/AB order; paired Student-t CI95, df=2. Positive reduction means faster.
Both QSA reductions remain positive under the conservative print-rounding sensitivity envelope. Ordinary CI95 does not include coarse print rounding; the envelope propagates that rounding and is not a second independent confidence interval. Intervals are per comparison, without multiple-comparison adjustment. Device clocks were unlocked and CPU was shared. Stage timing includes execution and inter-kernel gaps. Three pairs are a small sample. The prefix excludes expert execution and must not be described as whole-layer or production throughput improvement. Forced-follow uses 100% acceptance by construction; real-MTP end-to-end results are reported separately below.
End-to-end real-MTP performance
Real MTP throughput gain is not established. Each T cap has a separate completed batch: three topics × three balanced independent process pairs,512 output tokens/run,18/18 successful processes. Paired changes and Student-t CI95 (n=3/topic,df=2):
T≤3 code has an observed workload throughput regression; other intervals include zero. Outputs and draft acceptance differ between native/MMA in every pair, so these are not identical-work causal kernel comparisons. CPU total includes external work and GPU clocks are unlocked. The T-cap batches ran in different time blocks and are not an optimal-cap comparison. No runs were excluded. Greedy seed20261009;14 CPU participants,default42 tasks,PCIe=0.14,actual6528 expert slots. Dynamic expert swapping/prompt cache/lookup/suffix drafts are disabled, prefill CPU sharing zero. No oracle/follow or logits export. This is bounded feature qualification rather than complete adaptive deployment.
Numerical results change. Six additional disjoint WikiText subset spans give pooled PPL change −0.308% at T2 (exploratory segment-level CI95 [−1.276%,+0.669%]) and −0.472% at T4 ([−2.101%,+1.185%]); mean Top-1 agreement96.419%/96.810%,mean KL0.010715/0.010810. This is a corpus subset, not a full benchmark or proof of quality equivalence. Largest absolute logit difference4.743; largest per-position KL0.886. No equivalence margin was prespecified. Keep opt-in.
Validation: complete CUDA13,HIP7.0.2 and SYCL/oneAPI2026.1 engine builds;240-case fixtures spanning four KV formats,T1–5,pagination/masking and graph capture/replay; flags-off complete logits parity against separately built v0.1.41 on one fixed input with matched residency. Actual CUDA12 compute70 PTX-only JIT on SM75 passes240 cases with bit-exact native fallback;compute75 positive control passes240 cases. These are standalone CUDA12 fixture results, not full-engine CUDA12 or matching AMD/Intel GPU runtime qualification.
Remaining: Compute Sanitizer could not initialize the WDDM debugger interface, so memcheck/racecheck/synccheck are not passed. Independent review and an explicit numerical acceptance decision remain. Further tests/builds/smoke checks are paused at the user's request. No default change or Ready transition requested.
Full methods, numbers, limitations and backend CI.
AI disclosure
Changes in this PR were written by GPT-6.1-sol. Discovery, experiments, testing and validation were carried out by GPT-6.1-sol through Codex on the author's machine. This is not independent reviewer sign-off; validation remains incomplete.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.