Skip to content

[AMD] Qwen3.5-FP8 MI355X SGLang disagg baseline: image bump to v0.5.16, TP4P+TP8D / Qwen3.5-FP8 MI355X SGLang disagg 基线优化:镜像升级至v0.5.16,TP4P+TP8D拓扑优化 - #2606

Open
ChangLiu0709 wants to merge 2 commits into
mainfrom
chang/qwen3.5-mi355-di-baseline
Open

[AMD] Qwen3.5-FP8 MI355X SGLang disagg baseline: image bump to v0.5.16, TP4P+TP8D / Qwen3.5-FP8 MI355X SGLang disagg 基线优化:镜像升级至v0.5.16,TP4P+TP8D拓扑优化#2606
ChangLiu0709 wants to merge 2 commits into
mainfrom
chang/qwen3.5-mi355-di-baseline

Conversation

@ChangLiu0709

@ChangLiu0709 ChangLiu0709 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Changes

Baseline (qwen3.5-fp8-mi355x-sglang-disagg)

  • Docker image bump: lmsysorg/sglang:v0.5.14-rocm720-mi35xlmsysorg/sglang:v0.5.16-rocm720-mi35x (ROCm 7.2, SGLang v0.5.14 → v0.5.16, 3-5% throughput improvement across all concurrency levels).
  • TP topology optimization: TP8P+TP8D (16 GPU) → TP4P+TP8D (12 GPU). TP4 prefill delivers identical decode interactivity with 24-31% better throughput/GPU by saving 4 GPUs. Prefill TP does not affect decode TPOT.

Infra

  • docker_sg.sh: new wrapper that re-activates the docker supplementary group via sg docker -c for Slurm job steps where group credentials are not inherited.
  • job.slurm: update DOCKER_CMD_DETECT to try sg docker fallback before sudo docker; add pre-pull on all nodes; add kill -9 fallback for stuck containers.
  • submit.sh: update node exclude list.

Local benchmark results (v0.5.16, ISL=8K/OSL=1K)

Baseline (TP4P+TP8D, 12 GPU):

Conc Interactivity Tput/GPU TPOT (ms) TTFT (ms)
8 111.0 603 9.01 564
16 106.0 1,132 9.43 715
32 93.9 1,945 10.65 1,063
64 75.0 3,095 13.33 1,493
128 57.9 4,581 17.28 2,791

Split from #2557 — baseline only, no MTP/speculative decoding changes. MTP config in #2607.

Authors

@ChangLiu0709
@xiaohuguo2023
@chunfangamd

中文说明

Qwen3.5-FP8 MI355X SGLang 分离式推理基线优化:

  • 升级 Docker 镜像至 v0.5.16(性能提升 3-5%)
  • 基线配置从 TP8P+TP8D (16 GPU) 优化为 TP4P+TP8D (12 GPU),吞吐量/GPU 提升 24-31%
  • 基础设施:添加 docker_sg.sh 包装脚本,解决 Slurm 作业中 docker 组权限问题;job.slurm 增加镜像预拉取和容器清理增强

#2557 拆分 — 仅包含基线配置变更,不包含 MTP 投机解码。MTP 配置见 #2607

Made with Cursor

…TP4P+TP8D

- Bump qwen3.5-fp8-mi355x-sglang-disagg image from v0.5.14 to v0.5.16
  (3-5% throughput improvement).
- Switch prefill from TP8 to TP4: saves 4 GPUs (12 vs 16 total) while
  delivering identical decode interactivity and 24-31% better
  throughput/GPU.
- Infra: add docker_sg.sh wrapper for nodes where Slurm doesn't activate
  the docker supplementary group; update job.slurm with pre-pull and
  kill -9 fallback for stuck containers; update submit.sh node excludes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

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

Beyond the two inline findings, a few other candidate issues were checked and ruled out: docker_sg.sh's base64 round-trip through sg docker -c (the ${__A[@]} expansion is correctly scoped to the inner bash -c, not the outer shell); the pre-clean fallback's sudo kill -9 on docker ps -aq output (scoped to this job's own containers, not arbitrary host PIDs); and whether TP4 prefill actually shrinks the Slurm reservation (it doesn't — Slurm allocates whole 8-GPU nodes regardless of TP size, so the 12-vs-16-GPU savings is a utilization claim about the workload, not the job's node/GPU request).

Extended reasoning...

This is an informational note, not a full review. This PR is not being approved because it modifies configs/amd-master.yaml, which is CODEOWNER-protected (per .github/CODEOWNERS, that file requires sign-off from the listed AMD owners), and because the bug hunting system already found two nit-level issues that are posted as inline comments. Beyond those, I checked three additional candidate concerns raised by finder agents and confirmed they don't hold up: the docker_sg.sh base64/sg-docker argv relay is correctly scoped so ${__A[@]} expands inside the inner bash -c rather than the outer shell; the stuck-container SIGKILL fallback in job.slurm operates on docker ps -aq output which is already scoped to containers on the Docker daemon reachable via $DOCKER_CMD (this job's own containers), not arbitrary host PIDs; and the TP4-prefill GPU savings described in the PR is a compute-utilization claim, not a change to the Slurm node/GPU reservation (which is fixed per-node at --gres=gpu:8 regardless of TP size) -- expected behavior, not a bug.

Comment on lines 693 to 715
\$DOCKER_CMD ps -aq --filter \"$CONT_FILTER\" | xargs -r \$DOCKER_CMD rm -f || true
\$DOCKER_CMD ps -aq | xargs -r \$DOCKER_CMD stop -t 15 || true
\$DOCKER_CMD ps -aq | xargs -r \$DOCKER_CMD rm -f || true

# Fallback for stuck containers: if docker rm -f fails (\"did not receive an
# exit event\"), the container's shim/init PID is stuck in uninterruptible
# sleep (common after a GPU hang). Kill the container PIDs directly so the
# daemon can clean up the cgroup and release GPU VRAM.
_stuck=\$(\$DOCKER_CMD ps -aq 2>/dev/null || true)
if [[ -n \"\$_stuck\" ]]; then
echo \"[pre-clean] containers still present after docker rm -f; attempting direct PID kill\"
for _cid in \$_stuck; do
_pid=\$(\$DOCKER_CMD inspect --format '{{.State.Pid}}' \"\$_cid\" 2>/dev/null || true)
if [[ -n \"\$_pid\" && \"\$_pid\" != \"0\" ]]; then
sudo kill -9 \"\$_pid\" 2>/dev/null || true
fi
done
sleep 3
\$DOCKER_CMD ps -aq | xargs -r \$DOCKER_CMD rm -f 2>/dev/null || true
fi
sleep 2

# GPU sanity gate: containers are stopped, so any remaining VRAM use is a bare

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.

🟡 The 'docker inspect Pid → guard nonzero → sudo kill -9 → sleep → docker rm -f' stuck-container cleanup sequence is written out three separate times in this PR (cleanup() trap ~L386-392, pre-clean fallback ~L693-715, and final KEEP_CONTAINERS cleanup ~L807-826), each with slightly different quoting/looping/sleep duration. Consider factoring this into a shared helper under amd_utils/helpers/ (following the existing gpu_sanity.sh/rdma_check.sh pattern) parameterized by container name(s), so a future change to the kill/retry policy only needs to be made once.

Extended reasoning...

This PR introduces the same "if docker rm -f didn't work, read the container's PID via docker inspect --format {{.State.Pid}}, guard it's nonzero, sudo kill -9 it, sleep, then retry docker rm -f" recipe in three distinct places in job.slurm:

  1. cleanup() trap (~L386-392): the diff appends the inspect/kill-9/sleep/rm-f tail onto the existing srun ... $DOCKER_CMD rm -f $DOCKER_CONT_NAME one-liner, all inline inside a single-quoted bash -c string with sleep 2.
  2. Pre-clean stuck-container fallback (~L693-715, entirely new): a for _cid in $_stuck loop inside the big bash -lc "..." heredoc (double-quote-escaped), inspecting/killing each container returned by docker ps -aq, with sleep 3.
  3. Final KEEP_CONTAINERS cleanup (~L807-826): the old one-line rm -f $DOCKER_CONT_NAME $CLIENT_CONT_NAME is rewritten into a for _cont in ... loop that does rm -f, inspect, sudo kill -9, sleep 2, rm -f again per container name.

The inner "inspect → nonzero-check → kill -9 → sleep → rm -f" core is functionally identical across all three sites — only the outer scoping differs (single named container vs. a for loop over container names vs. a for loop over docker ps -aq output), and even the sleep duration silently drifts (2s in two spots, 3s in the third) despite being logically the same "give the kernel time to release the PID before retrying rm" step.

The problem this causes: any future change to the kill/retry policy — e.g. escalating from SIGKILL to a signal sequence, tuning the sleep duration, changing how a nonzero-but-stale PID is detected, or adding a log line when the kill actually fires — has to be hand-applied in three separate places, each with different quoting contexts (plain single-quoted bash -c, an escaped heredoc, and a here-string). It's easy for these to drift further over time (the 2s vs 3s sleep is already an example of this happening within the same PR), and a subtle bug fixed in one copy is likely to be missed in the other two.

Existing precedent in this same file for factoring shared shell logic already exists: gpu_sanity.sh and rdma_check.sh live under amd_utils/helpers/ and are invoked via bash $DI_REPO_DIR/.../helpers/<script>.sh from within the job. A similar helper (e.g. helpers/kill_stuck_container.sh), parameterized by container name(s) and invoked the same way, would let all three call sites share one implementation. The differing escaping contexts (plain bash -c, escaped heredoc, here-string) are a real complication but not a blocker — since the helper would be its own file invoked via bash .../helper.sh "$cont1" "$cont2" ..., each call site only needs to pass the container name(s) as argv, sidestepping the quoting divergence that currently forces three hand-written inline copies.

As a concrete illustration: suppose the kill/retry policy needs to change from sleep 2 to sleep 5 to give slower NICs/GPUs more time to release the PID. Today that edit must be made in the cleanup() trap, the pre-clean fallback (which uses sleep 3, a different existing value, adding confusion about whether it should also become 5), and the final KEEP_CONTAINERS loop — three edits across two different quoting styles, with no test coverage to catch a missed copy. With a shared helper, it's one line in one file.

This is a maintainability/quality observation only — the duplicated logic is not incorrect in any of its three call sites, so it does not affect correctness or block merging.

Comment thread perf-changelog.yaml
Comment on lines +5959 to +5962
description:
- "Bump qwen3.5-fp8-mi355x-sglang-disagg image from v0.5.14 to v0.5.16 (3-5% throughput improvement) and switch from TP8P+TP8D (16 GPU) to TP4P+TP8D (12 GPU) — TP4 prefill delivers identical decode interactivity with 24-31% better throughput/GPU."
- "Infra: add docker_sg.sh wrapper and update job.slurm DOCKER_CMD_DETECT to use sg-docker fallback for nodes where Slurm doesn't activate the docker supplementary group."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2557

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.

🟡 The new perf-changelog.yaml entry for qwen3.5-fp8-mi355x-sglang-disagg sets pr-link to pull/2557, but this change is being made in PR #2606#2557 is the parent PR this one was split from, not the PR adding the entry. Per docs/configuration-procedures.md, pr-link must point to the PR that actually adds the entry, so this should be pull/2606.

Extended reasoning...

The newly appended changelog block (config-key qwen3.5-fp8-mi355x-sglang-disagg, perf-changelog.yaml:5959-5962) sets:

pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2557

but this changelog entry is being added by this PR, which is #2606 (per the PR metadata). #2557 is explicitly identified in the PR description itself as the parent PR this change was "split from" ("Split from #2557 — baseline only, no MTP/speculative decoding changes") — it is not the PR that introduces this entry.

Why this violates the documented convention: docs/configuration-procedures.md (the template around line 251, plus the guidance at line 254) states that pr-link must be the real URL of the PR that adds the entry, and that pr-link: TBD is only acceptable before the PR exists — to be "replace[d] with the real URL immediately after creating the PR." Every other existing entry in perf-changelog.yaml follows this rule and links to its own introducing PR number (e.g., the three entries immediately preceding this one link to #2577, #2578, and #2580 respectively — each entry's own PR, not a predecessor). This new entry breaks that pattern by pointing to the PR it was split from instead of itself.

Why nothing catches this today: CI's check-changelog job only validates that the changelog is append-only (per the PR's own test plan checklist: "CI passes check-changelog (append-only)"). It does not validate that pr-link resolves to the correct/current PR number, so this mismatch will pass CI silently.

Step-by-step proof:

  1. PR metadata says number=2606 — this is the PR under review, and it is the PR that appends the new changelog block (the diff shows the block added directly under this PR's diff of perf-changelog.yaml).
  2. The PR description states: "Split from [AMD] Qwen3.5-FP8 MI355X SGLang disagg perf tuning: image bump to v0.5.16, TP4P+TP8D baseline, add MTP / Qwen3.5-FP8 MI355X SGLang disagg 性能调优:镜像升级至v0.5.16,TP4P+TP8D基线优化,新增MTP配置 #2557 — baseline only, no MTP/speculative decoding changes," confirming [AMD] Qwen3.5-FP8 MI355X SGLang disagg perf tuning: image bump to v0.5.16, TP4P+TP8D baseline, add MTP / Qwen3.5-FP8 MI355X SGLang disagg 性能调优:镜像升级至v0.5.16,TP4P+TP8D基线优化,新增MTP配置 #2557 is a different, earlier PR that this one was carved out of.
  3. The new block's pr-link field reads https://github.com/SemiAnalysisAI/InferenceX/pull/2557.
  4. Per the documented rule, this field should read https://github.com/SemiAnalysisAI/InferenceX/pull/2606 — the PR actually introducing this changelog entry.
  5. Comparing to sibling entries a few lines above (linking to Refresh DeepSeek-V4 B300 SGLang AgentX MTP #2577, Refresh DeepSeek-V4 B200 SGLang AgentX MTP #2578, [AMD][AgentX] Add MI300X MiniMax-M3 EAGLE3 MXFP8 #2580 — each their own introducing PR) confirms the established, correct pattern that this entry deviates from.

Impact: Purely a provenance/traceability metadata issue. It doesn't break CI, doesn't affect the benchmark run, and doesn't change runtime behavior — but it does make the changelog's PR attribution incorrect for anyone auditing history (a reader following the link from this entry would land on the older, unrelated split-parent PR rather than this one).

Fix: Change pr-link in the new block from .../pull/2557 to .../pull/2606.

@ChangLiu0709 ChangLiu0709 changed the title [AMD] Qwen3.5-FP8 MI355X SGLang disagg baseline: image bump v0.5.16, TP4P+TP8D [AMD] Qwen3.5-FP8 MI355X SGLang disagg baseline: image bump to v0.5.16, TP4P+TP8D / Qwen3.5-FP8 MI355X SGLang disagg 基线优化:镜像升级至v0.5.16,TP4P+TP8D拓扑优化 Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants