mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2069] [CLOSED] sm_75: Turing tables for the decode matvecs and the grouped experts (bitwise, decode +6 %) #3838
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#3838
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/2069
Author: @rafatxf
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:pr/sm75-decode-tables📝 Commits (2)
5ce8717sm_75: interleaved small-batch matvec table for Turing (kIlRows_75)2f85e00sm_75: grouped native experts default to mode 4 (down: mode 0 in windows of 4+ tokens)📊 Changes
2 files changed (+38 additions, -4 deletions)
View changed files
📝
src/kernels/cuda/iq_kernels.cu(+23 -3)📝
src/kernels/cuda/native_mmvq.cu(+15 -1)📄 Description
Two Turing-only defaults, both bitwise equal to what RTX 20 runs today, both with a switch to turn them off. Measured on an RTX 2080 Ti; I have no other sm_75 card to check them on.
kIlRows_75(native_mmvq.cu): the interleaved small-batch matvec kernels with their own table, as Volta and Pascal have. The 2-6 column dense projections of a verify window ran the plain multi-column kernels, which on Turing are bound bydp4athroughput from 2 columns on.STRATA_SM75_IL=0keeps the plain kernels. No one-column table: the engine's dedicated single-column kernels sum in another order, for a 0.5 % gain.iq_kernels.cu,exp_mode()): the AMD layouts already build for CUDA; mode 4 is bitwise equal to mode 0 and faster for the window's usual 1-2 entries per expert. Its down projection loses once groups hold 3+ entries, so windows of 4+ tokens (cap_groups > 30) keep mode 0 for the down projection.STRATA_SM75_EXP=0keeps mode 0;STRATA_EXP_MODEstill overrides.Setup
RTX 2080 Ti 22 GB (sm_75, PCIe 3.0 x16), i7-6700, 56 GB DDR4-2133, CUDA 13.0, driver 595, SM clock locked at 1650 MHz, 240 W.
v0.1.43built from source with-DSTRATA_BUILD_TESTS=ON. Model Q2_0,--resident-experts,--spec 4 --spec-min-p 0.7,--max-context 524288(YaRN ×2),--kv int8 --kv-resident 32768.1. The matvec table:
mmvq_il_parity --bench --emit-tableBitwise equal to
native_mmvq(the parity run). Selected rows (µs; "il" = the interleaved kernel with the rows per warp the table picks):The 3 % rule of the other tables; the full
--emit-tableoutput is in the commit's table.2. Expert layout:
native_expert_bench <shard1> 20,40 G T 0 4Real Q2_0 rows of Flash-Next, bitwise equal to mode 0 in every case (
0 differing):The bold rows are why the down projection keeps mode 0 in windows of 4+ tokens.
Engine: same binary, switches off / on
One-shot, 256 new tokens, greedy, runs interleaved off / on / on / off (off =
STRATA_SM75_IL=0 STRATA_SM75_EXP=0), decode tok/s:At 4K all four runs wrote the same tokens (the same MD5 off and on); prefill is unchanged (1012-1016 / 1352-1354 tok/s). In
--servesteady state (4K prompts, 99 % cache hits) the table alone took ~69 to ~76-77 tok/s.The token output of a one-shot run here is not fully deterministic run to run (two MD5s appear with any build, from the CPU/GPU split of the experts), so runs are compared within the same MD5.
Tests
mmvq_il_paritybitwise,native_grouped_parity0 failures,native_expert_bench0 differing for every case above.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.