mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1418] [CLOSED] cuda: opt-in MMVQ activation reuse across output rows #3439
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3439
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1418
Author: @imanu86
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr/b6-mmvq-rows📝 Commits (1)
8cae814OPUS-MTP-MMVQ multi-colonna con attivazioni riusate fra le righe del blocco (STRATA_B6_MMVQ_ROWS) e micro-bench📊 Changes
4 files changed (+398 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+6 -0)📝
include/strata/kernels/native_mmvq.hpp(+6 -0)➕
src/kernels/b6_mmvq_bench.cpp(+218 -0)📝
src/kernels/cuda/native_mmvq.cu(+168 -0)📄 Description
This adds an opt-in exact multi-column MMVQ kernel for Q4_K, Q5_K, Q6_K and IQ4_XS, plus
b6_mmvq_bench. Each column's Q8_1 activation fragment is loaded once per weight block and reused across multiple output rows. The Q6_K scales remain in registers. The intended arithmetic order matches the existing exact layout.STRATA_B6_MMVQ_ROWS=1selects two output rows per block;2,4, and8select those row counts explicitly. Unset or0retains the existing kernel. The new path requires the exact layout,STRATA_TSUMoff, and a supported format; other calls fall back. The setter/getter are for tools and must be used before graph capture. Single-column calls retain their existing path.Relationship to current upstream: this branch starts at
82f46a8. Upstreamd5ea713now also contains the separate interleaved MMVQ path (MMVQ_IL), whose selection is restricted to supported shapes, 2-4 columns, and sm_80 or newer. This PR has not been rebased or measured together with that addition. Its potential relevance includes Turing and calls that use the existing native layout; it should not be described as a measured improvement over the new interleaved path.Historical evidence, with limits:
Publication validation:
8cae814e6e819736e47c95f3b5e8b056c7528c0f, one commit over82f46a8c8f475f001ad76d92f58f4a4f8ffb0253;git diff --check 82f46a8..HEADpasses.Reproduction after building the CUDA branch:
The first benchmark selects all visible devices and two rows per block; the second selects device 0 and four rows per block. An exit code of zero covers only the benchmark's synthetic case matrix, not full-model equivalence.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.