[DeepSeek-V4.1] Bump FlashMLA to the fork's rebase head (v4.1 kernels) - #39171
Merged
Merged
Conversation
Moves the pinned FlashMLA from c1dee56 to sgl-project/FlashMLA@3e18517, which merges DeepSeek's v4.1 kernel drop into the SGLang fork. Upstream restructured csrc/: kernels moved under csrc/kernels/, and the api/*.h headers became api/*.cpp translation units whose pybind registration is compiled out by FLASH_MLA_LIBTORCH_ONLY. This updates the source list, include dirs and defines accordingly, and forward-declares the two attention entry points that flashmla_extension.cc calls directly. Also drops the csrc/utils.h SM103 patch: that file is gone and kerutils now gates SM103A on __CUDA_ARCH__ itself. The cutlass config.h patch stays, since the FlashMLA cutlass submodule pin is unchanged. New in this pin: sm90/sm100 sparse decode for the V3.2-no-RoPE, V4.1 and V4.1-fp4 KV cache formats alongside the existing V3.2 and V4 ones.
B300 is sm_103. sgl-kernel built FlashMLA for sm_100f only; that is family-compatible so the binary runs, but ptxas generates better SASS when it targets the architecture natively. FlashMLA's own setup.py picks sm_100a + sm_103a over sm_100f with exactly that justification in its comment. Worth ~3-8% decode throughput on B300 with the 3e18517 kernels: without it the pin bump regresses ~4% at bs=1 and ~9% at bs=32 against the previous pin. This also makes the existing cutlass/arch/config.h SM103 patch load-bearing. Until now no TU compiled at __CUDA_ARCH__ == 1030, so those defines were dead.
Fridge003
requested review from
BBuf,
FlamingoPg,
HaiShaw,
ispobock,
merrymercy and
yizhang2077
as code owners
September 12, 2026 04:01
test_ascii_ratio sent a bare instruction to the model and asserted the
continuation is >85% printable ASCII. On a base checkpoint that prompt has
no pinned answer: DeepSeek-V4-Flash-0731 continues it with a JSON record
whose language varies, so the probe measures which continuation the model
lands on rather than whether the output is healthy.
Measured on chunan-b300-81 (TP4, DSPARK, 24 runs per pin = 8 prompt
perturbations x {64,128,256} new tokens): with FlashMLA at the *current*
pin c1dee56 — the one main is green on — dropping the prompt's trailing
period alone yields ratio 0.80/0.84, i.e. the same sub-threshold Chinese
translation blob CI reported on #39171. The Q/A framing used by the three
probes above it yields ratio 1.000 at all three lengths on both the old and
the new FlashMLA pin.
The bump itself is not the cause: A/B of the two flashmla_ops builds under
an identical server gives GSM8K 0.985 (c1dee56) vs 0.990-0.995 (3e18517),
and all six decode probes pass on both.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closed
3 tasks
Collaborator
Author
|
Base tests all passed https://github.com/sgl-project/sglang/actions/runs/34738064047 |
Collaborator
Author
|
All extra tests pass https://github.com/sgl-project/sglang/actions/runs/34738063907 |
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Sep 15, 2026
sgl-project#39171) Co-authored-by: Chunan Zeng <zcnrex@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
It's just #38942 rebased on main branch
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #34738064047
Latest PR Test (Extra): ✅ Run #34738063907
Latest PR Test (AMD ROCm 10): ❌ Run #34738064037