Repository navigation
[AMD][MI35X] Qwen3.8-Flash-Next FP4 SGLang agentic MTP: ROCm 10 image 20261117 + 7 upstream-PR patches, conc 1/2/12/24/48/80 / [AMD][MI35X] Qwen3.8-Flash-Next:ROCm 10 镜像 20261117 + 7 个上游 PR 补丁,并发 1/2/12/24/48/80 - #4832
ChangLiu0709 wants to merge 63 commits into
Conversation
…(upstream image) Add qwen3.8next-fp4-mi355x-sglang-agentic-mtp in the srt-slurm recipe layout: amd/Qwen3.8-Flash-Next-Quark-MXFP4-PLEFP8 on the upstream lmsysorg/sglang:v0.5.21-rocm724-mi35x image (pinned by digest), TP1/EP1, conc 1-16, native NEXTN MTP (3 steps, eagle-topk 1, 4 draft tokens) with the aiter attention backend. No local SGLang/AITER patches. Co-authored-by: Cursor <cursoragent@cursor.com>
…age at conc 8/12/16 Co-authored-by: Cursor <cursoragent@cursor.com>
…xt MI355X AgentX recipe Co-authored-by: Cursor <cursoragent@cursor.com>
…X AgentX recipe Co-authored-by: Cursor <cursoragent@cursor.com>
…10 image with patches Image: lmsysorg/sglang-rocm:v0.5.21-rocm10-mi35x-20261014 (pinned by digest). The recipe's setup_script patches its editable AITER (e7d2453f) and SGLang (bab9c81f) checkouts before the server starts: - ROCm/aiter#5992: FlyDSL causal conv1d prefill and GDN decode/verify - sgl-project/sglang#41879, ported to bab9c81f: opt-in SGLANG_AITER_GDN_CONV/_DECODE hooks - fused Triton QK Gemma-RMSNorm + M-RoPE + gate on HIP for Qwen3.5/Qwen3.8 A patch that no longer applies fails the worker. Local check on MI355X (TP1, recipe server args at conc 16, CI's lm-eval GSM8K, 5-shot, full test set): 0.9636 with GDN conv on and GDN decode off, as in the recipe; 0.9697 with GDN decode on too. Co-authored-by: Cursor <cursoragent@cursor.com>
…m 10 image amd/Qwen3.8-Flash-Next-Quark-MXFP4-PLEFP8 stores the MTP experts in BF16 but its Quark exclude list only names the MTP shared expert, so the draft model loaded the routed experts as MXFP4 and failed with a 1280 vs 2560 size mismatch. Apply the loader fix from amd-nprotaso/sglang qwen_3_8_improvement, which disables Quark for the draft when the checkpoint's MTP weights are unquantized. GSM8K (5-shot, recipe args, 1 GPU) with this checkpoint on the upstream image plus the setup script: 0.9697. Co-authored-by: Cursor <cursoragent@cursor.com>
… on MI355X Switch qwen3.8next-fp4-mi355x-sglang-agentic-mtp to amd/Qwen3.8-Flash-Next-Quark-MXFP4-AttnFP8-PLEFP8: MoE experts (including the shared and MTP experts) in OCP MXFP4, self-attention and linear-attention projections (including MTP self-attention) in per-channel FP8 with dynamic per-token FP8 activations, and the PLE table in per-tensor FP8. The upstream image's Quark W8A8 FP8 scheme serves the attention layers, and the draft keeps Quark since its MTP weights carry quantization scales. GSM8K (5-shot, recipe args, 1 GPU) on the upstream image plus the setup script: 0.9704; MTP mean accept length unchanged (3.49 vs 3.50). Co-authored-by: Cursor <cursoragent@cursor.com>
Add SGLANG_MAMBA_SSM_DTYPE=bfloat16 and SGLANG_USE_AITER_FP8_PER_TOKEN=1 to the server env, matching the checkpoint's reference setup. On this image the SSM dtype already follows --mamba-ssm-dtype, and the Quark W8A8 FP8 scheme takes per-token activation scaling from the checkpoint config. Co-authored-by: Cursor <cursoragent@cursor.com>
…ratio-3 packing into the MI355X image
Extend the recipe's setup script with five optimizations from
amd-nprotaso/{aiter,sglang} qwen_3_8_improvement and sgl-project/sglang#44302,
each as its own patch (AITER kernel, then the SGLang dispatch):
- FlyDSL hc_mix for the hyper-connection mix (SGLANG_AITER_HC_MIX, default
on) and the single-kernel hc_combine on ROCm (SGLANG_HC_COMBINE_SPLIT off)
- FlyDSL BF16 paged decode for QSA post-gather attention
(SGLANG_AITER_QSA_PA_DECODE, opt-in)
- single-kernel FlyDSL GDN chunked prefill (SGLANG_AITER_GDN_PREFILL=1 with
SGLANG_AITER_GDN_PREFILL_H=fused, opt-in)
- AITER topk_gating for the 512-expert softmax router
(SGLANG_ROCM_USE_AITER_TOPK_GATING, default on)
- fused QKVZ/BA packing for head ratio 3 (sglang#44302)
Later patches touch files of earlier ones, so the script now records the
applied patch set in a marker instead of reverse-checking each patch, and
resolves the patch directory to an absolute path. Applied to clean e7d2453f
and bab9c81f checkouts the result matches the source branches; a re-run is
a no-op. Not yet served end to end.
Co-authored-by: Cursor <cursoragent@cursor.com>
Serve with --ple-offload-embedding and declare the fp8 PLE storage through --json-model-override-args (text_config.ple_embedding_dtype=float8_e4m3fn): SGLang rejects switching the offloaded table to fp8 at load. Frees the table's GPU memory for KV cache. Not yet verified on MI355X. Co-authored-by: Cursor <cursoragent@cursor.com>
…loading and GDN decode
Three more patches from amd-nprotaso/{aiter,sglang} qwen_3_8_improvement for the
upstream ROCm 10 image:
- sglang 7e3eb83f97: padded QSA group writes read the inert source slot, off-page
prefixes use the absolute mamba checkpoint grid, separate shared-expert tensors
load into the fused MoE slot (strict for the MTP draft)
- sglang d309df65df: unfinished prefill chunks end on a QSA page under exact
chunk fill (on by default for gfx95); tests ported to this image's Req API
- aiter badcd62a: faster FlyDSL GDN decode/verify (SGLANG_AITER_GDN_DECODE)
Verified locally on the upstream image: all 15 patches apply, unit tests from
the source commits pass (77), FlyDSL GDN decode matches Triton for decode and
MTP verify, GSM8K 0.9742 (GDN decode off) / 0.9689 (on) with PLE offload, and
two-turn long-prompt retrieval up to ~90k tokens is 20/20.
Co-authored-by: Cursor <cursoragent@cursor.com>
…nFP8 checkpoint, ROCm 10 image patches and PLE offload Co-authored-by: Cursor <cursoragent@cursor.com>
…ant env - sglang-unquantized-mtp-draft.patch only disabled Quark for a fully floating-point MTP branch; the AttnFP8 checkpoint's MTP experts are MXFP4 with scales, so it never fired. The next SGLang patch is re-exported for the shifted qwen3_5_mtp.py offsets; its content is unchanged. - SGLANG_MAMBA_SSM_DTYPE is set from --mamba-ssm-dtype at startup. - SGLANG_USE_AITER_FP8_PER_TOKEN is read only by Fp8LinearMethod; the checkpoint's per-channel FP8 attention is served by QuarkLinearMethod. Local GSM8K on the CI recipe with PLE offload, 3 runs each: 0.9709 before, 0.9697 after (same-setup spread 0.9659-0.9742); MTP accept length unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
…ode recipe The patches move to qwen3.8next/sglang/mi355x-fp4-mtp/patches/ next to agentic.yaml. srtctl looks up setup_script only in configs/, so the entry script stays there and reads the patches through the /infmax-workspace mount. Co-authored-by: Cursor <cursoragent@cursor.com>
… and fused GDN prefill GSM8K stays within same-setup noise with all three on (0.9735, 0.9659 vs 0.9697), accept length 3.49, and long-context two-turn retrieval 20/20. Co-authored-by: Cursor <cursoragent@cursor.com>
…provement Add the fused FlyDSL QSA sparse decode, the fused GDN decode proj+conv on HIP with off-by-default GDN prefill opt-ins, QSA paged decode on AITER mainline's planned pa_decode, and FlyDSL hc_mix up to 128 rows (sglang 0c3cedfc32, 1275650163, 67750e35dc; aiter 47d91306, a4909abc). The mainline pa_decode keeps this image's FlyDSL 0.3.4.1 buffer_ops and kernels_common. Co-authored-by: Cursor <cursoragent@cursor.com>
…uned GEMM tables sglang 6c6300f49f as an off-by-default patch (shared attention input quant, fused GDN norm + out_proj quant, shared-expert gate in the router, lm_head through tgemm) and aiter 38e2650b's Qwen3.8 gfx950 tuned GEMM tables, which AITER loads by default. aiter ee5f7a82 (fused MoE sort + quant) changes C++ sources and is left out: the setup script does not rebuild AITER. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…spec-verify Turn on SGLANG_OPT_QWEN4_SHARED_ATTN_QUANT, _QWEN4_FUSED_GDN_NORM_QUANT, _QWEN_MOE_FUSED_SHARED_TOPK and _AITER_LM_HEAD_GEMM, AITER_GDR_FLYDSL, --enable-linear-replayssm-spec and --tokenizer-worker-num 6. The fused GDN norm quant needs the sigmoid gate from aiter #5392, added as a patch whose JIT module is rebuilt in the container. Co-authored-by: Cursor <cursoragent@cursor.com>
…branches Move to lmsysorg/sglang-rocm:v0.5.22-rocm10-mi35x-20261018, whose AITER (2bb54910) already carries the FlyDSL QSA pa_decode and sigmoid-gated norm quant patches, so those two are dropped. Add Christian's fused decode MoE route-sort + MXFP4 quant (aiter #6165, #6467, ee5f7a82) with the mainline fused_moe.py it depends on (aiter #6225, #5804, #6050), and Nikolai's MTP draft quantization resolution from checkpoint headers. Co-authored-by: Cursor <cursoragent@cursor.com>
Add the Qwen4-Exp FlyDSL monokernel from amd-nprotaso/sglang qwen_3_8_improvement (7aca04ba83, 657dcf9ee5) as an SGLang patch and turn it on for target verify and the MTP draft. Its verify path writes the per-draft intermediate SSM states, which ReplaySSM spec-verify does not allocate, so --enable-linear-replayssm-spec is dropped. Co-authored-by: Cursor <cursoragent@cursor.com>
…-static 0.9 Co-authored-by: Cursor <cursoragent@cursor.com>
… at c8+ Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… at c16 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ction-static 0.85 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @ChangLiu0709's task in 1m 2s —— View job Review of PR #4832
1 blocking issue. In The rest of the diff looks correct:
|
| scheduler-recv-interval: 10 | ||
| stream-interval: 50 | ||
| reasoning-parser: qwen3 | ||
| default-chat-template-kwargs: '{"enable_thinking": false}' |
There was a problem hiding this comment.
🔴 BLOCKING: This line adds back --default-chat-template-kwargs '{"enable_thinking": false}', and because it sits in base, it applies at every concurrency. #4542 removed this flag on purpose (perf-changelog.yaml:11886): "Every point now serves the model's default thinking-on chat template … so the served mode matches the thinking_on golden AL (2.32 at 3 draft tokens) and the other qwen3.8next recipes."
Why it matters: The AgentX replay would run with thinking off on this recipe only. That changes output lengths and MTP acceptance, so these results can't be compared with #4779, earlier runs of this config key, or the other qwen3.8next recipes. The golden AL file qwen3.8-flash-next-fp8__mtp__native__default-default.yaml has only a thinking_on entry. Neither the PR description nor the new changelog entry mentions this change, so it looks unintended. It may have been carried over from the AMD submission recipes.
Fix: Remove the line. If thinking-off is intended, say so in the changelog entry and explain why this recipe should differ from the others.
| default-chat-template-kwargs: '{"enable_thinking": false}' |
| scheduler-recv-interval: 10 | ||
| stream-interval: 50 | ||
| reasoning-parser: qwen3 | ||
| default-chat-template-kwargs: '{"enable_thinking": false}' |
There was a problem hiding this comment.
🔴 Every point of this AgentX recipe, and its GSM8K evals, now runs Qwen3.8 with reasoning turned off. Neither the PR description nor the changelog entry says so. The new server default at line 51 applies to every request because the recipe sets no AIPERF_EXTRA_INPUTS chat_template_kwargs. Other agentic recipes enable thinking explicitly. Fix: drop this default, or state in the perf-changelog entry that thinking is off. Shorter outputs change throughput, so results would not be comparable with the base run or with other thinking-on recipes.
Why this was flagged
agentic.yaml:51 adds default-chat-template-kwargs: '{"enable_thinking": false}' under base roles.agg.args, so all six points (c1, c2, c12, c24, c48, c80) inherit it. The benchmark env in the recipe (lines 78-80) sets only AIPERF_REQUIRED_SERVER_METRIC_PREFIX and AIPERF_APPLY_CHAT_TEMPLATE, with no per-request chat_template_kwargs. The server default therefore decides thinking mode for both the AgentX replay and the eval. On the base branch the recipe had no such default, so the Qwen template used thinking-on, its default. Other agentic recipes pass {"chat_template_kwargs":{"enable_thinking":true}} explicitly (glm5.2/sglang/b200-fp8-mtp/agentic.yaml:52, qwen3.5/sglang/gb200-fp4/agentx/agg-variants.yaml:84). The new perf-changelog.yaml block for PR #4832 never mentions that thinking is off. Ingested results would show the shorter non-reasoning output profile with no record of why.
Verification: Trigger: every run of qwen3.8next-fp4-mi355x-sglang-agentic-mtp after this merge. All six points and their GSM8K evals change from thinking-on to thinking-off, and neither the changelog nor the PR description says so. agentic.yaml:51 adds default-chat-template-kwargs: '{"enable_thinking": false}'. perf-changelog.yaml:11886 (PR #4542) removed this exact flag on purpose for this same config key.
| apply /sgl-workspace/aiter 01-aiter-5992-flydsl-causal-conv1d-prefill.patch | ||
| apply /sgl-workspace/aiter 02-aiter-6670-flydsl-qsa-sparse-decode.patch | ||
| apply /sgl-workspace/aiter 03-aiter-6496-flydsl-gdn-fused-prefill.patch | ||
| apply /sgl-workspace/sglang 04-sglang-48648-qwen4-fused-hc-decode.patch | ||
| apply /sgl-workspace/sglang 05-sglang-45196-qsa-flydsl-sparse-decode.patch | ||
| apply /sgl-workspace/sglang 06-sglang-48649-qsa-decode-mqa-launch.patch | ||
| apply /sgl-workspace/sglang 07-sglang-45529-qwen35-fuse-selfattn-prepare.patch | ||
| apply /sgl-workspace/sglang 08-sglang-41683-gdn-prefill-strided-views.patch | ||
| apply /sgl-workspace/sglang 09-sglang-41879-aiter-gdn-conv-prefill.patch | ||
| apply /sgl-workspace/sglang 10-sglang-44103-aiter-gdn-chunked-prefill.patch |
There was a problem hiding this comment.
🔴 CODEOWNER sign-off Check 10 will FAIL for this PR. It patches the pinned image's AITER and SGLang at runtime but adds no engine-patch waiver. The setup script runs git apply on 10 .patch files, which is exactly the kind of engine patching the rule bans without a waiver. No inferencex-e2e/docs/waiver/4832.md is in the diff. Fix: either add that waiver (what is patched, why the stock image cannot run this benchmark, the upstream PR links and a removal plan) and link it from the sign-off, or drop the patches and the setup_script.
Why this was flagged
agentic.yaml:22 wires setup_script: qwen3.8next-rocm10-patches.sh for every point of qwen3.8next-fp4-mi355x-sglang-agentic-mtp. Lines 47-56 of that script run git apply with 3 AITER and 7 SGLang patches against /sgl-workspace/aiter and /sgl-workspace/sglang before the server starts. .github/codeowner-signoff-verify-prompt.md:482-525 (Check 10) lists .patch files, git apply and setup_script wiring as patching that reaches the serving stack. Such patching FAILs unless a waiver exists at inferencex-e2e/docs/waiver/<PR_NUMBER>.md, is filed in this PR, and is linked from the sign-off. PR_REVIEW_CHECKLIST.md:71 repeats the same rule. The only waiver in docs/waiver/ is 2508.md, and this diff adds none. On the base branch this config ran the image unpatched: base agentic.yaml:3 said "The upstream image is used unpatched".
Verification: The base recipe sets setup_script: qwen3.8next-rocm10-patches.sh (agentic.yaml, about line 22), so c1/c2 and c12 through c80 all reach it. .github/codeowner-signoff-verify-prompt.md:482-525 (Check 10) says "The pinned upstream image must run AS SHIPPED". The diff touches 14 files and adds no waiver. inferencex-e2e/docs/waiver holds only 2508.md.
| # packing (sglang#44302), the 128-row hc_mix (sglang#41880) and ROCm/aiter#6225, #5804, | ||
| # #6050, #6165, #6467, so none of them is patched. All Python. A patch that no longer | ||
| # applies fails the worker. | ||
| set -euo pipefail |
There was a problem hiding this comment.
🟡 (optional) The new setup script turns on nounset, which the repo's mandatory Bash rules ban. Every other setup script in this directory uses set -eo pipefail. AGENTS.md:48 bans set -u, set -o nounset and set -euo pipefail in active scripts. Fix: change line 24 to set -eo pipefail. Nothing in the script relies on unset-variable errors, since patches, marker and digest are all assigned before use.
Why this was flagged
AGENTS.md:48 says: "No nounset: no set -u, set -o nounset, set -euo pipefail, or bash -u. Keep other options such as set -eo pipefail." The new script qwen3.8next-rocm10-patches.sh:24 uses set -euo pipefail. The sibling setup scripts in the same directory (glm5.3-tilert-rocm.sh:2 and the others) use set -eo pipefail. The base branch has no such script, so this PR adds the violation. Nounset is banned because it breaks unset-safe probes and check_env_vars handling. Dropping -u here changes nothing else, because every variable the script reads is assigned locally.
Verification: nit. Line 24 of inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/qwen3.8next-rocm10-patches.sh is set -euo pipefail. AGENTS.md:48 bans set -euo pipefail in active scripts. The base has no such file, so the violation is new. Every variable in the script is assigned before it is used, so -u never fires.
| # Qwen3.8-Flash-Next kernels on lmsysorg/sglang-rocm:v0.5.23-rocm10-mi35x-20261102, | ||
| # applied to its editable AITER (285579b6) and SGLang (1ced9a9eb0) checkouts. Each | ||
| # patch is the source-only diff of an open upstream PR (tests, benchmarks and AITER's | ||
| # AOT registry dropped; the header of each file names the PR and its head commit). | ||
| # AITER | ||
| # - 01 ROCm/aiter#5992 FlyDSL causal conv1d prefill, GDN decode/verify kernels | ||
| # - 02 ROCm/aiter#6670 FlyDSL fused QSA sparse decode (needed by sglang#45196) | ||
| # - 03 ROCm/aiter#6496 FlyDSL single-kernel GDN fused chunked prefill | ||
| # SGLang | ||
| # - 04 sglang#48648 fused decode-sized hyper-connection norm + inject, SGLANG_OPT_QWEN4_FUSED_HC | ||
| # - 05 sglang#45196 QSA sparse decode on the AITER FlyDSL kernel (on with SGLANG_USE_AITER) | ||
| # - 06 sglang#48649 faster QSA decode MQA logits (padded Q, group-strided launch) | ||
| # - 07 sglang#45529 fused QK norm + RoPE + gate for Qwen3.5 self-attention on gfx950 | ||
| # - 08 sglang#41683 strided GDN prefill projection views on HIP | ||
| # - 09 sglang#41879 GDN prefill conv on AITER FlyDSL, SGLANG_AITER_GDN_CONV | ||
| # - 10 sglang#44103 GDN chunked prefill on AITER, SGLANG_AITER_GDN_PREFILL[_H] | ||
| # AITER 01 is needed by 09, 02 by 05 and 03 by 10 with SGLANG_AITER_GDN_PREFILL_H=fused, | ||
| # so the AITER patches go first. The image already has the monokernel | ||
| # (--enable-amd-monokernel), the AITER topk_gating router (sglang#40708), ratio-3 GDN | ||
| # packing (sglang#44302), the 128-row hc_mix (sglang#41880) and ROCm/aiter#6225, #5804, | ||
| # #6050, #6165, #6467, so none of them is patched. All Python. A patch that no longer | ||
| # applies fails the worker. |
There was a problem hiding this comment.
🟡 nit (optional): the new script, recipe and master-config comments include header and provenance text that AGENTS.md:56-57 bans; sweep:patched into the upstream ROCm 10 image|^# Qwen3.8-Flash-Next kernels on|# Concurrency 1 and 2 serve from GPU KV Examples: qwen3.8next-rocm10-patches.sh:2-23 is a 22-line file header listing PRs and what the image already ships. agentic.yaml:18-21 says where the kernels came from. Fix: remove them and keep only short line-level technical comments, such as the marker rationale at lines 29-30.
Why this was flagged
AGENTS.md:56 says "No header comments describing a file, topology, config, recipe, override, or section." AGENTS.md:57 says "No history: how code evolved, what it replaced, where it came from, or past results. Git and perf-changelog.yaml are the record." The script header at qwen3.8next-rocm10-patches.sh:2-23 describes the file, lists upstream PR provenance, and names what the image already contains. The recipe at agentic.yaml:18-21 gives PR provenance for setup_script. The new section comment at agentic.yaml:124-132 describes the c12-c80 overrides. The amd-master.yaml comment added before the qwen3.8next key describes the config's concurrency layout. All of these lines are new in this diff. The perf-changelog entry already records the same provenance.
Verification: This applies whenever the change merges as written. CLAUDE.md delegates all guidance to AGENTS.md. AGENTS.md:56 says "No header comments describing a file, topology, config, recipe, override, or section." AGENTS.md:57 says "No history: how code evolved, what it replaced, where it came from, or past results." qwen3.8next-rocm10-patches.sh:2-23 is a 22-line file header. Nothing breaks at runtime.
|
View unofficial run (performance): https://inferencex.semianalysis.com/inference?unofficialRun=42719632820 View unofficial run (accuracy): https://inferencex.semianalysis.com/evaluation?unofficialRun=42719632820 |
…refill breakable at c12-c80 The AMD reference recipes moved to a 262144-token Mamba checkpoint interval and breakable prefill CUDA graphs (their patch 22 makes breakable the ROCm default; this image lacks it, so the flag is passed explicitly). The changelog entry says so.
…refactor # Conflicts: # inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/qwen3.8next/sglang/mi355x-fp4-mtp/agentic.yaml # inferencex-e2e/configs/amd-master.yaml # inferencex-e2e/perf-changelog.yaml
… c80 c12 and c24 move to the kv-offloading none search-space entry (conc-list 1, 2, 12, 24) and lose enable-hierarchical-cache, hicache-size, hicache-io-backend, hicache-mem-layout and hicache-write-policy; c48 and c80 keep them (hicache-size 298). FP8 KV, the 262144 track interval, breakable prefill graphs and fused HC stay at c12-c80.
…refactor # Conflicts: # inferencex-e2e/perf-changelog.yaml
…, drop the three AITER patches The setup script pip-installs the sha256-pinned v0.1.29 ROCm 7.14 / cp312 wheel (no deps) and flydsl 0.4.2 over the image's editable AITER, checks that python imports the wheel, then applies the seven SGLang patches (renumbered 01-07). v0.1.29 contains aiter#5992, #6670, #6496 and the hc_mix kernels. The ROCm 10.0 and 10.1 wheels fail on any tensor call with the image's torch (built for HIP 7.15); the 7.14 build works.
…upport) as patch 08 Co-authored-by: Cursor <cursoragent@cursor.com>
…refactor # Conflicts: # inferencex-e2e/perf-changelog.yaml
…81579ab), drop the AITER wheel install, rebase the 7 SGLang patches (sglang#41683 is merged) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Nikolai <289648307+amd-nprotaso@users.noreply.github.com> Co-authored-by: Christian Gilli <272772515+amd-cgilli@users.noreply.github.com> Co-authored-by: Amanzhol Salykov <asalykov@amd.com> Co-authored-by: wufann <36477220+wufann@users.noreply.github.com> Co-authored-by: Thomas Wang <1am9trash@gmail.com> Co-authored-by: Chun-Hung Yeh <Chun-Hung.Yeh@amd.com> Co-authored-by: jacky.cheng <yichiche@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Qwen3.8-Flash-Next Quark MXFP4 (FP8 attention, FP8 PLE) AgentX recipe on MI355X, SGLang native NEXTN MTP, TP1/EP1, on the upstream ROCm 10 image
lmsysorg/sglang-rocm:v0.5.23-rocm10-mi35x-20261117@sha256:09b8237296024285e6286ffb54d75c3af6d59342bbbb3558dea56bed86798814(SGLangc67db7c762, AITER581579ab0.1.29.dev156, FlyDSL 0.4.2). A recipesetup_scriptapplies 7 SGLang patches for kernels that are still open upstream and leaves the image's AITER untouched. The recipe runs concurrency 1, 2, 12, 24, 48 and 80. This is the patched counterpart of the unpatched baseline in #4779.qwen3.8next-fp4-mi355x-sglang-agentic-mtp:kv-offloading: nonewithconc-list: [1, 2, 12, 24], andkv-offloading: dram(backendhicache) withconc-list: [48, 80], oneagentic.yamlrecipe. The matrix generator yields exactly these six points. c4, c8 and c16 are dropped.581579ab, 0.1.29.dev156, FlyDSL 0.4.2) already contains ROCm/aiter#5992 (FlyDSL causal conv1d prefill, GDN decode/verify), #6670 (fused QSA sparse decode, needed by sglang#45196), #6496 (single-kernel GDN fused chunked prefill) and #5993 (hc_mix); all four merge commits are ancestors of the image's AITER commit. Earlier revisions of this PR patched them into the 20261102 image's AITER and then installed the AITER v0.1.29 release wheel over it; both are gone. The setup script only checks that the four FlyDSL modules import.benchmarks/single_node/srt-slurm-recipes/qwen3.8next/sglang/mi355x-fp4-mtp/patches/), each the source-only diff of an open PR, rebased onto the image's SGLang (tests, benchmarks and docs dropped; the header of each file names the PR and its head commit). The setup script applies them in order withgit apply, is idempotent through a marker, and fails the worker if one stops applying.SGLANG_OPT_QWEN4_FUSED_HC)SGLANG_AITER_GDN_CONV)SGLANG_AITER_GDN_PREFILL,_H=fused)current_arch().supports_pdlinstead of its own PDL probe; in patch 05 the GDN prefill conv goes to Triton when the state slots are strided or a block table is used, and to the AITER conv otherwise; patch 06 sits on upstream's newextend()signature (out,output_indices,use_qk_l2norm_in_kernel) and skips the AITER prefill whenoutis given or the l2 norm is off; patch 07 is a backport (the image lacks sglang#41916, so its top-p rescale helper is copied intoeagle_utils.py) merged with upstream's new top-p-then-top-k helper. The sparse path turns on by default whenSGLANG_USE_AITERis set and the MTP verify uses rejection sampling (NEXTN with eagle-topk 1); every AgentX request carriestop_k20 from the model'sgeneration_config.json, and requests without a top-k of 2 to 128 keep the dense path.SGLANG_USE_AITER,SGLANG_AITER_GDN_CONV,SGLANG_AITER_GDN_PREFILLandSGLANG_AITER_GDN_PREFILL_H=fusedat every point (the sglang#44103 default is the triton stages;fusedselects the single kernel of aiter#6496).SGLANG_OPT_QWEN4_FUSED_HC,SGLANG_USE_AITER_UNIFIED_ATTNandSGLANG_AITER_HONOR_EXPLICIT_MEM_FRACTIONat c12/c24/c48/c80. The FlyDSL QSA decode has no flag: it is on wheneverSGLANG_USE_AITERis set on gfx950.mem-fraction-static0.88 as given, anextra_buffer_lazyMamba pool (mamba-track-interval262144,max-mamba-cache-size960 / 960 / 720 / 640), and, at c48 and c80 only, HiCache (kernelIO,page_first,write_back,hicache-size298); c12 and c24 serve from GPU KV without HiCache. Admission is 24 at c12, 48 at c24 and 128 at c48 and c80. c12-c80 also pass--cuda-graph-backend-prefill breakable, and c80 setsstrip-thinking-cacheandmamba-max-states-per-path 2.inferencex-e2e/perf-changelog.yaml.Validation
srt-slurm: all checks passed at c1 and c24. Each run used the image's AITER as is (amd-aiter 0.1.29.dev156+g581579ab5,flydsl 0.4.2, from/sgl-workspace/aiter), applied 7/7 patches, logged "Using AITER fused FlyDSL GDN chunked prefill", had no engine traceback and no FlyDSL fallback, and had the recipe env in the server. c1 also ran the monokernel (13 launches per verify step, MTP draft decode and extend, no fallback to the normal forward); c24 had no HiCache flags, FP8 KV, track interval 262144 and breakable prefill graphs on the command.Moving to the 20261117 image and dropping the wheel leaves c1 where it was (p50 interactivity identical, throughput -2.5%, within run-to-run noise). c24 measured +35.5% p90 interactivity and +7.5% throughput over the export reference (73.2 and 117.4k). The c12 and c48 rows are from the previous revision (20261102 image, wheel, 8 patches) and were not rerun on the new image. For comparison, the unpatched baseline in #4779 measured 53,785 tok/s/GPU and p90 90.8 at c12 (GPU KV, no HiCache) and 107,298 and 50.4 at c24. An earlier c1 run with admission 2 (2x CONC) measured 13,467 tok/s/GPU and p90 175.2 (on a slow node), so c1 and c2 keep admission = CONC. These are single local runs, not CI numbers. Not yet run on the new image: c2, c12, c48, c80, GSM8K, and the e2e Test workflow.
AI model disclosure
PR checklist and change type
Type of Change
Checklist
inferencex-e2e/perf-changelog.yamland have not edited historical entriesfull-sweep-fail-fast(recommended),full-sweep-enabled, ornon-canary-full-sweep-enabled. Optional modifiersall-evals,evals-only, andagentx-fastrequire a primary label; the last two block reuse while applied.OWNER/MEMBER/COLLABORATOR) has commented/use <run_id>(or the legacy/reuse-sweep-run) on this PR. Do this only once there is a final full sweep that is all green with evals passing, since after this comment the primary sweep label will no longer automatically kick off new sweeps. Remove and re-add the primary sweep label to force a new sweep.中文
摘要
Qwen3.8-Flash-Next Quark MXFP4(FP8 attention、FP8 PLE)AgentX 在 MI355X 上的 recipe,SGLang 原生 NEXTN MTP,TP1/EP1,使用上游 ROCm 10 镜像
lmsysorg/sglang-rocm:v0.5.23-rocm10-mi35x-20261117@sha256:09b82372…(SGLangc67db7c762,AITER581579ab0.1.29.dev156,FlyDSL 0.4.2)。recipe 的setup_script为仍在上游审核中的内核应用 7 个 SGLang 补丁,不再改动镜像自带的 AITER;覆盖并发 1、2、12、24、48、80。本 PR 是 #4779(无补丁基线)的带补丁版本。qwen3.8next-fp4-mi355x-sglang-agentic-mtp:kv-offloading: none(conc-list: [1, 2, 12, 24])与kv-offloading: dram(后端hicache,conc-list: [48, 80]),共用一个agentic.yaml,矩阵生成器恰好产生这六个点。git apply按序应用,通过标记文件保证幂等,补丁失效则 worker 失败。current_arch().supports_pdl;05 在状态槽为 strided 或使用 block table 时 GDN prefill conv 走 Triton,否则走 AITER conv;06 基于上游新的extend()签名,传入out或关闭 l2 norm 时跳过 AITER prefill;07 为 backport(镜像无 sglang#41916,故复制其 top-p 重缩放函数),并与上游新的 top-p 后 top-k 函数合并。mem-fraction-static0.88、extra_buffer_lazyMamba 池(mamba-track-interval262144)、breakable prefill CUDA graph;仅 c48、c80 启用 HiCache(hicache-size298)。inferencex-e2e/perf-changelog.yaml末尾追加一条记录。验证
AI 模型使用说明