[PR #4642] [Engine] add opt-in IQ1_M/Q2_0 fused prefill on SM75 #5125

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4642
Author: @riccardogiorato
Created: 10/29/2026
Status: 🔄 Open

Base: main ← Head: engine/iq1m-fused-prefill


📝 Commits (5)

  • 38704fa prefill: add opt-in IQ1_M fused experts on SM75
  • b23b337 bench: document SM75 IQ1_M prefill measurements and limits
  • ed6d3b5 bench: condense IQ1_M evidence into results and one example config
  • 52fe07c Merge remote-tracking branch 'origin/main' into engine/iq1m-fused-prefill
  • 770cba2 bench: record SM75 validation after upstream 0.2.8 merge

📊 Changes

12 files changed (+618 additions, -23 deletions)

View changed files

📝 CMakeLists.txt (+6 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/README.md (+94 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/config.example.json (+63 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/edit-task.json.gz (+0 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/expected.py.txt (+124 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/reproduce.py (+36 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/results.json (+86 -0)
➕ bench/results/2026-10-29-sm75-iq1m-prefill/validation.txt (+101 -0)
📝 docs/DETAILS.md (+12 -0)
📝 include/strata/prefill/moe_fused_iq.hpp (+4 -1)
📝 src/prefill/moe_fused_iq.cu (+53 -13)
📝 tests/cuda/prefill_fused_iq_test.cpp (+39 -9)

📄 Description

This adds opt-in IQ1_M gate/up + Q2_0 down prefill on SM75, covering the three fallback layers in our Swift IQ2_XS pack. It extends Strata’s existing fused kernel with exact int8 weight codes and a 53,760-byte shared-memory tile. Enable with STRATA_PF_FUSED=1 STRATA_PF_FUSED_SM75=1 STRATA_PF_FUSED_IQ1_M=1; defaults stay unchanged.

RTX 2080 8 GB, 165 W, 131K capacity, 122,451-token cold edit, two runs per arm:

  • Clean upstream, actual 1K chunk: 353.4 → 353.4 tok/s, flat.
  • Our tuned build, actual 4K chunk: 848.1 → 874.9 tok/s (+3.2%). This includes existing loans/broader SM75 dispatch and the fully fused buffer layout becoming available; it is not a stock-upstream speedup.

TensorFold’s tiled quantized prefill and shared-memory sizing inspired the investigation; no TensorFold code was copied. This format extension is separate from #3277.

Passed: CUDA build, independent-reference tests, memcheck, opt-out checks, existing Q2 output hashes. Existing device-function disassembly in this translation unit is unchanged. Exact-edit failures remain: upstream off/on passed 2/2 and 1/2; tuned off/on 1/2 each. Broad coding-quality equivalence is unproven.

Reproduction, individual runs, failures and attribution.

Draft: HIP compilation/hardware checks are unavailable here. Help validating the shared CUDA/HIP source is welcome before review.


🔄 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/4642 **Author:** [@riccardogiorato](https://github.com/riccardogiorato) **Created:** 10/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `engine/iq1m-fused-prefill` --- ### 📝 Commits (5) - [`38704fa`](https://github.com/Niko1221/Strata/commit/38704fa2e969fd225eb4c8add17d665e49a22332) prefill: add opt-in IQ1_M fused experts on SM75 - [`b23b337`](https://github.com/Niko1221/Strata/commit/b23b3375ced8da17649cc8dbaa250f9e0f24b368) bench: document SM75 IQ1_M prefill measurements and limits - [`ed6d3b5`](https://github.com/Niko1221/Strata/commit/ed6d3b5979c834bf3e623e620f83562a471cbf7c) bench: condense IQ1_M evidence into results and one example config - [`52fe07c`](https://github.com/Niko1221/Strata/commit/52fe07c88412237ab8387e5031908d514cc37877) Merge remote-tracking branch 'origin/main' into engine/iq1m-fused-prefill - [`770cba2`](https://github.com/Niko1221/Strata/commit/770cba2bc38d62047139cc4e506d2a3148c07a95) bench: record SM75 validation after upstream 0.2.8 merge ### 📊 Changes **12 files changed** (+618 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+6 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/README.md` (+94 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/config.example.json` (+63 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/edit-task.json.gz` (+0 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/expected.py.txt` (+124 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/reproduce.py` (+36 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/results.json` (+86 -0) ➕ `bench/results/2026-10-29-sm75-iq1m-prefill/validation.txt` (+101 -0) 📝 `docs/DETAILS.md` (+12 -0) 📝 `include/strata/prefill/moe_fused_iq.hpp` (+4 -1) 📝 `src/prefill/moe_fused_iq.cu` (+53 -13) 📝 `tests/cuda/prefill_fused_iq_test.cpp` (+39 -9) </details> ### 📄 Description This adds opt-in IQ1_M gate/up + Q2_0 down prefill on SM75, covering the three fallback layers in our Swift IQ2_XS pack. It extends Strata’s existing fused kernel with exact int8 weight codes and a 53,760-byte shared-memory tile. Enable with `STRATA_PF_FUSED=1 STRATA_PF_FUSED_SM75=1 STRATA_PF_FUSED_IQ1_M=1`; defaults stay unchanged. RTX 2080 8 GB, 165 W, 131K capacity, 122,451-token cold edit, two runs per arm: - Clean upstream, actual 1K chunk: **353.4 → 353.4 tok/s**, flat. - Our tuned build, actual 4K chunk: **848.1 → 874.9 tok/s (+3.2%)**. This includes existing loans/broader SM75 dispatch and the fully fused buffer layout becoming available; it is not a stock-upstream speedup. TensorFold’s tiled quantized prefill and shared-memory sizing inspired the investigation; no TensorFold code was copied. This format extension is separate from #3277. Passed: CUDA build, independent-reference tests, memcheck, opt-out checks, existing Q2 output hashes. Existing device-function disassembly in this translation unit is unchanged. Exact-edit failures remain: upstream off/on passed 2/2 and 1/2; tuned off/on 1/2 each. Broad coding-quality equivalence is unproven. [Reproduction, individual runs, failures and attribution](https://github.com/riccardogiorato/Strata/blob/engine/iq1m-fused-prefill/bench/results/2026-10-29-sm75-iq1m-prefill/README.md). **Draft:** HIP compilation/hardware checks are unavailable here. Help validating the shared CUDA/HIP source is welcome before review. --- <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#5125
No description provided.