[AMD] Enable Fast Triton Sparse MLA backend - #30575
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
/tag-and-rerun-ci |
…nce CSV; rules: known-boxes m12-17 + no-SIGKILL-on-GPU-procs Adds the MI355X (MXFP4) prefill kernel breakdown (tuned MoE, sgl-project#30575/sgl-project#30519/sgl-project#30715 annotations) and the 1k/1k conc64 MI355X-vs-B200 decode reference CSV. Documents the m12-17 GLM-5.2 box and the rule against pkill -9 on ROCm GPU server processes (triggers 100-200GB gpucore dumps that fill the shared disk).
|
Hi @clintg6 In the perspective of E2E in SGLang, TTFT actually speedup >10% and it also helps TPOT be faster as waiting for prefill is reduced. TPOT on high conc shows regression on i1k but i8k still benefit from TTFT and Triton attention kernel in i8k take small runtime so it didn't add the show the regression in the end. From an end-to-end perspective in SGLang, TTFT speeds up by >10%, which in turn helps TPOT since requests spend less time waiting on prefill. My only open question: is the regression at high concurrency expected behavior, or is there room to improve it? |
|
/rerun-failed-ci |
|
Hi @clintg6 @1am9trash — sharing independent MI355X validation on GLM-5.2 AgentX (TP4/EP4, conc=8, 3600s, vs TileLang (c8):
Head-to-head vs our parallel PR #38601 (same recipe):
All gaps are ~1–3% (noise). AMD internal has reviewed this; we plan to close #38601 once #30575 lands. |
|
Error: PR Test Base / base-c-test-8-gpu-b300 - https://github.com/sgl-project/sglang/actions/runs/34293813943/job/102658495822?pr=30575 is addressed in #38588 |
|
@ispobock @xiezhq-hermann @BBuf @hzh0425 please have a review. |
Hi, we noticed #38588 has been merged. Happy to leave next steps!Thanks! |
sgl-project/sglang#30575 exposes the Fast Triton Sparse MLA path as an explicit backend; the 20260910 image already contains it. Co-authored-by: Cursor <cursoragent@cursor.com>
* update config for glm5.2-mxfp4 on mi355x gpu * update pr link * Update changelog link for replacement PR Co-authored-by: Cursor <cursoragent@cursor.com> * Update changelog link for upstream PR Co-authored-by: Cursor <cursoragent@cursor.com> * Raise SGLang /health timeout so eval-only GSM8K survives AITER JIT. Cold mha_varlen compile after ready is ~40s; the default 20s generate health check marked the server UnHealthy and lm_eval hit a dead port. Co-authored-by: Cursor <cursoragent@cursor.com> * Bump the GLM-5.2 MI355X SGLang daily image to 20260910. Co-authored-by: Cursor <cursoragent@cursor.com> * Lower the TP HiCache host-pool ratio from 1.5 to 1.0. Eval and sweep keep the same ratio-based sizing so a green evals-only run at ratio 1.0 remains comparable for this sweep PR. TP4 pinned host DRAM drops from ~679 GB to ~453 GB. Co-authored-by: Cursor <cursoragent@cursor.com> * Keep HiCache write_through_selective instead of restoring write_through. Matches main and the ratio-1.0 eval PR so a green evals-only run is the same host-tier write path as this sweep. Co-authored-by: Cursor <cursoragent@cursor.com> * Rename --cuda-graph-max-bs for the v0.5.19 image. The 20260910 tag splits that flag into prefill and decode names, so the unsuffixed form is rejected as ambiguous and the server never starts. Co-authored-by: Cursor <cursoragent@cursor.com> * Restore HiCache write-through policy Co-authored-by: Cursor <cursoragent@cursor.com> * Use canonical decode CUDA graph limit Co-authored-by: Cursor <cursoragent@cursor.com> * Switch GLM-5.2 DSA prefill/decode to Triton. sgl-project/sglang#30575 exposes the Fast Triton Sparse MLA path as an explicit backend; the 20260910 image already contains it. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix changelog --------- Co-authored-by: LI MOU <lxglbk@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Chun Fang <chun.fang@amd.com>


Fast Triton Sparse MLA Kernels for DSA (Prefill + Decode)
Summary
This adds
tritonas an explicit DSA prefill/decode backend:The new backend provides pure Triton sparse MLA kernels for the fp8 DSA path on ROCm, validated on MI355X (gfx950) and MI300X (gfx942). It replaces the previous Triton prefill env-var gate, SGLANG_DSA_TRITON_PREFILL, with a faster kernel exposed through the normal backend option and adds a fast Triton kernel for the decode path.
What Changed
tritontoDSA_CHOICESfor--dsa-prefill-backendand--dsa-decode-backend.--kv-cache-dtype fp8_e4m3.dsa_backend.py.512 nope + 64 rope) instead of the scaled fp8 layout used by other non ROCm backends.Kernel Notes
kv_splits == 1.exp2withsm_scale * LOG2Eprescaling.The kernels consume raw fp8 MLA KV cache layout on HIP. They are not intended for NVIDIA's scaled fp8 KV layout.
Validation
H=16,D_V=512,D_TAIL=64,topk=2048) showed about 10% speedup for the split-dim prefill kernel versus the earlier 512-wide-dot Triton env gated kernel, with cosine similarity 1.00000.ISL=8192,OSL=1024) showed Triton improving throughput by roughly 3-5% versus TileLang in the measured concurrency range.Performance
End-to-end GLM-5.1-MXFP4 serving on TP4 MI355X, concurrency 2:
Changed Files
python/sglang/srt/layers/attention/dsa/triton_sparse_mla.py: updates the Triton prefill implementation with split-dim and split-K paths.python/sglang/srt/layers/attention/dsa/triton_sparse_mla_decode.py: adds the Triton decode implementation.python/sglang/srt/layers/attention/dsa_backend.py: adds Triton prefill/decode dispatch and removes the old env-var-gated prefill path.python/sglang/srt/server_args.py: exposestritonas a DSA backend choice.python/sglang/srt/arg_groups/overrides.py: validates Triton DSA override combinations against fp8 KV cache requirements.python/sglang/srt/model_executor/model_runner_kv_cache_mixin.py: selects raw HIP MLA KV layout for Triton DSA.python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla.py: includes Triton in the gfx950 fused-rope skip check.CI States
Latest PR Test (Base): ❌ Run #34293813943
Latest PR Test (Extra): ❌ Run #34293813789
Latest PR Test (AMD ROCm 10): ❌ Run #34293813924