mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1100] [CLOSED] s2_qpn8: opt-in QPN8 expert GEMV on Volta m8n8k4 (M >= 4) #3027
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#3027
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/1100
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v100/qpn8-v2📝 Commits (3)
ed24aecs2 qpn8: the V100 load-time repack + m8n8k4 expert GEMV (STRATA_QPN8=1, measured)0ff1d50expert cache: the QPN8 dual-form slot at admission (STRATA_QPN8=1)f8c9ca3bench: the QPN8 prep + chains decomposition and the M>=4 entry-point table (V100)📊 Changes
13 files changed (+2227 additions, -15 deletions)
View changed files
📝
CMakeLists.txt(+12 -0)➕
bench/micro/s2_unpack_bench.cu(+927 -0)➕
bench/results/2026-10-02-skinny-expert/README.md(+87 -0)➕
bench/results/2026-10-03-qpn8-prep/README.md(+55 -0)📝
include/strata/core/expert_cache.hpp(+4 -0)➕
include/strata/kernels/s2_qpn8.hpp(+94 -0)📝
src/core/expert_cache.cpp(+25 -0)📝
src/core/peer_experts.cpp(+4 -1)📝
src/core/remote_experts.cpp(+4 -1)📝
src/core/verify.cpp(+14 -4)➕
src/kernels/cuda/s2_qpn8.cu(+581 -0)➕
src/kernels/s2_qpn8_parity.cpp(+398 -0)📝
src/program/generate.cpp(+22 -9)📄 Description
What
QPN8: a load-time repack of the Q2_0 expert weights at admission plus an m8n8k4 expert GEMV for Volta, split out of #627. The repack doubles the slot at admission and the GEMV builds the per-window A fragment and runs the mma chains; the DP4A path remains the fallback.
The entry point pays off only when a window has M >= 4 expert entries; at M < 4 it is slower, so it stays opt-in:
STRATA_QPN8=1, default off.Gating
The m8n8k4 code is compiled under
#if !defined(__HIPCC__) && defined(STRATA_EXPERIMENTAL_SM60)with stubs that fall back to DP4A elsewhere. The ready-made engine is unchanged.Measured
V100-SXM2-16GB, CUDA 12.8,
s2_qpn8_parity --bench, per window:Tests
s2_qpn8_parityPASS withSTRATA_QPN8=1: the quantized intermediates are byte-identical (0 of 30600 bytes differ), the FP32-level outputs are within their bound (worst abs 9.5e-6).s2_expert_grouped_paritystill bitwise PASS.32K end-to-end
Same setup with
STRATA_QPN8=1: prefill 1544.4 single / 2197.0 dual vs main's 1557.1 / 2207.0, and decode within its +-15% session noise. The MTP verify window is around M=5, between the measured 10x4 (0.88x) and 10x8 (1.21x) points. The entry point stays opt-in.Known gap
The per-stage sizing loop for a layer split (~
generate.cpp:3514) still priceslay.max_blob, as in the original #627 commit, so a Volta layer split withSTRATA_QPN8=1can over-pick a stage and failopen. The rest of the admission/verify/generate accounting is updated.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.