[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
Conversation
…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>
|
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 For PR verification, add the 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 模板,包括保留英文语句 如需进行 PR 验证,请为此 PR 添加 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档 |
2 similar comments
|
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 For PR verification, add the 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 模板,包括保留英文语句 如需进行 PR 验证,请为此 PR 添加 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档 |
|
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 For PR verification, add the 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 模板,包括保留英文语句 如需进行 PR 验证,请为此 PR 添加 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档 |
There was a problem hiding this comment.
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.
| \$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 |
There was a problem hiding this comment.
🟡 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:
cleanup()trap (~L386-392): the diff appends the inspect/kill-9/sleep/rm-f tail onto the existingsrun ... $DOCKER_CMD rm -f $DOCKER_CONT_NAMEone-liner, all inline inside a single-quotedbash -cstring withsleep 2.- Pre-clean stuck-container fallback (~L693-715, entirely new): a
for _cid in $_stuckloop inside the bigbash -lc "..."heredoc (double-quote-escaped), inspecting/killing each container returned bydocker ps -aq, withsleep 3. - Final
KEEP_CONTAINERScleanup (~L807-826): the old one-linerm -f $DOCKER_CONT_NAME $CLIENT_CONT_NAMEis rewritten into afor _cont in ...loop that doesrm -f,inspect,sudo kill -9,sleep 2,rm -fagain 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.
| 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 |
There was a problem hiding this comment.
🟡 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/2557but 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:
- 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 ofperf-changelog.yaml). - 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.
- The new block's
pr-linkfield readshttps://github.com/SemiAnalysisAI/InferenceX/pull/2557. - Per the documented rule, this field should read
https://github.com/SemiAnalysisAI/InferenceX/pull/2606— the PR actually introducing this changelog entry. - 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.
Changes
Baseline (
qwen3.5-fp8-mi355x-sglang-disagg)lmsysorg/sglang:v0.5.14-rocm720-mi35x→lmsysorg/sglang:v0.5.16-rocm720-mi35x(ROCm 7.2, SGLang v0.5.14 → v0.5.16, 3-5% throughput improvement across all concurrency levels).Infra
dockersupplementary group viasg docker -cfor Slurm job steps where group credentials are not inherited.DOCKER_CMD_DETECTto trysg dockerfallback beforesudo docker; add pre-pull on all nodes; add kill -9 fallback for stuck containers.Local benchmark results (v0.5.16, ISL=8K/OSL=1K)
Baseline (TP4P+TP8D, 12 GPU):
Split from #2557 — baseline only, no MTP/speculative decoding changes. MTP config in #2607.
Authors
@ChangLiu0709
@xiaohuguo2023
@chunfangamd
中文说明
Qwen3.5-FP8 MI355X SGLang 分离式推理基线优化:
从 #2557 拆分 — 仅包含基线配置变更,不包含 MTP 投机解码。MTP 配置见 #2607。
Made with Cursor