[PR #3453] [Engine] the sm_89 (Ada) MMVQ-IL table, measured on an RTX 4070 #4640

Open
opened 2026-11-07 15:38:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3453
Author: @rodi4eg
Created: 10/20/2026
Status: 🔄 Open

Base: main ← Head: pr/sm89-il-table


📝 Commits (1)

  • 17dd3a9 [Engine] the sm_89 (Ada) MMVQ-IL table, measured on an RTX 4070

📊 Changes

3 files changed (+298 additions, -4 deletions)

View changed files

➕ bench/results/2026-10-20-community-rtx-4070-coder-iq1_m/il-table-sm89.txt (+266 -0)
📝 docs/MMVQ_IL_TABLE.md (+3 -2)
📝 src/kernels/cuda/native_mmvq.cu (+29 -2)

📄 Description

Problem and result

docs/MMVQ_IL_TABLE.md asks for a table per card and names sm_89 (Ada) as the gap: "sm_89 (Ada) and every other sm_80+ card -> kIlRowsShared too. Nobody has measured sm_89 yet (we have no such card)." So an Ada card takes the shared table, and that table has no Q3_K row at all, which means Q3_K shapes run the plain kernel.

This change adds the sm_89 table: kIlRows_89[] (2-4 columns), kIlRows58_89[] (5-8 columns) and kIl1Rows_89[] (one column), with the {89, ...} entries in kIlArch, kIl58Arch and kIl1Arch, and the docs row updated.

Every choice in a table is bitwise the same output as native_mmvq (the parity test checks that), so this is speed only - the answers do not change.

The table differs from the shared one in every type. Example shapes from the tool's own output on this card (IQ4_XS 2560x10240): 4 columns 54.4 us plain vs 35.2 us with rows 1; 8 columns 71.8 us plain vs 46.5 us with rows 1.

none

Approach

The block the repo's own tool prints, pasted as the three tables and registered for cc 89. The 3% rule is the tool's: a cell is non-zero only if the fastest rows count takes at least 3% off native_mmvq's time in every measured shape of that class, else 0; a class with no measured shape copies its neighbour below.

The raw tool output (parity result, every BENCH line and the printed table) is in the report folder, so the numbers can be checked without rerunning anything.

Validation

Passed:

  • mmvq_il_parity --bench --emit-table ends with
    mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise) - the parity gate the docs ask for, including the new table itself.
  • The changed translation unit compiles for sm_89 with CUDA 12.0: the project's own nvcc command (from
    ninja -t commands in the build folder) re-run against the patched source, producing the object file.
  • Without a rebuild the same table can be injected with STRATA_MMVQ_IL_ROWS="type:ncols:r0,r1,r2,r3,r4;..." (src/kernels/cuda/native_mmvq.cu, il_env_rows); the string for this card is in the report folder.

Failed:

  • none observed

Not run:

  • HIP, SYCL and Metal builds (no toolchains on this machine; the table is a CUDA file).
  • The table was not measured on any other card, and the 5-8 column path is the second such table (after sm_120) and the least exercised one.
  • A full engine build in a separate worktree was not run for this change (the translation unit that carries the tables
    was compiled instead, with the project's own nvcc command); the engine itself was not relinked with them.

Limits

  • One card: RTX 4070, 46 SMs, driver 580.126.09, CUDA 12.0, one run of the tool.
  • The 5-8 column table is the least exercised path in the engine; the 2-4 column table is the one that runs in every decode step.
  • On the model measured here (Coder IQ1_M) the table did not change the decode speed measurably: the bottleneck is the expert path, not the head's dense projections. It should be tried on a card and a model where the dense projections matter.

🔄 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/3453 **Author:** [@rodi4eg](https://github.com/rodi4eg) **Created:** 10/20/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/sm89-il-table` --- ### 📝 Commits (1) - [`17dd3a9`](https://github.com/Niko1221/Strata/commit/17dd3a912da9f5e015608a2727f3b4aea1f945a8) [Engine] the sm_89 (Ada) MMVQ-IL table, measured on an RTX 4070 ### 📊 Changes **3 files changed** (+298 additions, -4 deletions) <details> <summary>View changed files</summary> ➕ `bench/results/2026-10-20-community-rtx-4070-coder-iq1_m/il-table-sm89.txt` (+266 -0) 📝 `docs/MMVQ_IL_TABLE.md` (+3 -2) 📝 `src/kernels/cuda/native_mmvq.cu` (+29 -2) </details> ### 📄 Description ## Problem and result `docs/MMVQ_IL_TABLE.md` asks for a table per card and names **sm_89 (Ada)** as the gap: *"sm_89 (Ada) and every other sm_80+ card -> `kIlRowsShared` too. Nobody has measured sm_89 yet (we have no such card)."* So an Ada card takes the shared table, and that table has **no Q3_K row at all**, which means Q3_K shapes run the plain kernel. This change adds the sm_89 table: `kIlRows_89[]` (2-4 columns), `kIlRows58_89[]` (5-8 columns) and `kIl1Rows_89[]` (one column), with the `{89, ...}` entries in `kIlArch`, `kIl58Arch` and `kIl1Arch`, and the docs row updated. Every choice in a table is bitwise the same output as `native_mmvq` (the parity test checks that), so this is speed only - the answers do not change. The table differs from the shared one in every type. Example shapes from the tool's own output on this card (`IQ4_XS 2560x10240`): 4 columns 54.4 us plain vs **35.2 us** with rows 1; 8 columns 71.8 us plain vs **46.5 us** with rows 1. ## Related discussion none ## Approach The block the repo's own tool prints, pasted as the three tables and registered for cc 89. The 3% rule is the tool's: a cell is non-zero only if the fastest rows count takes at least 3% off `native_mmvq`'s time in *every* measured shape of that class, else 0; a class with no measured shape copies its neighbour below. The raw tool output (parity result, every BENCH line and the printed table) is in the report folder, so the numbers can be checked without rerunning anything. ## Validation **Passed:** - `mmvq_il_parity --bench --emit-table` ends with `mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise)` - the parity gate the docs ask for, including the new table itself. - The changed translation unit compiles for sm_89 with CUDA 12.0: the project's own nvcc command (from `ninja -t commands` in the build folder) re-run against the patched source, producing the object file. - Without a rebuild the same table can be injected with `STRATA_MMVQ_IL_ROWS="type:ncols:r0,r1,r2,r3,r4;..."` (`src/kernels/cuda/native_mmvq.cu`, `il_env_rows`); the string for this card is in the report folder. **Failed:** - none observed **Not run:** - HIP, SYCL and Metal builds (no toolchains on this machine; the table is a CUDA file). - The table was not measured on any other card, and the 5-8 column path is the second such table (after sm_120) and the least exercised one. - A full engine build in a separate worktree was not run for this change (the translation unit that carries the tables was compiled instead, with the project's own nvcc command); the engine itself was not relinked with them. ## Limits - One card: RTX 4070, 46 SMs, driver 580.126.09, CUDA 12.0, one run of the tool. - The 5-8 column table is the least exercised path in the engine; the 2-4 column table is the one that runs in every decode step. - On the model measured here (Coder IQ1_M) the table did not change the decode speed measurably: the bottleneck is the expert path, not the head's dense projections. It should be tried on a card and a model where the dense projections matter. --- <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#4640
No description provided.