mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1401] [CLOSED] V100 (sm_70): prompt experts on FP16 tensor cores (+10% prompt) and three existing decode kernels as defaults (-6.8% GPU per window) #3430
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#3430
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/1401
Author: @rewin123
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:v100-decode-kernels📝 Commits (9)
f663fb6iq_kernels: Volta runs the routed experts in gfx906's expert mode 8 (bitwise the CUDA layout)0838624native_mmvq: the interleaved 2-4 column kernel on Volta, with a rows table read off a V10068dd294fused_gr: Volta runs gfx906's latency-hidden norm/up (STRATA_GR_FAST), which now also writes the QFUSE q8_1 tail4443bd7bench/results: V100 decode kernels (GPU work per verify window 22.8 -> 21.2 ms); docs/NVIDIA_V100.md: the decode side; tools/ab_engine.pyc62bc9aprefill: on Volta, prompt chunks of 16384+ tokens run the experts on the FP16 tensor-core path instead of MMQ (dp4a there)ad86cbdRevert the Volta FP16 prompt path for big chunks: it costs qualityb0a127eprefill: Volta runs the prompt experts on FP16 tensor-core tiles, a group per launch (STRATA_PF_WMMA)167cc4cpf_wmma_parity: gemm_iq_f16_grouped against a double reference over the FP16 path's weights4bc57c9bench/results: V100 prompt experts on FP16 tensor cores (+9.6% / +10.3% prompt speed); docs/NVIDIA_V100.md📊 Changes
16 files changed (+1064 additions, -28 deletions)
View changed files
📝
CMakeLists.txt(+8 -0)➕
bench/results/2026-10-07-v100-decode-kernels/README.md(+102 -0)➕
bench/results/2026-10-07-v100-decode-kernels/mmvq-il-bench-v100.txt(+96 -0)➕
bench/results/2026-10-07-v100-decode-kernels/stage-profile.txt(+9 -0)➕
bench/results/2026-10-07-v100-prompt-experts/README.md(+70 -0)➕
bench/results/2026-10-07-v100-prompt-experts/ab-runs.jsonl(+72 -0)📝
docs/NVIDIA_V100.md(+10 -1)📝
include/strata/kernels/iq_kernels.hpp(+5 -0)📝
include/strata/prefill/kernels.hpp(+2 -0)📝
src/kernels/cuda/fused_gr.cu(+43 -8)📝
src/kernels/cuda/iq_kernels.cu(+251 -12)📝
src/kernels/cuda/native_mmvq.cu(+33 -2)➕
src/kernels/pf_wmma_parity.cpp(+150 -0)📝
src/prefill/kernels.cu(+16 -0)📝
src/prefill/prefill.cpp(+58 -5)➕
tools/ab_engine.py(+139 -0)📄 Description
Title
V100 (sm_70): prompt experts on FP16 tensor cores (+10% prompt speed) and three existing decode kernels as Volta's defaults (-6.8% GPU work per window)
Summary
Two parts, both picked only on sm_70 (every other card runs what it ran), each with a switch back to the old path.
Prompt (+9.6% / +10.3%). MMQ's integer products are
dp4aon Volta.gemm_iq_f16_groupedruns an MMQ expert group per launch on the FP16 tensor cores (WMMA, FP32 sums): each weight superblock dequantized once into shared memory withdq_dispatch(the FP16 path's formulas), FP16 activations streamed through, the next tile prefetched. It also takes the IQ1_M layers through MMQ's grouping (they were on the per-expert FP16 path). V100-SXM2, setup's IQ2_XS and config, 3 alternating rounds: 26,359-token prompt 1,467 -> 1,608 tok/s, 6,345-token prompt 1,390 -> 1,534 tok/s (rounds within 1%).STRATA_PF_WMMA=0: MMQ.Decode (bitwise). Three kernels Strata already has for other cards: gfx906's expert mode 8 for the routed experts in VRAM,
native_mmvq_ilwith a Volta rows table, gfx906's latency-hidden hyper-connection up. GPU work per verify window 22.80 -> 21.24 ms (engine stage table, 3 rounds); decode tok/s +3-11% against the same-binary control on this rig, whose CPU pool makes decode noisy.STRATA_EXP_MODE=0,STRATA_MMVQ_IL=0,STRATA_GR_FAST=0.Numbers, method, raw data:
bench/results/2026-10-07-v100-prompt-experts/andbench/results/2026-10-07-v100-decode-kernels/.What changed
src/kernels/cuda/iq_kernels.cu:gemm_iq_f16_grouped(CUDA; a stub on HIP); the AMD grouped-expert layouts (STRATA_EXP_MODE) build for CUDA, sm_70 defaults to mode 8, IQ2_XXS gate/up joins the shared-memory kernels on CUDA, a strided call (the window's PCIe call) and a format without an LDS kernel keep the CUDA layout. gfx906 unchanged.src/prefill/prefill.cpp:pf_wmma()(sm_70 default), IQ1_M layers in MMQ's grouping for it, the FP16 activation gather instead of the q8_1 quantization on those layers, the group's two tile launches + an FP16 SwiGLU (src/prefill/kernels.cu: swiglu_split_f16).src/kernels/cuda/native_mmvq.cu: the interleaved 2-4 column kernel on sm_70 with its own rows table (read offmmvq_il_parity --benchon the V100 by the existing table's rule).src/kernels/cuda/fused_gr.cu: gfx906's fast norm/up build for CUDA, default on sm_70;gr_up_fast_kernelnow writes the QFUSE q8_1 tail likegr_up_multi_kernel(this also fixes gfx906 withSTRATA_QFUSE=1).src/kernels/pf_wmma_parity.cpp(+ ctest),tools/ab_engine.py,docs/NVIDIA_V100.md, the two bench result folders.Extra Notes
pf_wmma_parityagainst a double reference over the same FP16 weights: max error ~5e-6 of the output scale. Teacher-forced (STRATA_LOGPOS, a continuation after a 26K / 12.6K prompt): against MMQ, KL 0.0083 (prose) and 0.031 (code) - the same size as MMQ against itself with another chunk size (0.0084-0.0177 prose, 0.025 code). MMQ is not a reference (q8_1 activations); a full-precision reference run was not made.native_expert_benchon all 48 layers,native_grouped_parity,mmvq_il_parity,mmvq_multi_parity,fused_gr_bench,gr_multi_parity,gr_parity).cteston the V100: all pass except 3 that fail on this rig only (no AVX512-VNNI,mlockin a container, the Q2_0 shardple_paritywants);prefill_fused_*skip below sm_80.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUz3LpAVcsKzRLDoJSkZP4
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.