mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1097] [CLOSED] V100: bit-exact GEMV / MoE operator fusions (experimental build only) #3022
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#3022
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/1097
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v100/fusions-v2📝 Commits (1)
204e04aV100: operator fusions for the decode GEMV / MoE paths, bitwise📊 Changes
14 files changed (+1388 additions, -120 deletions)
View changed files
📝
CMakeLists.txt(+11 -0)➕
bench/micro/fusions_parity.cu(+424 -0)📝
include/strata/kernels/bf16_gemv.hpp(+8 -0)📝
include/strata/kernels/quantize_act.hpp(+32 -0)➕
include/strata/kernels/quantize_act_dev.cuh(+113 -0)📝
include/strata/kernels/s_gemv.hpp(+17 -0)➕
include/strata/kernels/s_rowdev.cuh(+176 -0)➕
include/strata/kernels/swiglu.cuh(+42 -0)📝
src/core/layer.cpp(+62 -4)📝
src/kernels/cuda/bf16_gemv.cu(+48 -0)📝
src/kernels/cuda/quantize_act.cu(+190 -104)📝
src/kernels/cuda/s2_expert_grouped.cu(+47 -12)➕
src/kernels/cuda/s_gemv_pair.cu(+136 -0)📝
src/kernels/cuda/shared_expert.cu(+82 -0)📄 Description
What
Operator fusions for the decode GEMV / MoE paths, split out of #627:
s_gemv_pair)bf16_gemv_pair,y1 = w1@x,y2 = w2@x)quantize_act_images)Every fused output is bitwise what the unfused sequence produced (
memcmpclean); the fused sequence keeps the unfused kernels' summation order.Gating
All fused call sites in
src/core/layer.cpp,src/kernels/cuda/shared_expert.cuands2_expert_grouped.cuare under#if defined(STRATA_EXPERIMENTAL_SM60); the#elseis main's code verbatim. A non-experimental configure (arch 75, no SM60) builds clean.Measured
V100-SXM2-16GB, CUDA 12.8,
fusions_parity --bench(CUDA events, 200 reps):32K end-to-end
Same setup: prefill 1542.8 single / 2202.5 dual vs main's 1557.1 / 2207.0, and decode within the +-15% session noise. The kernel time saved (4-16 us per token) is not visible at this scale, the same conclusion #627 reported. The gain is the kernel time.
Tests
fusions_parity: 0 failures, all 9 checks bitwise identical.s2_gemv_parityshared_expert_paritys2_gemv_q8_parityquantize_act_paritys_gemv_paritybf16_gemv_paritys_gemv_q8k_paritys2_expert_grouped_parity🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.