[AMD] [AgentX] Add MI325X Qwen3.5 FP8 SGLang MTP - #2566
Conversation
|
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 关于重新运行失败任务的文档 |
| run_eval --port "$PORT" | ||
| else | ||
| build_replay_cmd "$RESULT_DIR" | ||
| REPLAY_CMD+=" --use-chat-template" | ||
| run_agentic_replay_and_write_outputs "$RESULT_DIR" | ||
| fi |
There was a problem hiding this comment.
🔴 The script appends --use-chat-template to REPLAY_CMD (lines 145-147), but that flag only exists on run_benchmark_serving's fixed-seq-len path, not on the aiperf CLI that build_replay_cmd invokes here. build_replay_cmd already sets --endpoint /v1/chat/completions and --endpoint-type chat, so aiperf will reject the unrecognized flag and fail the replay step for every throughput concurrency arm (62 points) in this recipe. Fix by deleting the REPLAY_CMD+=" --use-chat-template" line.
Extended reasoning...
What the bug is
benchmark_lib.sh's build_replay_cmd constructs REPLAY_CMD as an invocation of $AIPERF_CLI profile --scenario inferencex-agentx-mvp ... (benchmark_lib.sh:1927), where AIPERF_CLI="${AIPERF_VENV}/bin/aiperf" (benchmark_lib.sh:1721) — the external NVIDIA aiperf Python CLI. This is a completely different program from run_benchmark_serving, and --use-chat-template is not one of its recognized arguments.
--use-chat-template is defined only inside run_benchmark_serving's own bash arg-parsing loop (benchmark_lib.sh:520-526), which is consumed by the fixed-seq-len benchmarking path and appended to benchmark_cmd (not REPLAY_CMD) at benchmark_lib.sh:636-638. It has no meaning to aiperf profile.
The code path that triggers it
In qwen3.5_fp8_mi325x_mtp.sh (lines 144-149):
build_replay_cmd "$RESULT_DIR"
REPLAY_CMD+=" --use-chat-template"
run_agentic_replay_and_write_outputs "$RESULT_DIR"build_replay_cmd already sets --endpoint /v1/chat/completions and --endpoint-type chat (benchmark_lib.sh:1929-1930), which is aiperf's own mechanism for chat-formatted prompts — nothing further is needed. The extra line simply appends a bogus flag to the string that later gets executed as $REPLAY_CMD inside run_agentic_replay_and_write_outputs.
Why nothing prevents it
There's no static validation of REPLAY_CMD before it's executed — it's a plain bash string built up with += and later eval'd/executed directly. aiperf's own argparse-based CLI is what will reject the unknown flag, but only at runtime, once the sweep is actually dispatched to a runner.
Impact
Every non-EVAL_ONLY throughput arm in this recipe (the full 62-point discovery grid across TP2/EP2, TP4, TEP4, TP8, TEP8) takes the else branch that calls build_replay_cmd + this bad append + run_agentic_replay_and_write_outputs. aiperf will exit non-zero on the unrecognized argument, so run_agentic_replay_and_write_outputs will fail for every one of those 62 points. Only EVAL_ONLY=true runs (which take the run_eval branch instead) are unaffected.
Root cause
This is a misapplication of the AGENTS.md rule "Every *_mtp.sh passes --use-chat-template to run_benchmark_serving." That rule is scoped specifically to run_benchmark_serving (the fixed-seq-len benchmarking path). This script is an agentic recipe that never calls run_benchmark_serving — it drives aiperf directly via build_replay_cmd/run_agentic_replay_and_write_outputs. A repo-wide check confirms no other agentic *_mtp.sh script (e.g. qwen3.5_fp8_b300_sglang_mtp.sh, glm5.2_fp4_mi355x_sglang_mtp.sh, dsv4_fp4_mi355x_vllm_mtp.sh) appends --use-chat-template to REPLAY_CMD; they only append legitimate aiperf flags like --server-metrics. In fact, the sibling kimik3_fp4_b300_vllm_mtp.sh carries an explicit comment noting this exact distinction and stating there's "Nothing to add here" for agentic recipes.
Step-by-step proof
- Script reaches the
elsebranch (non-EVAL_ONLY) at line 143. build_replay_cmd "$RESULT_DIR"setsREPLAY_CMD="$AIPERF_VENV/bin/aiperf profile --scenario inferencex-agentx-mvp --url http://localhost:$PORT --endpoint /v1/chat/completions --endpoint-type chat --streaming --model $MODEL --concurrency $CONC --benchmark-duration $duration --stats-interval 30 ...".- Line 147 appends:
REPLAY_CMD+=" --use-chat-template". run_agentic_replay_and_write_outputs "$RESULT_DIR"executes$REPLAY_CMD, i.e. runsaiperf profile ... --use-chat-template.- aiperf's argparse-based CLI does not recognize
--use-chat-templateand exits non-zero, causingrun_agentic_replay_and_write_outputsto report a failed replay for that concurrency arm. - This repeats identically for all 62 concurrency points in the
qwen3.5-fp8-mi325x-sglang-agentic-mtpgrid.
Fix
Simply delete line 147 (REPLAY_CMD+=" --use-chat-template"); build_replay_cmd's existing --endpoint-type chat already covers chat formatting for the aiperf replay.
|
see unofficial run visualizer at https://inferencex.semianalysis.com/inference?unofficialRun=31544042402 |
29ea217 to
ada0d27
Compare
|
see unofficial run visualizer at https://inferencex.semianalysis.com/inference?unofficialRun=31561404142 |
Summary
Qwen/Qwen3.5-397B-A17B-FP8with SGLang native EAGLE MTP.lmsysorg/sglang:v0.5.16-rocm720-mi30ximage, AITER unified attention, FP8 KV cache, and the committed thinking-on golden AL 3.39.agentx-fastdiscovery run (60 green; two low-concurrency time-coverage-only failures with complete metrics).AIPERF_SERVER_METRICS_URLSand require thesglang:metric prefix.Validation
bash -n benchmarks/single_node/agentic/qwen3.5_fp8_mi325x_mtp.shconfigs/amd-master.yamlandperf-changelog.yamlv0.5.16-rocm720-mi30x