mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3104] [CLOSED] [Engine] extend native-IQ prefill dispatch to SM75 #4455
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#4455
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/3104
Author: @c3c
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:feature/sm75-native-iq📝 Commits (3)
8d1596fprefill: extend native IQ kernels to sm75df937c3prefill: gate SM75 native IQ separatelybaa56f5docs: clarify SM75 native IQ extension gate📊 Changes
5 files changed (+77 additions, -23 deletions)
View changed files
📝
docs/DETAILS.md(+6 -0)📝
include/strata/core/sm75_series.hpp(+1 -0)📝
include/strata/prefill/moe_fused_iq.hpp(+5 -2)📝
src/prefill/moe_fused_iq.cu(+58 -18)📝
tests/cuda/prefill_fused_iq_test.cpp(+7 -3)📄 Description
This the rebased version of https://github.com/Niko1221/Strata/pull/1581 for the native-IQ prefill part of the PR.
Problem and result
Strata already has fused native-IQ prompt-expert kernels, but on SM75/Turing the
native path only admits the Q2_0/Q2_0 pair. Native expert packs using IQ2, IQ3,
or IQ4 gate/up tensors therefore fall back to the ordinary MMQ prompt path.
This PR adds a separate, manual A/B switch for the additional SM75 format
pairs. On an RTX 2080 Super Max-Q with an IQ3_XXS pack, enabling the extension
on top of the same VRAM-loan configuration increased median prefill from 774.8
to 859.4 tokens/s (+10.9%). Median generation remained 30.9 tokens/s.
The default path is unchanged when the new switch is absent.
Approach
Enable the extension with:
STRATA_PF_FUSEDandSTRATA_PF_FUSED_SM75already exist. This PR introducesonly
STRATA_PF_FUSED_NATIVE_SM75; it is deliberately separate so existingSM75 users who enabled the Q2_0 path do not silently opt into new arithmetic.
STRATA_PF_FUSED_NATIVEremains the existing global native-path A/B disable.STRATA_PF_FUSEDSTRATA_PF_FUSED_SM75STRATA_PF_FUSED_NATIVESTRATA_PF_FUSED_NATIVE_SM75The new SM75 coverage is:
Admission checks the actual CUDA capability, the specific format pair, and
kernel occupancy. The admitted SM75 formats use the qualified 128-row Turing
shape. Unsupported pairs continue through MMQ. SM80+, SM120, HIP, and decode
dispatch are unchanged.
The path keeps the same selected experts, routing weights, and weighted scatter
order. It does change prompt expert arithmetic and may therefore change prompt
state or generated tokens slightly; it is not claimed to be bit-identical to
MMQ.
The implementation updates the SM75 capability description, native-IQ public
contract and CUDA dispatch in
include/strata/core/sm75_series.hpp,include/strata/prefill/moe_fused_iq.hpp, andsrc/prefill/moe_fused_iq.cu. The corresponding format matrix is covered intests/cuda/prefill_fused_iq_test.cpp, anddocs/DETAILS.mddocuments the newmanual gate.
Validation
Tested revision:
44500122, based on upstreame88ee39d(0.2.0-beta). Thecombined end-to-end build used the same native commit plus the separate
VRAM-loan branch at
db02a533.Passed
strata.exeandprefill_fused_iq_test.exe.admitted gate/up and down pair listed above, plus the existing Q2_0/Q2_0
pair. In its reference cases, fused-versus-MMQ relative RMS was
3.5e-5--4.0e-4; the large timing cases also passed, with relative RMS1.2e-4--2.1e-4.machine. The production server was stopped during each run and restored
afterward.
median versus 514.6 PP for the exact upstream binary (-0.2%, within the run
ranges), with the same 2,304/226 plan.
Failed
upstream
src/kernels/gdn_chunk_parity.cppcalls POSIXsetenv. Theproduction and focused native-IQ targets compile and run; that unrelated
current-main test compile failure remains.
Not run
reasoning cap, so these runs validate execution and rates, not complete
answer equivalence.
Benchmark configuration
7.5.
--spec 4,--short-read 0, experimental speed projection,STRATA_BF16_TC=1, andSTRATA_PROMPT_ATTN_Q4_TC=1held constant.every repetition. Values below are medians of three engine timing lines.
Results
The isolated net effect in this workload is +10.9% PP. This is an end-to-end
feature A/B rather than a kernel-only number: native-IQ changes the supported
expert execution path and the planner admits a different chunk/ring geometry.
The separate request-scoped VRAM-loan PR
is not an algorithmic requirement. It was needed on this 8 GiB configuration
to free enough prefill VRAM for the useful native shape. A larger-memory GPU
may admit the native path without it.
The SM75 native-IQ extension itself is independent of upstream
--prefill-head-aliasand can be used with it. The separate VRAM-loan PRrejects head alias because both features manage the native output-head
allocation at the prompt/decode boundary.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.