Skip to content

[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

Draft
ChangLiu0709 wants to merge 63 commits into
mainfrom
chang/qwen3.8-flash-fp4-mi355x-sglang-agentic-refactor

Conversation

@ChangLiu0709

@ChangLiu0709 ChangLiu0709 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

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 (SGLang c67db7c762, AITER 581579ab 0.1.29.dev156, FlyDSL 0.4.2). A recipe setup_script applies 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.

  • Config key qwen3.8next-fp4-mi355x-sglang-agentic-mtp: kv-offloading: none with conc-list: [1, 2, 12, 24], and kv-offloading: dram (backend hicache) with conc-list: [48, 80], one agentic.yaml recipe. The matrix generator yields exactly these six points. c4, c8 and c16 are dropped.
  • AITER is the image's own: no wheel, no AITER patch. The 20261117 image's AITER (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.
  • SGLang patches (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 with git apply, is idempotent through a marker, and fails the worker if one stops applying.
# PR What
01 sgl-project/sglang#48648 fused decode-sized hyper-connection norm + inject (SGLANG_OPT_QWEN4_FUSED_HC)
02 #45196 QSA sparse decode on the AITER FlyDSL kernel
03 #48649 faster QSA decode MQA logits (padded Q, group-strided launch)
04 #45529 fused QK norm + RoPE + gate on gfx950
05 #41879 GDN prefill conv on AITER FlyDSL (SGLANG_AITER_GDN_CONV)
06 #44103 GDN chunked prefill on AITER (SGLANG_AITER_GDN_PREFILL, _H=fused)
07 #48090 MTP verify target probabilities on each row's top-k support instead of a vocabulary-wide sort
  • Already in the image, so not patched: sglang#41683 (strided GDN prefill projection views, merged 2026-11-17, was patch 05 of the previous revision), the monokernel, the AITER topk gating router (#40708), ratio-3 GDN packing (#44302) and the 128-row hc_mix (#41880).
  • Rebase notes (the image's SGLang is 1,177 commits newer than 20261102's): patch 04 keeps upstream's current_arch().supports_pdl instead 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 new extend() signature (out, output_indices, use_qk_l2norm_in_kernel) and skips the AITER prefill when out is 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 into eagle_utils.py) merged with upstream's new top-p-then-top-k helper. The sparse path turns on by default when SGLANG_USE_AITER is set and the MTP verify uses rejection sampling (NEXTN with eagle-topk 1); every AgentX request carries top_k 20 from the model's generation_config.json, and requests without a top-k of 2 to 128 keep the dense path.
  • Env: SGLANG_USE_AITER, SGLANG_AITER_GDN_CONV, SGLANG_AITER_GDN_PREFILL and SGLANG_AITER_GDN_PREFILL_H=fused at every point (the sglang#44103 default is the triton stages; fused selects the single kernel of aiter#6496). SGLANG_OPT_QWEN4_FUSED_HC, SGLANG_USE_AITER_UNIFIED_ATTN and SGLANG_AITER_HONOR_EXPLICIT_MEM_FRACTION at c12/c24/c48/c80. The FlyDSL QSA decode has no flag: it is on whenever SGLANG_USE_AITER is set on gfx950.
  • c1 and c2 run the FlyDSL monokernel the image ships (ReplaySSM and PLE offload off, admission = CONC). c12, c24, c48 and c80 keep ReplaySSM and the PLE offload, store the target and draft KV in FP8 E4M3, use mem-fraction-static 0.88 as given, an extra_buffer_lazy Mamba pool (mamba-track-interval 262144, max-mamba-cache-size 960 / 960 / 720 / 640), and, at c48 and c80 only, HiCache (kernel IO, page_first, write_back, hicache-size 298); 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 sets strip-thinking-cache and mamba-max-states-per-path 2.
  • Server settings for c12, c24, c48 and c80 follow the AMD Qwen3.8 submission recipes for these concurrencies, without their extra patches (HC prefill fusion, AITER GEMM tunes, packed FP8 GDN in_proj, lm_head GEMM, shared attention FP8 quant), which the AMD ranking puts within noise.
  • Appended one entry at the end of inferencex-e2e/perf-changelog.yaml.

Validation

  • Static gate (no GPU): the setup script's apply list equals the patch files, all 7 apply in order on a pristine checkout of the image's SGLang commit, every changed Python file compiles and has no undefined names, every AITER module and entry point the SGLang patches use exists in the image's AITER, the four AITER PRs are in it, and the recipe no longer installs an AITER wheel. The patches also apply in the image itself and the patched modules import there.
  • Local smoke tests on the 20261117 image, one MI355X each, both on one node, 3600 s AgentX replay through 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.
Conc Image / AITER Patches Total tok/s/GPU Interactivity p50 / p90 (tok/s/user) Error-dropped requests
1 20261117, image AITER 7 16,355 397.9 / 389.1 0 of 654
1 20261102 + v0.1.29 wheel 7 16,768 397.9 / 388.6 0 of 666
24 20261117, image AITER 7 126,244 143.8 / 99.2 4 of 4,471
12 20261102 + v0.1.29 wheel 8 65,923 190.3 / 145.9 0 of 2,507
48 20261102 + v0.1.29 wheel 8 181,183 87.2 / 54.9 0 of 7,515

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.

  • Before this PR is ready: e2e Test run on this branch, a primary sweep label, GSM8K at the points that get an eval, and the error-dropped requests seen on #4779 still uninvestigated.
AI model disclosure
  • Model/version: Claude Sonnet 5.5 (Cursor agent)
  • Role: converted the upstream PRs into patch files, wrote the setup script, recipe and config edits, the static gate and the smoke-test harness, and wrote this description, under the author's direction.
PR checklist and change type

Type of Change

  • Bug fix
  • New feature
  • Configuration change
  • Documentation update
  • Other (please describe)

Checklist

  • I have completed the AI model disclosure and kept it current
  • I have tested my changes locally
  • I have updated documentation if necessary
  • For every change that can affect benchmark performance and every recipe addition or modification, I have appended a new entry to the physical end of inferencex-e2e/perf-changelog.yaml and have not edited historical entries
  • If this PR can affect benchmark performance or adds or modifies a recipe, it carries exactly one primary sweep label (a maintainer applies it on fork PRs): full-sweep-fail-fast (recommended), full-sweep-enabled, or non-canary-full-sweep-enabled. Optional modifiers all-evals, evals-only, and agentx-fast require a primary label; the last two block reuse while applied.
  • Before merging via reuse, an authorized maintainer (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…(SGLang c67db7c762,AITER 581579ab 0.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,矩阵生成器恰好产生这六个点。
  • AITER 使用镜像自带版本,不再安装 wheel,也没有 AITER 补丁:镜像的 AITER 已包含 [FlyDSL] [gfx950] Causal conv1d prefill and GDN decode/verify kernels for Qwen3.5/Qwen3.8 ROCm/aiter#5992、#6670、#6496 与 #5993,这四个 PR 的合并提交都是镜像 AITER 提交的祖先。此前版本曾在 20261102 镜像上给 AITER 打补丁、再安装 v0.1.29 release wheel,二者均已移除。setup 脚本只检查四个 FlyDSL 模块可导入。
  • SGLang 补丁:每个补丁是一个开放上游 PR 的仅源码 diff,已变基到镜像的 SGLang 上。PR:sglang#48648、#45196、#48649、#45529、#41879、#44103、#48090(编号 01–07)。sglang#41683 已于 2026-11-17 合并进镜像,其补丁已删除。setup 脚本以 git apply 按序应用,通过标记文件保证幂等,补丁失效则 worker 失败。
  • 变基说明:04 使用上游的 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 函数合并。
  • c1、c2 使用镜像自带的 FlyDSL monokernel(admission = CONC);c12、c24、c48、c80 使用 FP8 E4M3 KV cache、mem-fraction-static 0.88、extra_buffer_lazy Mamba 池(mamba-track-interval 262144)、breakable prefill CUDA graph;仅 c48、c80 启用 HiCache(hicache-size 298)。
  • 已在 inferencex-e2e/perf-changelog.yaml 末尾追加一条记录。

验证

  • 静态检查(无需 GPU):补丁列表与文件一致,7 个补丁在镜像对应的 SGLang 提交上按序应用,改动的 Python 文件可编译且无未定义名称,补丁用到的 AITER 模块与入口在镜像 AITER 中均存在,四个 AITER PR 均在其中,recipe 不再安装 AITER wheel;补丁在镜像内同样可应用,打补丁后的模块可导入。
  • 在 20261117 镜像上的本地 smoke test(同一节点上每个点一张 MI355X,3600 秒 AgentX replay):c1 与 c24 的所有检查均通过。结果见上方英文表格:c1 与此前持平(p50 interactivity 相同,吞吐 -2.5%,在运行间噪声范围内);c24 相对导出参考值 p90 interactivity +35.5%、吞吐 +7.5%。c12 与 c48 的数据来自上一版本(20261102 镜像 + wheel + 8 个补丁),未在新镜像上重跑。以上均为单次本地运行,不是 CI 数据。新镜像上尚未运行:c2、c12、c48、c80、GSM8K 与 e2e Test workflow。

AI 模型使用说明

  • 模型/版本:Claude Sonnet 5.5(Cursor agent)
  • 工作内容:在作者指导下,将上游 PR 转为补丁文件,编写 setup 脚本、recipe 与配置修改、静态检查和 smoke test 脚本,并撰写本描述。

ChangLiu0709 and others added 30 commits October 14, 2026 10:50
…(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

claude Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @ChangLiu0709's task in 1m 2s —— View job


Review of PR #4832

  • Check for earlier reviews (none)
  • Review setup script, recipe, master config and changelog
  • Spot-check the patches (patch 10 adaptation)
  • Post findings

1 blocking issue. In agentic.yaml:51, the recipe's base adds back default-chat-template-kwargs: '{"enable_thinking": false}', so every point would serve with thinking off. #4542 removed this flag on purpose so that this recipe matches the thinking_on golden AL and the other qwen3.8next recipes. Neither the PR description nor the changelog entry mentions it, and it would make these results incomparable with #4779 and earlier runs. Details and a suggested fix are in the inline comment.

The rest of the diff looks correct:

  • The changelog entry is appended at the end of the file.
  • The image is public and pinned by digest.
  • The setup script follows the existing /infmax-workspace/benchmarks path convention.
  • The marker and digest make the script idempotent.
  • Patch 10 forwards **kwargs into _extend() as described.

@ChangLiu0709 ChangLiu0709 added full-sweep-enabled Full sweep with canary gate; matrix jobs run to completion despite failures all-evals Expand eval selection to every fixed-sequence config labels Nov 5, 2026
scheduler-recv-interval: 10
stream-interval: 50
reasoning-parser: qwen3
default-chat-template-kwargs: '{"enable_thinking": false}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
default-chat-template-kwargs: '{"enable_thinking": false}'

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings marked 🟡 are optional suggestions and need no follow-up push.

scheduler-recv-interval: 10
stream-interval: 50
reasoning-parser: qwen3
default-chat-template-kwargs: '{"enable_thinking": false}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Comment on lines +47 to +56
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 (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.

Comment on lines +2 to +23
# 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@ChangLiu0709
ChangLiu0709 marked this pull request as draft November 5, 2026 16:37
ChangLiu0709 and others added 11 commits November 6, 2026 14:57
…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>
@ChangLiu0709 ChangLiu0709 changed the title [AMD][MI35X] Qwen3.8-Flash-Next FP4 SGLang agentic MTP: ROCm 10 image 20261102 + 10 upstream-PR patches, conc 1/2/12/24/48/80 / [AMD][MI35X] Qwen3.8-Flash-Next:ROCm 10 镜像 20261102 + 10 个上游 PR 补丁,并发 1/2/12/24/48/80 [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 Nov 17, 2026
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>
maeehart added a commit that referenced this pull request Nov 24, 2026
The tree of this commit is eppaneamd#2 (80f4669, Rony Leppanen's
updated package) rebased onto the current head of #4832 (3f7ca2d), with the
changelog entry linked to #5133. The previous content (ba2e5a9) stays in the
history as the first parent instead of being force-pushed away.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

all-evals Expand eval selection to every fixed-sequence config full-sweep-enabled Full sweep with canary gate; matrix jobs run to completion despite failures

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants