[PR #3999] [CLOSED] [Engine] add an sm_89 MMVQ_IL matvec table (measured on an RTX 4080 laptop) #4869

Closed
opened 2026-11-07 16:30:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3999
Author: @fulvius31
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: engine/sm89-mmvq-il-table


📝 Commits (1)

  • 5e194ae [Engine] add an sm_89 MMVQ_IL matvec table (measured on an RTX 4080 Laptop)

📊 Changes

2 files changed (+37 additions, -9 deletions)

View changed files

📝 src/kernels/cuda/native_mmvq.cu (+29 -1)
📝 src/kernels/mmvq_il_parity.cpp (+8 -8)

📄 Description

Problem: the interleaved small-batch matvec (STRATA_MMVQ_IL) dense-projection rows-per-warp choice is a per-architecture table (kIlArch), and sm_89 (Ada) had none - native_mmvq.cu said "nobody measured it (we have no such card)" - so RTX 40 cards fell back on the shared table measured on an RTX 3060 / RTX 5070.

Result: a measured sm_89 table (kIlRows_89 plus the one-column entry) from an RTX 4080 Laptop (58 SMs, 12 GB). Bitwise equal to native_mmvq, so it is only speed. End-to-end decode on the card is unchanged within noise; the dense projections are a small slice of window time.

Approach:

  • Ran mmvq_il_parity --bench --emit-table on the card and pasted the printed block as kIlRows_89, registered {89, ...} in kIlArch. The sm_89 table adds the Q3_K row (the shared table has none) and is less aggressive on Q4_K / Q5_K / Q6_K at 2-3 columns, where the shared rows were slower on this card.
  • Added the measured 5-8 column table kIlRows58_89 but did NOT register it: with STRATA_MMVQ_IL_WIDE on, full decode on this card dropped to ~35-40 tok/s (the standalone bench said those cells win, real decode loses), so 5-8 columns keep the plain kernels, as before. Documented beside the constant.
  • Updated mmvq_il_parity's check_tables(): it asserted sm_89 must equal sm_86; it now validates the measured sm_89 table's signature cells (same style as the sm_60 / sm_70 checks).

Validation:

  • mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise) on the RTX 4080 Laptop.
  • Engine builds with the change (strata target, CUDA arch 89); git diff --check clean.

Not run: Windows, a second Ada (sm_89) card, release-default-config runs.


🔄 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/3999 **Author:** [@fulvius31](https://github.com/fulvius31) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `engine/sm89-mmvq-il-table` --- ### 📝 Commits (1) - [`5e194ae`](https://github.com/Niko1221/Strata/commit/5e194ae75b8d59f360b8e56c0be0b4b0a1ca1e17) [Engine] add an sm_89 MMVQ_IL matvec table (measured on an RTX 4080 Laptop) ### 📊 Changes **2 files changed** (+37 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/kernels/cuda/native_mmvq.cu` (+29 -1) 📝 `src/kernels/mmvq_il_parity.cpp` (+8 -8) </details> ### 📄 Description Problem: the interleaved small-batch matvec (STRATA_MMVQ_IL) dense-projection rows-per-warp choice is a per-architecture table (kIlArch), and sm_89 (Ada) had none - native_mmvq.cu said "nobody measured it (we have no such card)" - so RTX 40 cards fell back on the shared table measured on an RTX 3060 / RTX 5070. Result: a measured sm_89 table (kIlRows_89 plus the one-column entry) from an RTX 4080 Laptop (58 SMs, 12 GB). Bitwise equal to native_mmvq, so it is only speed. End-to-end decode on the card is unchanged within noise; the dense projections are a small slice of window time. Approach: - Ran `mmvq_il_parity --bench --emit-table` on the card and pasted the printed block as kIlRows_89, registered {89, ...} in kIlArch. The sm_89 table adds the Q3_K row (the shared table has none) and is less aggressive on Q4_K / Q5_K / Q6_K at 2-3 columns, where the shared rows were slower on this card. - Added the measured 5-8 column table kIlRows58_89 but did NOT register it: with STRATA_MMVQ_IL_WIDE on, full decode on this card dropped to ~35-40 tok/s (the standalone bench said those cells win, real decode loses), so 5-8 columns keep the plain kernels, as before. Documented beside the constant. - Updated mmvq_il_parity's check_tables(): it asserted sm_89 must equal sm_86; it now validates the measured sm_89 table's signature cells (same style as the sm_60 / sm_70 checks). Validation: - mmvq_il_parity: OK (every case, T 1-8, rows 1/2/4 and the table, bitwise) on the RTX 4080 Laptop. - Engine builds with the change (strata target, CUDA arch 89); git diff --check clean. Not run: Windows, a second Ada (sm_89) card, release-default-config runs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:30:58 +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#4869
No description provided.