[PR #5137] [Engine] sm_75: interleaved MMVQ for 5-8 row windows (kIlRows58_75) and a 5-8 column activation copy in 4-column planes (bitwise) #5321

Open
opened 2026-11-07 16:34:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/5137
Author: @xrip
Created: 11/3/2026
Status: 🔄 Open

Base: main ← Head: pr/il-planes-sm75


📝 Commits (2)

  • 81b2b53 native_mmvq_il: 5-8 column position-major activation copy as two 4-column planes on sm_75 (IQ4_XS -16..-22 %, bitwise)
  • a56e36f native_mmvq_il: a 5-8 column rows table for sm_75 (kIlRows58_75)

📊 Changes

5 files changed (+58 additions, -13 deletions)

View changed files

📝 docs/MMVQ_IL_TABLE.md (+4 -3)
📝 include/strata/kernels/native_mmvq.hpp (+4 -1)
📝 src/kernels/cuda/native_mmvq.cu (+22 -2)
📝 src/kernels/cuda/q8_1_il.cuh (+24 -7)
📝 src/kernels/mmvq_il_parity.cpp (+4 -0)

📄 Description

Problem and result

On a Turing card with the interleaved MMVQ path on (STRATA_SM75_IL=1, or STRATA_SM75_PERF=1, which turns it on with kIlRows_75), verify windows of 5-8 rows run their dense projections on native_mmvq's plain multi-column kernels: native_mmvq_il_rows_for has rows for 5-8 columns only for the cards in kIl58Arch (sm_80, sm_120). On a CMP 50HX (sm_75) those plain kernels take 1.5-2.4x the interleaved ones at those widths (mmvq_il_parity --bench, 5 columns, cold weights, this PR's build):

matrix plain (multi) interleaved, best rows
IQ4_XS 2560x10240 112.9-117.1 us 48.8-49.9 us
IQ4_XS 6144x2560 58.6-62.3 us 29.0-29.2 us
Q4_K 2560x10240 113.1 us 69.2 us
Q5_K 2560x12288 141.9 us 89.3 us
Q6_K 2560x10240 121.9 us 85.3 us

Second, the interleaved kernels themselves waste half of each activation load at 5-8 columns for IQ4_XS. For CP = 8 an entry of the position-major copy (pm) is 32 bytes, read as two 16-byte loads, and IQ4_XS's lanes read the same int of consecutive blocks, so each load uses half of every 32 bytes it touches. Nsight Compute, CMP 50HX, IQ4_XS 2560x10240, 2 rows a warp:

4 columns 5 columns (run as 6, STRATA_IL_PAD)
duration 40.1 us 69.6 us
DRAM read 13.97 MB 13.99 MB
global load requests 414,720 552,960 (+33 %)
L1 sectors 3,954,382 (9.5 a request) 9,488,811 (17.2 a request)
lg_throttle stall 0.69 warps an issue 5.77
issue slots busy 47 % 29 %

This PR, in two commits:

  1. In sm_75 code only, the position-major copy of 5-8 columns is two 4-column planes: IQ4_XS -16..-22.5 % at 5-6 columns on every real shape (table below); the K-quant kernels run unchanged code.
  2. kIlRows58_75: Turing takes the interleaved kernels for 5-8 columns too (still only with STRATA_SM75_IL=1 / STRATA_SM75_PERF=1).

Every output is bitwise the old one. In end-to-end decode on this box (--spec 4, one stream) the change is within noise, because 5-8 column projections are a small part of a window there (see Limits).

  • #4962: the sm_75 interleaved table, +12 % on a Tesla T4 with --spec 4, slower than STRATA_MMVQ_IL=0 on 2x RTX 2080 Ti with --spec 3. This PR changes only launches of 5-8 columns, so windows of up to 4 rows (--spec 3) are untouched; it does not explain the 2080 Ti result. It also updates the stale sm_75 row of docs/MMVQ_IL_TABLE.md that #4962 points out.
  • #2197: the STRATA_SM75_PERF series, which turns this path on for Turing.

No scope agreement asked: a focused, bitwise change inside the opt-in Turing path. No default changes on any architecture.

Approach

  • Planes (81b2b532): kQ81IlPmPlanes is true only in sm_75 code (__CUDA_ARCH__ == 750). There the position-major copy of 5-8 columns is pm[2][8][nb][4], columns 0-3 then 4-7, in the same bytes (native_q8_1_il_bytes is unchanged). Writers: il_pm_at in native_q8_1_interleave_kernel and native_quantize_q8_1_il_kernel. Readers: Q81Il (PLANES, CS, qh(); u, qbase, qat, QB, qp), which also serves the STRATA_MMVQ_IL_PF variants. Off sm_75 qh() is the old int 4 and every kernel compiles to main's instructions (SASS compared below; the opt-in prefetch variants vary between builds of main too).
  • Only pm: the block-major copy and the scales, which the K-quant kernels read, keep their CP-wide entries. A first version also split bm; that made Q6_K slower (6144x2560 at 5 columns 52 -> 74 us): lanes that walk the positions of one block already read those 32-byte entries contiguously.
  • Only sm_75: the only architecture measured. The copy is written and read on the same device by code from the same build, so writer and readers always agree. The same access pattern exists on sm_80 / sm_120 (which have 5-8 column tables), so the gate is a one-line change for anyone who measures there.
  • Table (a56e36fa): kIlRows58_75, read off MMVQ_IL_TMIN=5 mmvq_il_parity --bench --emit-table three times on the planes build. The runs agreed except Q4_K at 5 columns below 2048 rows (2, 0, 2), which is 0 in the table. mmvq_il_parity's table check pins two of its cells. docs/MMVQ_IL_TABLE.md says what sm_75 runs.
  • Default path: unchanged everywhere. On sm_75 this path runs only with STRATA_SM75_IL=1 or STRATA_SM75_PERF=1; other CUDA architectures compile the old instructions (SASS compared below); HIP never sees this code (q8_1_il.cuh and these kernels are under #if !defined(__HIPCC__)); SYCL and Metal have their own sources.

Validation

Revision tested: c4b8258b against ffa80d73 (main at the time); the branch head a56e36fa has the same tree (one commit message reworded). Some kernel numbers come from the first commit's earlier form 4d2c5774, which differs only in qh()'s type off sm_75 (labelled). Box: 2x NVIDIA CMP 50HX (sm_75, 56 SMs, 20,480 MiB; not stock: unlocked to full speed by the owner's driver, 170 W limit, SM clock up to 2,295 MHz), driver 610.43.03, CUDA 13.3 (V13.3.73), GCC 14.2, Ubuntu 24.04.4, kernel 7.2.9-cmp50hx, build -DCMAKE_CUDA_ARCHITECTURES=75 -DSTRATA_ISA_FLOOR=avx. GPU timings with the box's idle clock governor stopped; GPUs 0/1 only.

Passed:

  • Build, CUDA sm_75: cmake --build build --target strata mmvq_il_parity -j 16 at c4b8258b (rc 0); --target mmvq_il_parity at ffa80d73 (rc 0).

  • Bitwise, GPU 0, c4b8258b: STRATA_SM75_PERF=1 build/mmvq_il_parity and STRATA_SM75_PERF=1 build/mmvq_il_parity --pf 0,1,2,3,4,5,6 both end with mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise), which includes the new kIlRows58_75 check; build/mmvq_il_parity without the switch: the same line (4d2c5774).

  • Other architectures: a tree configured with -DCMAKE_CUDA_ARCHITECTURES="75;80;86;89;120", make src/kernels/cuda/native_mmvq.cu.o at c4b8258b (and at 4d2c5774): rc 0, no errors, SASS for all five. SASS against main's object, per function (1,005 functions, label numbers normalised, cuobjdump -sass): sm_120 identical in every function; sm_80 / sm_86 / sm_89 identical except 11 / 9 / 10 instances of native_mmvq_il_pf_kernel (the opt-in STRATA_MMVQ_IL_PF variants). Those instances are not deterministic from build to build: two builds of unchanged main (ffa80d73, sm_80 only, ccache off) differ in 8 of them as well, and in nothing else. sm_75 differs where this PR changes code (59 functions).

  • HIP view: native_mmvq.cu with the __HIPCC__ conditionals resolved (other conditionals kept, includes not expanded) is byte-identical at ffa80d73 and c4b8258b: 2,685 lines, md5 b59740ec20c7b21789cb8bbe86d5cef5; q8_1_il.cuh and il_pm_at are not in it. native_mmvq.hpp changes only in a comment.

  • Kernel timing, planes: STRATA_SM75_PERF=1 MMVQ_IL_TMIN=4 MMVQ_IL_TMAX=6 mmvq_il_parity --bench --rounds 3, the ffa80d73 and 4d2c5774 binaries alternated 3 times in one script on GPU 0 (cold weights, the tool's default; the best of rows 1/2/4 per cell, us per call, the three runs):

    IQ4_XS matrix columns main ffa80d73 (us) planes 4d2c5774 (us) change (medians)
    2560x10240 4 35.2, 34.4, 33.2 36.2, 33.6, 34.7 +0.9 %
    2560x10240 5 59.5, 60.6, 61.6 48.8, 49.9, 49.7 -18.0 %
    2560x10240 6 62.4, 62.1, 63.6 51.8, 52.8, 52.3 -16.2 %
    2560x12288 4 42.5, 43.3, 39.8 40.6, 40.3, 39.5 -5.2 %
    2560x12288 5 73.4, 74.4, 74.2 59.7, 60.2, 59.1 -19.5 %
    2560x12288 6 76.5, 77.1, 75.3 63.8, 64.1, 63.2 -16.6 %
    2560x512 4 5.5, 5.6, 5.3 5.8, 5.4, 5.4 -1.8 %
    2560x512 5 6.8, 6.9, 7.0 6.1, 6.2, 6.3 -10.1 %
    2560x512 6 6.8, 6.8, 6.8 6.1, 6.1, 6.1 -10.3 %
    2560x6144 4 21.9, 21.6, 21.9 21.7, 21.7, 21.6 -0.9 %
    2560x6144 5 38.7, 39.4, 39.1 31.8, 32.1, 32.1 -17.9 %
    2560x6144 6 38.7, 39.3, 39.6 32.2, 32.2, 32.5 -18.1 %
    2560x640 4 5.3, 5.5, 5.8 5.7, 5.4, 5.8 +3.6 %
    2560x640 5 6.9, 6.8, 6.9 6.2, 6.3, 6.2 -10.1 %
    2560x640 6 6.6, 6.6, 6.6 6.2, 6.2, 6.3 -6.1 %
    6144x2560 4 19.2, 19.2, 19.2 19.2, 19.2, 19.2 +0.0 %
    6144x2560 5 36.5, 36.5, 38.2 29.0, 29.2, 29.0 -20.5 %
    6144x2560 6 35.9, 36.5, 36.8 28.3, 28.0, 28.7 -22.5 %

    The K-quants and every 4-column cell run identical code in both binaries: K-quants at 5-6 columns -1.3..+2.7 % (median 0.0 %, 34 cells); across all 57 identical-code cells the median change is 0.9 %, with one bimodal cell (Q4_K 2560x10240 at 4 columns: 40.2, 39.0, 46.4 against 37.0, 47.6, 48.1 us), which is this bench's run-to-run spread.

  • Table: STRATA_SM75_PERF=1 MMVQ_IL_TMIN=5 MMVQ_IL_TMAX=8 mmvq_il_parity --bench --emit-table, three runs on the planes build: the 5-8 column block the same in every cell but one (above).

  • Engine, layer split on GPUs 0/1, Qwen3.8-Flash-Next Swift 1.5 GSQ-RCO IQ3_XXS, --spec 4 --spec-min-p 0.5 --mtp ... --kv int8 --kv-resident 32768 --pool-workers 19 --expert-cache auto --prefill auto, STRATA_SM75_PERF=1 STRATA_BF16_TC=1 STRATA_EXP_MODE=8; workload: a ~7.8K-token code prompt, then 6 questions on it, 512 greedy tokens each (the prefix reused), a fresh server per run with the page cache dropped; arms alternated A B C C B A A B C, 6 answers a run:

    arm ms per verify window, the three runs mean tok/s drafts accepted
    A: planes only (4d2c5774; 5-8 columns on the plain kernels, as main) 29.01, 29.13, 29.00 29.05 94.0 72.2 %
    B: this PR (c4b8258b) 28.85, 29.30, 29.37 29.17 93.6 71.9 %
    C: the table without the planes (ffa80d73 + kIlRows58_75) 29.33, 29.06, 29.60 29.33 94.1 72.8 %

    No error in any run; windows of 1 to 6 rows were captured. The differences are within this box's spread (about +-1.5 % between rounds). Nsight Systems with graph nodes on arm B, the same workload: the interleaved kernels at 4 columns took ~3.9 s of GPU time, at 6 columns ~0.6 s (now interleaved: Q6_K 241 ms, Q5_K 165, IQ4_XS 104, Q4_K 103), no 5-column launch; so the 5-8 column projections are ~0.6 ms of a ~29 ms window in this workload.

Failed:

None observed. (A g++ -E -undef -D__HIPCC__ preprocessing of native_mmvq.cu failed on both revisions alike, the system headers need the predefined macros; the conditional check above replaced it.)

Not run:

  • HIP and SYCL builds: no ROCm or oneAPI toolchain here; see the HIP view check. No SYCL or Metal file is touched.
  • GPUs other than the CMP 50HX, including other Turing cards (Tesla T4, RTX 2080 Ti): the table is from one card.
  • A workload with many 5-8 row windows end to end. With --batch 2 on a layer split the slots run as pipelined groups of one row, so that is not one here; a single Turing card with batch slots, or longer drafts, would be.
  • Windows build.
  • An engine-level greedy text or logits comparison: decode texts on this box are not repeatable run to run even for the same binary (the verify window composition shifts with draft acceptance), so the bitwise evidence is mmvq_il_parity's check of every case.

Limits

  • End to end on this box nothing measurable: with --spec 4 and one stream the 5-8 column projections are ~2 % of a window's GPU time, and arms A / B / C agree within noise. The gain is per launch of 5-8 columns (above); setups whose windows are mostly 5-8 rows gain more, unmeasured here.
  • The table comes from one CMP 50HX; #4962 shows sm_75 cards can disagree (a T4 against a 2080 Ti at 2-4 columns). STRATA_MMVQ_IL_WIDE=0 turns the 5-8 column path off.
  • Only IQ4_XS gains from the planes (the type that reads pm).

🤖 Generated with Claude Code


🔄 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/5137 **Author:** [@xrip](https://github.com/xrip) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/il-planes-sm75` --- ### 📝 Commits (2) - [`81b2b53`](https://github.com/Niko1221/Strata/commit/81b2b5322dd029afeb49be8bddf3cff9adfaf545) native_mmvq_il: 5-8 column position-major activation copy as two 4-column planes on sm_75 (IQ4_XS -16..-22 %, bitwise) - [`a56e36f`](https://github.com/Niko1221/Strata/commit/a56e36fa031d9b7618b4e0e45128c166c43e7825) native_mmvq_il: a 5-8 column rows table for sm_75 (kIlRows58_75) ### 📊 Changes **5 files changed** (+58 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `docs/MMVQ_IL_TABLE.md` (+4 -3) 📝 `include/strata/kernels/native_mmvq.hpp` (+4 -1) 📝 `src/kernels/cuda/native_mmvq.cu` (+22 -2) 📝 `src/kernels/cuda/q8_1_il.cuh` (+24 -7) 📝 `src/kernels/mmvq_il_parity.cpp` (+4 -0) </details> ### 📄 Description ## Problem and result On a Turing card with the interleaved MMVQ path on (`STRATA_SM75_IL=1`, or `STRATA_SM75_PERF=1`, which turns it on with `kIlRows_75`), verify windows of 5-8 rows run their dense projections on `native_mmvq`'s plain multi-column kernels: `native_mmvq_il_rows_for` has rows for 5-8 columns only for the cards in `kIl58Arch` (sm_80, sm_120). On a CMP 50HX (sm_75) those plain kernels take 1.5-2.4x the interleaved ones at those widths (`mmvq_il_parity --bench`, 5 columns, cold weights, this PR's build): | matrix | plain (`multi`) | interleaved, best rows | |---|---:|---:| | IQ4_XS 2560x10240 | 112.9-117.1 us | 48.8-49.9 us | | IQ4_XS 6144x2560 | 58.6-62.3 us | 29.0-29.2 us | | Q4_K 2560x10240 | 113.1 us | 69.2 us | | Q5_K 2560x12288 | 141.9 us | 89.3 us | | Q6_K 2560x10240 | 121.9 us | 85.3 us | Second, the interleaved kernels themselves waste half of each activation load at 5-8 columns for IQ4_XS. For CP = 8 an entry of the position-major copy (`pm`) is 32 bytes, read as two 16-byte loads, and IQ4_XS's lanes read the same int of consecutive blocks, so each load uses half of every 32 bytes it touches. Nsight Compute, CMP 50HX, IQ4_XS 2560x10240, 2 rows a warp: | | 4 columns | 5 columns (run as 6, `STRATA_IL_PAD`) | |---|---:|---:| | duration | 40.1 us | 69.6 us | | DRAM read | 13.97 MB | 13.99 MB | | global load requests | 414,720 | 552,960 (+33 %) | | L1 sectors | 3,954,382 (9.5 a request) | 9,488,811 (17.2 a request) | | `lg_throttle` stall | 0.69 warps an issue | 5.77 | | issue slots busy | 47 % | 29 % | This PR, in two commits: 1. In sm_75 code only, the position-major copy of 5-8 columns is two 4-column planes: IQ4_XS -16..-22.5 % at 5-6 columns on every real shape (table below); the K-quant kernels run unchanged code. 2. `kIlRows58_75`: Turing takes the interleaved kernels for 5-8 columns too (still only with `STRATA_SM75_IL=1` / `STRATA_SM75_PERF=1`). Every output is bitwise the old one. In end-to-end decode on this box (`--spec 4`, one stream) the change is within noise, because 5-8 column projections are a small part of a window there (see Limits). ## Related discussion - #4962: the sm_75 interleaved table, +12 % on a Tesla T4 with `--spec 4`, slower than `STRATA_MMVQ_IL=0` on 2x RTX 2080 Ti with `--spec 3`. This PR changes only launches of 5-8 columns, so windows of up to 4 rows (`--spec 3`) are untouched; it does not explain the 2080 Ti result. It also updates the stale sm_75 row of `docs/MMVQ_IL_TABLE.md` that #4962 points out. - #2197: the `STRATA_SM75_PERF` series, which turns this path on for Turing. No scope agreement asked: a focused, bitwise change inside the opt-in Turing path. No default changes on any architecture. ## Approach - Planes (`81b2b532`): `kQ81IlPmPlanes` is true only in sm_75 code (`__CUDA_ARCH__ == 750`). There the position-major copy of 5-8 columns is `pm[2][8][nb][4]`, columns 0-3 then 4-7, in the same bytes (`native_q8_1_il_bytes` is unchanged). Writers: `il_pm_at` in `native_q8_1_interleave_kernel` and `native_quantize_q8_1_il_kernel`. Readers: `Q81Il` (`PLANES`, `CS`, `qh()`; `u`, `qbase`, `qat`, `QB`, `qp`), which also serves the `STRATA_MMVQ_IL_PF` variants. Off sm_75 `qh()` is the old `int` 4 and every kernel compiles to main's instructions (SASS compared below; the opt-in prefetch variants vary between builds of main too). - Only `pm`: the block-major copy and the scales, which the K-quant kernels read, keep their CP-wide entries. A first version also split `bm`; that made Q6_K slower (6144x2560 at 5 columns 52 -> 74 us): lanes that walk the positions of one block already read those 32-byte entries contiguously. - Only sm_75: the only architecture measured. The copy is written and read on the same device by code from the same build, so writer and readers always agree. The same access pattern exists on sm_80 / sm_120 (which have 5-8 column tables), so the gate is a one-line change for anyone who measures there. - Table (`a56e36fa`): `kIlRows58_75`, read off `MMVQ_IL_TMIN=5 mmvq_il_parity --bench --emit-table` three times on the planes build. The runs agreed except Q4_K at 5 columns below 2048 rows (2, 0, 2), which is 0 in the table. `mmvq_il_parity`'s table check pins two of its cells. `docs/MMVQ_IL_TABLE.md` says what sm_75 runs. - Default path: unchanged everywhere. On sm_75 this path runs only with `STRATA_SM75_IL=1` or `STRATA_SM75_PERF=1`; other CUDA architectures compile the old instructions (SASS compared below); HIP never sees this code (`q8_1_il.cuh` and these kernels are under `#if !defined(__HIPCC__)`); SYCL and Metal have their own sources. ## Validation Revision tested: `c4b8258b` against `ffa80d73` (main at the time); the branch head `a56e36fa` has the same tree (one commit message reworded). Some kernel numbers come from the first commit's earlier form `4d2c5774`, which differs only in `qh()`'s type off sm_75 (labelled). Box: 2x NVIDIA CMP 50HX (sm_75, 56 SMs, 20,480 MiB; not stock: unlocked to full speed by the owner's driver, 170 W limit, SM clock up to 2,295 MHz), driver 610.43.03, CUDA 13.3 (V13.3.73), GCC 14.2, Ubuntu 24.04.4, kernel 7.2.9-cmp50hx, build `-DCMAKE_CUDA_ARCHITECTURES=75 -DSTRATA_ISA_FLOOR=avx`. GPU timings with the box's idle clock governor stopped; GPUs 0/1 only. **Passed:** - Build, CUDA sm_75: `cmake --build build --target strata mmvq_il_parity -j 16` at `c4b8258b` (rc 0); `--target mmvq_il_parity` at `ffa80d73` (rc 0). - Bitwise, GPU 0, `c4b8258b`: `STRATA_SM75_PERF=1 build/mmvq_il_parity` and `STRATA_SM75_PERF=1 build/mmvq_il_parity --pf 0,1,2,3,4,5,6` both end with `mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise)`, which includes the new `kIlRows58_75` check; `build/mmvq_il_parity` without the switch: the same line (`4d2c5774`). - Other architectures: a tree configured with `-DCMAKE_CUDA_ARCHITECTURES="75;80;86;89;120"`, `make src/kernels/cuda/native_mmvq.cu.o` at `c4b8258b` (and at `4d2c5774`): rc 0, no errors, SASS for all five. SASS against main's object, per function (1,005 functions, label numbers normalised, `cuobjdump -sass`): sm_120 identical in every function; sm_80 / sm_86 / sm_89 identical except 11 / 9 / 10 instances of `native_mmvq_il_pf_kernel` (the opt-in `STRATA_MMVQ_IL_PF` variants). Those instances are not deterministic from build to build: two builds of unchanged main (`ffa80d73`, sm_80 only, ccache off) differ in 8 of them as well, and in nothing else. sm_75 differs where this PR changes code (59 functions). - HIP view: `native_mmvq.cu` with the `__HIPCC__` conditionals resolved (other conditionals kept, includes not expanded) is byte-identical at `ffa80d73` and `c4b8258b`: 2,685 lines, md5 `b59740ec20c7b21789cb8bbe86d5cef5`; `q8_1_il.cuh` and `il_pm_at` are not in it. `native_mmvq.hpp` changes only in a comment. - Kernel timing, planes: `STRATA_SM75_PERF=1 MMVQ_IL_TMIN=4 MMVQ_IL_TMAX=6 mmvq_il_parity --bench --rounds 3`, the `ffa80d73` and `4d2c5774` binaries alternated 3 times in one script on GPU 0 (cold weights, the tool's default; the best of rows 1/2/4 per cell, us per call, the three runs): | IQ4_XS matrix | columns | main `ffa80d73` (us) | planes `4d2c5774` (us) | change (medians) | |---|---:|---:|---:|---:| | 2560x10240 | 4 | 35.2, 34.4, 33.2 | 36.2, 33.6, 34.7 | +0.9 % | | 2560x10240 | 5 | 59.5, 60.6, 61.6 | 48.8, 49.9, 49.7 | -18.0 % | | 2560x10240 | 6 | 62.4, 62.1, 63.6 | 51.8, 52.8, 52.3 | -16.2 % | | 2560x12288 | 4 | 42.5, 43.3, 39.8 | 40.6, 40.3, 39.5 | -5.2 % | | 2560x12288 | 5 | 73.4, 74.4, 74.2 | 59.7, 60.2, 59.1 | -19.5 % | | 2560x12288 | 6 | 76.5, 77.1, 75.3 | 63.8, 64.1, 63.2 | -16.6 % | | 2560x512 | 4 | 5.5, 5.6, 5.3 | 5.8, 5.4, 5.4 | -1.8 % | | 2560x512 | 5 | 6.8, 6.9, 7.0 | 6.1, 6.2, 6.3 | -10.1 % | | 2560x512 | 6 | 6.8, 6.8, 6.8 | 6.1, 6.1, 6.1 | -10.3 % | | 2560x6144 | 4 | 21.9, 21.6, 21.9 | 21.7, 21.7, 21.6 | -0.9 % | | 2560x6144 | 5 | 38.7, 39.4, 39.1 | 31.8, 32.1, 32.1 | -17.9 % | | 2560x6144 | 6 | 38.7, 39.3, 39.6 | 32.2, 32.2, 32.5 | -18.1 % | | 2560x640 | 4 | 5.3, 5.5, 5.8 | 5.7, 5.4, 5.8 | +3.6 % | | 2560x640 | 5 | 6.9, 6.8, 6.9 | 6.2, 6.3, 6.2 | -10.1 % | | 2560x640 | 6 | 6.6, 6.6, 6.6 | 6.2, 6.2, 6.3 | -6.1 % | | 6144x2560 | 4 | 19.2, 19.2, 19.2 | 19.2, 19.2, 19.2 | +0.0 % | | 6144x2560 | 5 | 36.5, 36.5, 38.2 | 29.0, 29.2, 29.0 | -20.5 % | | 6144x2560 | 6 | 35.9, 36.5, 36.8 | 28.3, 28.0, 28.7 | -22.5 % | The K-quants and every 4-column cell run identical code in both binaries: K-quants at 5-6 columns -1.3..+2.7 % (median 0.0 %, 34 cells); across all 57 identical-code cells the median change is 0.9 %, with one bimodal cell (Q4_K 2560x10240 at 4 columns: 40.2, 39.0, 46.4 against 37.0, 47.6, 48.1 us), which is this bench's run-to-run spread. - Table: `STRATA_SM75_PERF=1 MMVQ_IL_TMIN=5 MMVQ_IL_TMAX=8 mmvq_il_parity --bench --emit-table`, three runs on the planes build: the 5-8 column block the same in every cell but one (above). - Engine, layer split on GPUs 0/1, Qwen3.8-Flash-Next Swift 1.5 GSQ-RCO IQ3_XXS, `--spec 4 --spec-min-p 0.5 --mtp ... --kv int8 --kv-resident 32768 --pool-workers 19 --expert-cache auto --prefill auto`, `STRATA_SM75_PERF=1 STRATA_BF16_TC=1 STRATA_EXP_MODE=8`; workload: a ~7.8K-token code prompt, then 6 questions on it, 512 greedy tokens each (the prefix reused), a fresh server per run with the page cache dropped; arms alternated A B C C B A A B C, 6 answers a run: | arm | ms per verify window, the three runs | mean | tok/s | drafts accepted | |---|---|---:|---:|---:| | A: planes only (`4d2c5774`; 5-8 columns on the plain kernels, as main) | 29.01, 29.13, 29.00 | 29.05 | 94.0 | 72.2 % | | B: this PR (`c4b8258b`) | 28.85, 29.30, 29.37 | 29.17 | 93.6 | 71.9 % | | C: the table without the planes (`ffa80d73` + `kIlRows58_75`) | 29.33, 29.06, 29.60 | 29.33 | 94.1 | 72.8 % | No error in any run; windows of 1 to 6 rows were captured. The differences are within this box's spread (about +-1.5 % between rounds). Nsight Systems with graph nodes on arm B, the same workload: the interleaved kernels at 4 columns took ~3.9 s of GPU time, at 6 columns ~0.6 s (now interleaved: Q6_K 241 ms, Q5_K 165, IQ4_XS 104, Q4_K 103), no 5-column launch; so the 5-8 column projections are ~0.6 ms of a ~29 ms window in this workload. **Failed:** None observed. (A `g++ -E -undef -D__HIPCC__` preprocessing of `native_mmvq.cu` failed on both revisions alike, the system headers need the predefined macros; the conditional check above replaced it.) **Not run:** - HIP and SYCL builds: no ROCm or oneAPI toolchain here; see the HIP view check. No SYCL or Metal file is touched. - GPUs other than the CMP 50HX, including other Turing cards (Tesla T4, RTX 2080 Ti): the table is from one card. - A workload with many 5-8 row windows end to end. With `--batch 2` on a layer split the slots run as pipelined groups of one row, so that is not one here; a single Turing card with batch slots, or longer drafts, would be. - Windows build. - An engine-level greedy text or logits comparison: decode texts on this box are not repeatable run to run even for the same binary (the verify window composition shifts with draft acceptance), so the bitwise evidence is `mmvq_il_parity`'s check of every case. ## Limits - End to end on this box nothing measurable: with `--spec 4` and one stream the 5-8 column projections are ~2 % of a window's GPU time, and arms A / B / C agree within noise. The gain is per launch of 5-8 columns (above); setups whose windows are mostly 5-8 rows gain more, unmeasured here. - The table comes from one CMP 50HX; #4962 shows sm_75 cards can disagree (a T4 against a 2080 Ti at 2-4 columns). `STRATA_MMVQ_IL_WIDE=0` turns the 5-8 column path off. - Only IQ4_XS gains from the planes (the type that reads `pm`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5321
No description provided.