mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1021] [CLOSED] V100: bit-exact GEMV / MoE operator fusions (experimental build only) #2970
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#2970
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/1021
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v100/fusions📝 Commits (10+)
fa16567setup: an earlier config that does not parse is skipped, not a crash; configs are written atomically (#459)749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it📊 Changes
14 files changed (+1390 additions, -122 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(+49 -14)➕
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.