[PR #443] [CLOSED] kernels: add opt-in small-window GR and one-warp MMVQ experiments #2643

Closed
opened 2026-11-04 02:01:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/443
Author: @CC-David-CC
Created: 10/2/2026
Status: ❌ Closed

Base: main ← Head: perf/fleet-mmvq


📝 Commits (6)

  • fcc9062 kernels: add opt-in small-window GR and one-warp MMVQ alternatives
  • 52a41d4 test: tidy benchmark harness formatting
  • ad3f363 test: include native output projection in MMVQ parity coverage
  • 549bdbc docs: report focused kernel gains regressions and parity gates
  • 5c1a003 docs: record 0.1.34 rebase and targeted regression checks
  • b60a861 docs: clarify branch selection, activation and public evidence

📊 Changes

12 files changed (+6921 additions, -17 deletions)

View changed files

📝 CMakeLists.txt (+8 -0)
📝 README.md (+9 -0)
➕ docs/EXPERIMENTAL_KERNELS.md (+223 -0)
➕ docs/benchmarks/2026-10-01-experimental-kernels.json (+5016 -0)
➕ docs/benchmarks/2026-10-01-experimental-kernels.md (+65 -0)
➕ docs/benchmarks/2026-10-02-upstream-sync-experimental.json (+1189 -0)
➕ docs/benchmarks/2026-10-02-upstream-sync-experimental.md (+50 -0)
📝 src/kernels/cuda/fused_gr.cu (+29 -17)
📝 src/kernels/cuda/native_mmvq.cu (+11 -0)
➕ tests/gr_roofline.cpp (+51 -0)
➕ tests/mmvq_roofline.cpp (+63 -0)
➕ tools/bench_mtp_modes.py (+207 -0)

📄 Description

Updated to upstream 0.1.34 (1678de3). Fresh targeted builds and regressions passed; the full fleet/context performance numbers below remain measurements of the prior 0.1.33 source.

Rebase checks

This independent, opt-in experiment is based directly on upstream
0.1.34 (1678de3). Hardware enablement and non-MTP serving have separate PRs.

Changes

  • STRATA_GR_DOWN_MAX4=1: bound per-thread storage for windows of at most four
    tokens while preserving block dimensions, tile width, accumulation order and
    upstream plain/split/staged selection. Larger windows retain the existing path.
  • STRATA_MMVQ_WARP1=1: one warp per dense MMVQ output row. Floating-point
    association changes; this path uses a declared numerical-tolerance gate.

Both are off by default and tested individually. Weights, quantization,
expert selection and MTP threshold are unchanged.

Measured benefit

GSQ-RCO IQ3_S, Q8 KV, MTP4 at threshold0.5, long code/prose:

GPU / input Option Code generation Prose generation Interpretation
RTX PRO 6000 Blackwell / 64K GR max4 223.37 -> 228.15 tok/s (+2.14%) 160.21 -> 164.07 (+2.41%) Exact output tokens matched
RX 5500 XT 8GB / 8K One-warp MMVQ 16.24 -> 16.95 tok/s (+4.35%) 13.08 -> 13.52 (+3.41%) Output tokens and lengths differed

RTX PRO controls were untouched upstream A/B, bracketing the focused candidate.
Three additional alternating default/max4 pairs reproduced the gain: code
1.77-2.49%, prose2.14-2.72%, with identical token IDs. Total-time improvement was
only 0.89%/1.08% in the original comparison because prefill was unchanged.

The 5500 XT used one default/warp1/default sequence. Default A/B tokens matched;
the optimized outputs differed. Prose generated 1601 rather than 1453 tokens
and took longer overall (218.57 versus 210.96 s). This is not an identical-output
completion-time or quality claim. Its combined source tree is documented.

Other single 8K + 512-counting-token GR pairs were: 4090 +0.30%, 3070 -0.03%,
P4 +1.74%, and mapped-expert 7900 XTX -7.48%. Those single pairs do not establish
small gains; the 7900 XTX result argues for retaining its default path.

Correctness and limits

  • GR bitwise parity passed T1..8 across all three paths and write/injection
    combinations on all six GPUs.
  • Default MMVQ passed 182 real-tensor/column cases bitwise on all six GPUs,
    including the native output projection.
  • 5500 XT warp1 passed all 182 cases with maximum relative L1 1.29335e-7
    against the declared 1e-5 limit. Exact generated-token equality is not promised.
  • The final output-head coverage expansion is test-only commit ac28acb;
    measured engine binaries were unchanged. Source/binary identities are recorded.
  • Generated TTLCache classes passed bounded functional checks. These are not
    general model-quality or correctness guarantees for every input.

Scope, all results and reproduction
| Full matrix
| Machine-readable evidence

Credit: Niko1221/Strata supplies the engine,
expert cache and MTP. This patch changes only the two named launch/storage paths.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/443 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `perf/fleet-mmvq` --- ### 📝 Commits (6) - [`fcc9062`](https://github.com/Niko1221/Strata/commit/fcc9062d5c1e8923c34c019cc661bb0acc3cc085) kernels: add opt-in small-window GR and one-warp MMVQ alternatives - [`52a41d4`](https://github.com/Niko1221/Strata/commit/52a41d4ee14de47a14e354e796d20907f91b900f) test: tidy benchmark harness formatting - [`ad3f363`](https://github.com/Niko1221/Strata/commit/ad3f36308aa1d80882766cd2ef11a77cb54f552e) test: include native output projection in MMVQ parity coverage - [`549bdbc`](https://github.com/Niko1221/Strata/commit/549bdbca2317b739b0edbe38a530929307251988) docs: report focused kernel gains regressions and parity gates - [`5c1a003`](https://github.com/Niko1221/Strata/commit/5c1a003e63443e7ee48314cd27b5baca3e9e540e) docs: record 0.1.34 rebase and targeted regression checks - [`b60a861`](https://github.com/Niko1221/Strata/commit/b60a86198e5ac71651bfd4cce01f4564ba971706) docs: clarify branch selection, activation and public evidence ### 📊 Changes **12 files changed** (+6921 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+8 -0) 📝 `README.md` (+9 -0) ➕ `docs/EXPERIMENTAL_KERNELS.md` (+223 -0) ➕ `docs/benchmarks/2026-10-01-experimental-kernels.json` (+5016 -0) ➕ `docs/benchmarks/2026-10-01-experimental-kernels.md` (+65 -0) ➕ `docs/benchmarks/2026-10-02-upstream-sync-experimental.json` (+1189 -0) ➕ `docs/benchmarks/2026-10-02-upstream-sync-experimental.md` (+50 -0) 📝 `src/kernels/cuda/fused_gr.cu` (+29 -17) 📝 `src/kernels/cuda/native_mmvq.cu` (+11 -0) ➕ `tests/gr_roofline.cpp` (+51 -0) ➕ `tests/mmvq_roofline.cpp` (+63 -0) ➕ `tools/bench_mtp_modes.py` (+207 -0) </details> ### 📄 Description Updated to upstream 0.1.34 (`1678de3`). Fresh targeted builds and regressions passed; the full fleet/context performance numbers below remain measurements of the prior 0.1.33 source. [Rebase checks](https://github.com/CC-David-CC/Strata-a5500/blob/perf/fleet-mmvq/docs/benchmarks/2026-10-02-upstream-sync-experimental.md) This independent, opt-in experiment is based directly on upstream 0.1.34 (`1678de3`). Hardware enablement and non-MTP serving have separate PRs. ## Changes - `STRATA_GR_DOWN_MAX4=1`: bound per-thread storage for windows of at most four tokens while preserving block dimensions, tile width, accumulation order and upstream plain/split/staged selection. Larger windows retain the existing path. - `STRATA_MMVQ_WARP1=1`: one warp per dense MMVQ output row. Floating-point association changes; this path uses a declared numerical-tolerance gate. Both are **off by default** and tested individually. Weights, quantization, expert selection and MTP threshold are unchanged. ## Measured benefit GSQ-RCO IQ3_S, Q8 KV, MTP4 at threshold0.5, long code/prose: | GPU / input | Option | Code generation | Prose generation | Interpretation | |---|---|---:|---:|---| | RTX PRO 6000 Blackwell / 64K | GR max4 | 223.37 -> 228.15 tok/s (+2.14%) | 160.21 -> 164.07 (+2.41%) | Exact output tokens matched | | RX 5500 XT 8GB / 8K | One-warp MMVQ | 16.24 -> 16.95 tok/s (+4.35%) | 13.08 -> 13.52 (+3.41%) | Output tokens and lengths differed | RTX PRO controls were untouched upstream A/B, bracketing the focused candidate. Three additional alternating default/max4 pairs reproduced the gain: code 1.77-2.49%, prose2.14-2.72%, with identical token IDs. Total-time improvement was only 0.89%/1.08% in the original comparison because prefill was unchanged. The 5500 XT used one default/warp1/default sequence. Default A/B tokens matched; the optimized outputs differed. Prose generated 1601 rather than 1453 tokens and took longer overall (218.57 versus 210.96 s). This is not an identical-output completion-time or quality claim. Its combined source tree is documented. Other single 8K + 512-counting-token GR pairs were: 4090 +0.30%, 3070 -0.03%, P4 +1.74%, and mapped-expert 7900 XTX -7.48%. Those single pairs do not establish small gains; the 7900 XTX result argues for retaining its default path. ## Correctness and limits - GR bitwise parity passed T1..8 across all three paths and write/injection combinations on all six GPUs. - Default MMVQ passed 182 real-tensor/column cases bitwise on all six GPUs, including the native output projection. - 5500 XT warp1 passed all 182 cases with maximum relative L1 **1.29335e-7** against the declared `1e-5` limit. Exact generated-token equality is not promised. - The final output-head coverage expansion is test-only commit `ac28acb`; measured engine binaries were unchanged. Source/binary identities are recorded. - Generated TTLCache classes passed bounded functional checks. These are not general model-quality or correctness guarantees for every input. [Scope, all results and reproduction](https://github.com/CC-David-CC/Strata-a5500/blob/perf/fleet-mmvq/docs/EXPERIMENTAL_KERNELS.md) | [Full matrix](https://github.com/CC-David-CC/Strata-a5500/blob/perf/fleet-mmvq/docs/benchmarks/2026-10-01-experimental-kernels.md) | [Machine-readable evidence](https://github.com/CC-David-CC/Strata-a5500/blob/perf/fleet-mmvq/docs/benchmarks/2026-10-01-experimental-kernels.json) Credit: [Niko1221/Strata](https://github.com/Niko1221/Strata) supplies the engine, expert cache and MTP. This patch changes only the two named launch/storage paths. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2643
No description provided.