mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1653] [CLOSED] [WIP] cuda: SM75 IQ4_XS four-row reuse and NW3 shape specialization #3583
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#3583
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/1653
Author: @Unmaple
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:wip/iq4-row-reuse-20261009📝 Commits (10+)
6226deacuda: prototype opt-in SM75 IQ4 row reuse and NW3 shapesba2fe57cuda: simplify IQ4 reuse and record clean-build parity3ad662ddocs: record current-head IQ4 graph timing ablation1b2cd60docs: record NW3 integration prototype on B6 frameworkf85d4e5docs: qualify IQ4 reuse with full-model logits at 16K4d547bbOPUS-MTP-MMVQ multi-colonna con attivazioni riusate fra le righe del blocco (STRATA_B6_MMVQ_ROWS) e micro-benchc97e698cuda: consolidate IQ4 NW3 specialization onto upstream B6 reuseb0a7fdfdocs: record shared B6 convergence and fresh SM75 validation5d62177docs: confirm default parity under identical residency04b9655docs: qualify final NW3 layer effect with precise paired timing📊 Changes
6 files changed (+573 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+6 -0)➕
docs/SM75_IQ4_REUSE_WIP.md(+132 -0)📝
include/strata/kernels/native_mmvq.hpp(+6 -0)➕
src/kernels/b6_mmvq_bench.cpp(+218 -0)📝
src/kernels/cuda/native_mmvq.cu(+207 -0)📝
src/kernels/mmvq_multi_parity.cpp(+4 -0)📄 Description
WIP / 施工中. Default off; not ready for merge or review. Depends on #1418.
This specializes the shared B6 four-row kernel for exact-layout SM75 IQ4_XS projections at T=2–4, K=2560 and R=6144/10240/12288, using three warps instead of four. TSUM must be off. Unsupported calls retain NW4/native; HIP excludes the specialization. STRATA_B6_MMVQ_ROWS=4 selects B6 reuse and STRATA_IQ4_NW3=1 selects this increment. The legacy IQ4 reuse switch remains a compatibility selector. All flags unset retains native defaults.
Generic B6 activation reuse is imanu86's contribution in #1418, imported with original authorship and AI attribution preserved. Our duplicate framework was removed. The incremental comparison here is NW3 versus shared B6 NW4, not all reuse versus release default.
Internal operator performance: significant NW3 increment
Modified RTX 2080 Ti (22 GiB), T=4, six independent rotated process rounds; CUDA-event 100-call graphs with weights rotating beyond L2. Paired Student-t CI95, df=5. Baseline is shared B6 NW4 from #1418; this table measures only this PR's NW3 increment. Latencies are means. Positive reduction means faster.
All three affected matrices show a significant incremental gain under these conditions. T=1 retains native dispatch; the specialization is eligible at T=2–4, but the performance intervals above are T=4. Clocks were unlocked and CPU was shared. Intervals are per comparison, not adjusted for multiple comparisons. Separate three-pair short-context whole-layer prefix reductions remain inconclusive: GDN0.196 ±0.591%, QSA0.241 ±0.454% (CI95). Operator benefit and end-to-end benefit are reported separately.
End-to-end real-MTP performance
Real MTP T≤4, up to three drafts, 512 output tokens, three topics × three independent process pairs:
No topic establishes a significant end-to-end gain. All 18 runs succeeded; all nine pairs have identical output token sequences, verifier rounds, accepted/proposed draft counts, 512 output tokens and 6528 resident expert slots. QSA MMA is off on both sides. CPU experts enabled: 14 participants, default 42 tasks, PCIe=0.14. Adaptive expert swaps/prompt cache/lookup/suffix drafts are disabled; prefill CPU sharing is zero. No oracle/follow or logits export. CPU total includes other work; GPU clocks are unlocked. No slow runs were excluded. This is bounded feature qualification, not the complete adaptive deployment.
Validation: complete CUDA13, HIP7.0.2 and SYCL2026.1 engine compilation passed. No matching AMD/Intel GPU runtime claim. Synthetic comparisons cover 980,113 exact-layout outputs with zero bit differences/nonfinite values; a negative control detects 290,059 differences. Short/16K fixed-input complete logits match within each input. Separately built release/default-off parity passes on one fixed input with matched residency. These checks do not prove equality for every workload.
Remaining: Compute Sanitizer cannot initialize the WDDM debugger interface, so no memcheck/racecheck/synccheck pass exists; independent review and #1418 dependency coordination. Further tests/builds/smoke checks are paused at the user's request. No Ready transition or default change requested.
Full methods, results and backend CI.
AI disclosure
The NW3 specialization and integration 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. The imported #1418 framework retains its original authorship and AI attribution. 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.