[PR #2447] [CLOSED] native_kernels: sm_86 dense Q8_0 GEMVs keep two rows per block (#2441) #4049

Closed
opened 2026-11-07 15:32:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2447
Author: @yannickloth
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/2441-sm86-dense-q8-rows


📝 Commits (1)

  • c50bf20 native_kernels: sm_86 dense Q8_0 GEMVs keep two rows per block (#2441)

📊 Changes

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

View changed files

📝 docs/QUANTS.md (+3 -1)
📝 src/kernels/cuda/native_mmvq.cu (+6 -9)

📄 Description

Fixes the ~20-25% decode regression reported in #2441 on an RTX A3000 Laptop 12 GB (sm_86).

What this changes

0.1.44 made the dense Q8_0 GEMV (src/kernels/cuda/native_mmvq.cu) take one row per block on every sm_86 card with n_out >= 2048. It was measured on an RTX A4000 (+1-4% at 2-4 columns; 6144 -> 2560 at 6 columns 70% -> 76%). This reverts the sm_86 default to two rows per block. gfx1201 (RDNA4) is unchanged: it keeps one row where it was measured.

STRATA_NO_MMVQ_ROWS2=1 still forces one row everywhere, sm_86 included, so the rule can be re-measured per card.

Why

#2441, RTX A3000 Laptop 12 GB (GA104, sm_86, 32 SMs) + i7-12850HX, IQ3_XXS GSQ-RCO pack, --spec 4, same request on both engines:

engine decode (tok/s) drafts accepted
0.1.43.1 38.1, 38.5, 40.2, 42.1 78.9 - 85.7%
0.1.44.1 28.7, 32.0, 35.0, 39.7 73.9 - 83.6%
0.1.44.1, STRATA_ROUTE_TAIL_SKIP=0 23.7 - 25.8 79.1 - 83.1%

On CUDA/Linux the only decode-path default that changed in 0.1.44 besides the commit batching is this sm_86 rule, and sm_86 is exactly the reporter's card. The dense Q8_0 GDN and attention GEMVs of a verify window are a large share of that window's GPU time, so a per-SKU row choice that is +1-4% on a 48-SM A4000 can be a large loss on a 32-SM A3000.

Verification

  • Still to run (draft): the RTX A3000 A/B. Expected: STRATA_NO_MMVQ_ROWS2=0 (two rows) restores ~0.1.43.1, and STRATA_NO_MMVQ_ROWS2=1 on 0.1.44.1 reproduces the regression. Please ask the reporter in #2441 to post it before this lands.
  • Answers do not change: the one-row and two-row kernels keep their own partial sums and reduction, so output is bit-identical.
  • Not built here: no engine was compiled for this PR; the removed code is the non-HIP branch only, so HIP and SYCL paths are untouched.
  • If the A/B instead points at STRATA_COMMIT_BATCH, this PR is the wrong fix and will be closed - that is the other default-on 0.1.44 decode change.

Reported and diagnosed on hardware the maintainers do not have (per docs/COMMUNITY_BENCHMARKS.md).

Refs #2441.


🔄 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/2447 **Author:** [@yannickloth](https://github.com/yannickloth) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/2441-sm86-dense-q8-rows` --- ### 📝 Commits (1) - [`c50bf20`](https://github.com/Niko1221/Strata/commit/c50bf20785264054fa7b66715b3e995197848589) native_kernels: sm_86 dense Q8_0 GEMVs keep two rows per block (#2441) ### 📊 Changes **2 files changed** (+9 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/QUANTS.md` (+3 -1) 📝 `src/kernels/cuda/native_mmvq.cu` (+6 -9) </details> ### 📄 Description Fixes the ~20-25% decode regression reported in #2441 on an RTX A3000 Laptop 12 GB (sm_86). ## What this changes 0.1.44 made the dense Q8_0 GEMV (`src/kernels/cuda/native_mmvq.cu`) take one row per block on **every** sm_86 card with `n_out >= 2048`. It was measured on an RTX A4000 (+1-4% at 2-4 columns; 6144 -> 2560 at 6 columns 70% -> 76%). This reverts the sm_86 default to two rows per block. gfx1201 (RDNA4) is unchanged: it keeps one row where it was measured. `STRATA_NO_MMVQ_ROWS2=1` still forces one row everywhere, sm_86 included, so the rule can be re-measured per card. ## Why #2441, RTX A3000 Laptop 12 GB (GA104, sm_86, 32 SMs) + i7-12850HX, IQ3_XXS GSQ-RCO pack, `--spec 4`, same request on both engines: | engine | decode (tok/s) | drafts accepted | |---|---:|---| | 0.1.43.1 | 38.1, 38.5, 40.2, 42.1 | 78.9 - 85.7% | | 0.1.44.1 | 28.7, 32.0, 35.0, 39.7 | 73.9 - 83.6% | | 0.1.44.1, `STRATA_ROUTE_TAIL_SKIP=0` | 23.7 - 25.8 | 79.1 - 83.1% | On CUDA/Linux the only decode-path default that changed in 0.1.44 besides the commit batching is this sm_86 rule, and sm_86 is exactly the reporter's card. The dense Q8_0 GDN and attention GEMVs of a verify window are a large share of that window's GPU time, so a per-SKU row choice that is +1-4% on a 48-SM A4000 can be a large loss on a 32-SM A3000. ## Verification - **Still to run (draft):** the RTX A3000 A/B. Expected: `STRATA_NO_MMVQ_ROWS2=0` (two rows) restores ~0.1.43.1, and `STRATA_NO_MMVQ_ROWS2=1` on 0.1.44.1 reproduces the regression. Please ask the reporter in #2441 to post it before this lands. - **Answers do not change:** the one-row and two-row kernels keep their own partial sums and reduction, so output is bit-identical. - **Not built here:** no engine was compiled for this PR; the removed code is the non-HIP branch only, so HIP and SYCL paths are untouched. - If the A/B instead points at `STRATA_COMMIT_BATCH`, this PR is the wrong fix and will be closed - that is the other default-on 0.1.44 decode change. Reported and diagnosed on hardware the maintainers do not have (per docs/COMMUNITY_BENCHMARKS.md). Refs #2441. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:46 +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#4049
No description provided.