Repository navigation
[AMD][MI35X] Qwen3.8-Flash-Next FP4 SGLang AgentX MTP: opt-in QSA, MXFP4 MoE, HC prefill and GDN verify kernels on the update-monokernel recipe / [AMD][MI35X] Qwen3.8-Flash-Next FP4 SGLang AgentX MTP:在 update-monokernel 配方上启用 QSA、MXFP4 MoE、HC 预填充与 GDN verify 可选内核 - #1
Draft
eppaneamd wants to merge 5 commits into
Draft
eppaneamd wants to merge 5 commits into
eppaneamd wants to merge 5 commits into
Conversation
…at its shipped precision Patches 11-15 add opt-in kernels, each off unless the recipe sets its SGLANG_AMD_* variable; c12, c24, c48 and c80 set all four: - 11 grouped QSA verify scoring (sgl-project/sglang#48625, carries #46631) - 12-13 FlyDSL QSA sparse prefill (ROCm/aiter#7556 kernels, sgl-project/sglang#51179 wiring) - 14 MXFP4 MoE intermediate kept 128-aligned at TP 1 (sgl-project/sglang#49852) - 15 Triton HC prefill path (sgl-project/sglang#50863) Every monokernel point sets SGLANG_AMD_MONO_QWEN38_DRAFT_HEAD_FP8=0, and the recipe drops default-chat-template-kwargs so the server serves the chat template's default thinking mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…patches Drop the header and section comments added for patches 11-15 (AGENTS.md Comments); keep the line comments on the variables and move the draft-head reason to its first flag. The setup script uses set -eo pipefail (AGENTS.md Bash: no nounset). The changelog entry states that no patch lowers the dtype of a weight or an activation.
Patches 16, 21 and 24 add opt-in kernels, each off unless the recipe sets its SGLANG_AMD_* variable; c12, c24, c48 and c80 set all eight: - 16 QSA indexer prefill blocks selected by the exact topk_v2, one pipeline stage on gfx95 (sgl-project/sglang#50871, #51263) - 21 QSA decode, verify and draft-extend blocks selected by the exact topk_v2, draft-extend rows scored grouped as in verify (sgl-project/sglang#50871, #51242) - 24 GDN ReplaySSM verify and commit kernels (sgl-project/sglang#51180) Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Rony Leppänen <rony.leppanen@amd.com>
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Rony Leppänen <rony.leppanen@amd.com>
…nly merge main Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Rony Leppänen <rony.leppanen@amd.com>
5 of 11 tasks
4 of 11 tasks
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.
Summary
Adds eight opt-in kernel patches (11-16, 21 and 24) to the MI355X Qwen3.8-Flash-Next FP4 SGLang AgentX recipe,
qwen3.8next-fp4-mi355x-sglang-agentic-mtp. They come from open upstream PRs and add gfx950 kernels for QSA verify and sparse prefill attention, QSA block selection, the MXFP4 MoE, the hyper-connection prefill and GDN verify. Concurrency 12-80 turns them on.chang/qwen3.8-flash-fp4-mi355x-update-monokernelat3a24884e, the revision of e2e run 43505902743.inferencex-e2e/docs/waiver/<PR>.mdwaiver. None is filed, and the patches are in nolmsysorgimage. The branch is for an unofficial run.…-20261117), is not the base and has no e2e run on that image yet. The differences are listed below.Changes
qwen3.8next-rocm10-patches.sh). Numbers 17-20, 22 and 23 are not on this branch.SGLANG_AMD_MONO_QWEN38_DRAFT_HEAD_FP8=0, so the MTP draft'slm_headruns at its shipped precision instead of on patch 10's FP8 copy.default-chat-template-kwargs: '{"enable_thinking": false}'is removed, as in main's entry: the server applies the chat template's default, the thinking mode of the acceptance length the harness injects.Validation
Unofficial run 44408546542 of this head with main merged (
ba2e5a9e), against the base's run 43505902743:host_setup: "GPUs still draining prior job's memory after 60min").enable_thinking: false) and the AgentX harness 1.0.14 from main against 1.0.13.Validation details
T = total tokens/s per GPU, N = P90 E2E-normalized interactivity, I = 1 / P90 ITL.
…-20261031): 16,818 / 128.1 / 389.1.qwen3.8next patch applied:18 times. c12-c80 logamd qsa grouped verify: on,amd qsa flydsl prefill 1: warmedandAMD_ACTIVE s2_mxfp4_pad128; c1 and c2 log none of them.kv_cache_dtypeandspeculative_draft_kv_cache_dtypefp8_e4m3, as in the base recipe; c1 and c2autoand the draft default.Upstream pieces
All open on 2026-11-18.
SGLANG_AMD_QSA_GROUPED_VERIFYSGLANG_AMD_QSA_FLYDSL_PREFILLSGLANG_AMD_MXFP4_PAD128SGLANG_AMD_HC_PREFILLtopk_v2on unscaled scores; one-stage scoring on gfx95SGLANG_AMD_QSA_PREFILL_TOPK_V2topk_v2; draft-extend rows share block reads as in 11SGLANG_AMD_QSA_DECODE_TOPK_V2SGLANG_AMD_QSA_GROUPED_DRAFT_EXTENDSGLANG_AMD_GDN_VERIFYHow each patch differs from its upstream PR
e6a31510c9; its later commits only merge main.SGLANG_ROCM_QSA_FLYDSL_PREFILL.624fa95a85.SGLANG_USE_HIP_HC_PREFILL_TRITON.fast_topk, which can miss blocks in an overfull threshold bin; in batch-invariant mode the selection keepsfast_topk.0e30623971), reworked; neither PR has a switch. The grouped draft extend acts with patch 11's variable.cache_indices >= 0, which main drops through sgl-project/sglang#48414 (merged);lengths != 0, which [Perf] [AMD] gdn: ReplaySSM verify q/k prep kernel and layer-loop commit sgl-project/sglang#51180 drops.Draft-model precision
The MTP layer ships MXFP4 experts, FP8 E4M3 attention and indexer projections, and BF16 hyper-connections, router and norms, and uses the target's BF16
lm_head. The patches that also run on it keep those dtypes:Patches 11 and 24 run on target verify only.
Unchanged settings, and this base against SemiAnalysisAI#4832
Unchanged:
lmsysorg/sglang-rocm:v0.5.23-rocm10-mi35x-20261102@sha256:acf1fee05096c6eb757d4642e3b87c36766bce1334277e49b917afc2f06c7b5a.This base against SemiAnalysisAI/InferenceX#4832 at
2ac71ff7(2026-11-17; its heada6a72472, 2026-11-18, adds an empty commit):3a24884e)2ac71ff7…-20261102…-20261117(SGLangc67db7c762)581579ab, FlyDSL 0.4.2afbb25a)a04ceab)This base is SemiAnalysisAI#4832's earlier head
13f2b0e3plus one commit: patches 09 and 10, and c1 at TP2 and TP4.AI model disclosure
PR checklist and change type
Type of Change
Checklist
python -m infx.matrix.changed --base origin/mainlists affected config keys, I have appended one new entry covering them to the physical end ofinferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entriesinferencex-e2e/perf-changelog.yamlentry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs):full-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./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.中文
概要
本 PR 为 MI355X 上的 Qwen3.8-Flash-Next FP4 SGLang AgentX 配方(
qwen3.8next-fp4-mi355x-sglang-agentic-mtp)新增八个可选内核补丁(11-16、21 与 24)。它们来自尚未合并的上游 PR,为 gfx950 提供 QSA verify 与稀疏 prefill attention、QSA block 选择、MXFP4 MoE、hyper-connection prefill 以及 GDN verify 的内核;并发 12-80 启用它们。chang/qwen3.8-flash-fp4-mi355x-update-monokernel分支的3a24884e,即 e2e run 43505902743 所用的版本。inferencex-e2e/docs/waiver/<PR>.md豁免说明的补丁。本分支没有提交豁免说明,这些补丁也不在任何lmsysorg镜像中。本分支用于一次非官方运行。…-20261117)不是本分支的基线,在该镜像上目前也还没有 e2e run。差异见上方“Unchanged settings, and this base against [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 SemiAnalysisAI/InferenceX#4832”中的表格。改动
qwen3.8next-rocm10-patches.sh在补丁 10 之后按此顺序应用;编号 17-20、22 与 23 不在本分支中。SGLANG_AMD_MONO_QWEN38_DRAFT_HEAD_FP8=0,MTP draft 的lm_head以其发布时的精度运行,而不是使用补丁 10 的 FP8 副本。default-chat-template-kwargs: '{"enable_thinking": false}',与 main 上的条目一致:服务器采用 chat template 的默认设置,即 harness 注入的 acceptance length 所对应的 thinking 模式。验证
本 head 合入 main(
ba2e5a9e)后的非官方运行 44408546542 与基线运行 43505902743 对比:host_setup:"GPUs still draining prior job's memory after 60min")。enable_thinking: false),以及来自 main 的 AgentX harness 1.0.14(基线为 1.0.13)。逐点数据、日志与 KV 数据类型见上方“Validation details”。
上游组件
各补丁的改动、上游 PR(2026-11-18 均未合并)与变量见上方表格。与上游 PR 的差异:
e6a31510c9的文件;其后的提交只合入了 main。SGLANG_ROCM_QSA_FLYDSL_PREFILL。624fa95a85)。SGLANG_USE_HIP_HC_PREFILL_TRITON。fast_topk,后者在过满的阈值分桶中可能漏选 block;batch-invariant 模式下选择仍用fast_topk。0e30623971),已重做;两个 PR 都没有开关。grouped draft extend 需与补丁 11 的变量一起生效。cache_indices >= 0在 main 上已由 [Feat] kimi_k3: Merge the rest of the Kimi-K3.1 Day-0 branch sgl-project/sglang#48414(已合并)去掉;PLE n-gram commit 的lengths != 0由 [Perf] [AMD] gdn: ReplaySSM verify q/k prep kernel and layer-loop commit sgl-project/sglang#51180 去掉。Draft 精度
MTP 层发布时为 MXFP4 专家、FP8 E4M3 的 attention 与 indexer 投影、BF16 的 hyper-connection、router 与 norm,并使用目标模型的 BF16
lm_head。也作用于该层的补丁保持这些数据类型:补丁 11 与 24 只作用于目标模型的 verify。
AI 模型使用说明
改动类型:配置变更。
🤖 Generated with Claude Code