[AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache + MTP #2199
[AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache + MTP #2199seungrokj wants to merge 16 commits into
Conversation
…th router and HiCache support Align the agentic launcher with the fixed-seq-len sibling: dsv4 attention backend, fp8_e4m3 KV cache, disable-radix-cache, DP-attention env exports (SGLANG_SHARED_EXPERT_TP1, DP_USE_GATHERV, etc.), and two-batch-overlap. Add SGLang router for DP-attention configs and HiCache KV offloading. Sweep conc=48 across TP8 +/- DPA +/- HiCache. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…figs for initial validation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…unning-requests, re-enable all sweep configs - Fix attention-backend typo (compresseed -> compressed) - Remove duplicate CUDA_GRAPH_MAX_BS block - Set MAX_RUNNING_REQUESTS to 2*CONC for subagent fan-out headroom - Use MEM_FRACTION_STATIC=0.90 and swa-full-tokens-ratio=0.10 - Add METRICS_ARGS array, guard capture_cache_metrics on metrics enabled - Remove duplicate SGLANG_ENABLE_UNIFIED_RADIX_TREE export from hicache block - Uncomment all 4 sweep configs (TP8 +/- DPA +/- HiCache) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ust sweep concurrency hicache-ratio=8 tried to pin ~495 GB via cudaHostRegister, exceeding ROCm's per-process pinnable memory limit. Lower to ratio=4 and sweep graduated concurrency levels across configs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…concurrency to 96 Device KV utilization peaked at only 27% even at conc=48, and non-DPA configs underperformed DPA in both throughput and completed requests. Drop non-DPA sweep entries and extend DPA concurrency range to [16..96] (none) and [48..96] (hicache) to find the saturation point. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… conc 1-8) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…c hicache recipe Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… image - Clean up hicache case block indentation and comments - Add SGLANG_ROUTER_CMD array pattern matching b300 launcher - Rename config key dsv4-fp4-mi355x-sglang-agentic → agentic-hicache - Bump image to v0.5.15-rocm700-mi35x-20260713 - Raise CUDA_GRAPH_MAX_BS cap to 128, tune mem/prefill defaults - Add SPEC_ARGS placeholder for future speculative decoding Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mori p2p, revert image
- Use { name: ... } map syntax for kv-offload-backend (hicache, native)
- Revert image to v0.5.14-rocm720-mi35x-20260710
- Add kv-p2p-transfer: mori to disagg agentic hicache recipe
- Update perf-changelog config keys for renamed entries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…entic sweep
- Add router: { name: vllm-router, version: "0.1.14" } to DPA configs
- Switch kv-offload-backend from native to mooncake 0.3.11.post1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rop disagg entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| # Allow subagent fan-out to exceed CONC without clipping request bursts. | ||
| MAX_RUNNING_REQUESTS=$((2 * CONC)) | ||
| CUDA_GRAPH_MAX_BS=$CONC | ||
| [ "$CUDA_GRAPH_MAX_BS" -gt 128 ] && CUDA_GRAPH_MAX_BS=128 | ||
|
|
||
| echo "Starting sglang server..." | ||
| python3 -m sglang.launch_server \ | ||
| --model-path "$MODEL_PATH" --served-model-name "$MODEL" \ | ||
| --host=0.0.0.0 \ | ||
| --port "$PORT" \ | ||
| "${PARALLEL_ARGS[@]}" \ | ||
| --trust-remote-code \ | ||
| --attention-backend compressed \ | ||
| --max-running-requests "$PER_ENGINE_MAX_RUNNING" \ | ||
| --cuda-graph-max-bs "$PER_ENGINE_MAX_RUNNING" \ | ||
| --page-size 256 \ | ||
| --chunked-prefill-size 8192 \ | ||
| --disable-shared-experts-fusion \ | ||
| --tool-call-parser deepseekv4 \ | ||
| --reasoning-parser deepseek-v4 \ | ||
| --chat-template "$(dirname "$0")/../chat_templates/deepseek_v4_thinking.jinja" \ | ||
| --watchdog-timeout 1800 > "$SERVER_LOG" 2>&1 & | ||
| export SGLANG_DEFAULT_THINKING=1 | ||
| export SGLANG_DSV4_REASONING_EFFORT=max | ||
| export SGLANG_USE_ROCM700A=0 | ||
| export SGLANG_HACK_FLASHMLA_BACKEND=unified_kv_triton | ||
| export AITER_BF16_FP8_MOE_BOUND=0 | ||
|
|
||
| PARALLEL_ARGS=(--tensor-parallel-size "$TP") | ||
| METRICS_ARGS=(--enable-metrics) | ||
| SPEC_ARGS=() | ||
|
|
There was a problem hiding this comment.
🔴 PARALLEL_ARGS is appended to at lines 95/104 (--dp/--enable-dp-attention/--enable-prefill-delayer/--enable-two-batch-overlap for DP_ATTENTION=true, and --ep-size for EP_SIZE>1), but line 119 does a plain reassignment PARALLEL_ARGS=(--tensor-parallel-size "$TP") that wipes out everything appended earlier. As a result, every dp-attn:true / ep-size>1 row in the new sweep (all the agentic-hicache DPA/HiCache rows) launches sglang as plain TP while the router is still started with --dp-aware/consistent_hashing, expecting DP ranks that no longer exist.
Extended reasoning...
The bug: In benchmarks/single_node/agentic/dsv4_fp4_mi355x_sglang.sh, PARALLEL_ARGS is built up incrementally with += in two places:
- Inside the
if [ "$DP_ATTENTION" = "true" ]block:PARALLEL_ARGS+=(--dp "$TP" --enable-dp-attention --enable-prefill-delayer --enable-two-batch-overlap) - Inside the
if [ "${EP_SIZE:-1}" -gt 1 ]block:PARALLEL_ARGS+=(--ep-size "$EP_SIZE")
Both of these run before the array is initialized. Then, unconditionally, a later line does:
PARALLEL_ARGS=(--tensor-parallel-size "$TP")This is a plain assignment, not +=. It discards every element that was appended above and replaces the array with just --tensor-parallel-size $TP. Since this line executes after both append blocks, PARALLEL_ARGS never contains --dp, --enable-dp-attention, --enable-prefill-delayer, --enable-two-batch-overlap, or --ep-size by the time it's expanded into SGLANG_CMD ("${PARALLEL_ARGS[@]}") and handed to sglang.launch_server.
Why nothing catches this: the script runs under set -euo pipefail, but appending to an unset array with += does not error under nounset — bash implicitly creates the array on first append — so the DP/EP blocks execute silently without any indication that their output is about to be thrown away.
Why this matters for this PR specifically: the diff that moved the base PARALLEL_ARGS=(--tensor-parallel-size "$TP") initialization is new — in the pre-PR version of this file, that same line existed before the DP-attention append block, so it worked correctly. The refactor relocated the PARALLEL_ARGS=(...) init to right before the SGLANG_CMD construction, after the DP/EP blocks, turning a correct pattern into a silent clobber.
Concrete walkthrough for one of the new sweep rows, e.g. { tp: 8, dp-attn: true, kv-offloading: none, conc-list: [16, 32, 48, 64] }:
DP_ATTENTION=true→PARALLEL_ARGS+=(--dp 8 --enable-dp-attention --enable-prefill-delayer --enable-two-batch-overlap).PARALLEL_ARGSis now(--dp 8 --enable-dp-attention --enable-prefill-delayer --enable-two-batch-overlap).EP_SIZEis unset/1, so the EP block is skipped.USE_SGLANG_ROUTER=trueis set,SGLANG_BACKEND_PORT=$((PORT+1)), the router command is prepared.- Later:
PARALLEL_ARGS=(--tensor-parallel-size "$TP")executes —PARALLEL_ARGSis now just(--tensor-parallel-size 8), and everything from step 1 is gone. SGLANG_CMDis built with"${PARALLEL_ARGS[@]}"→ the server launches as plain TP8, no DP-attention, no two-batch-overlap.- But
USE_SGLANG_ROUTER=truestill causes the router to start with--dp-awareand--policy consistent_hashing, routing to a backend that has zero DP ranks — a topology mismatch between what the router expects and what the server actually is.
Impact: every dp-attn:true row in the new dsv4-fp4-mi355x-sglang-agentic-hicache sweep (conc 16/32/48/64 for plain DPA, and 80/96 for the HiCache+DRAM-offload rows) silently degrades to plain TP8, defeating the entire point of the DPA/HiCache sweep added by this PR, while the router/backend pairing is left inconsistent.
Fix: either change the base-init line to PARALLEL_ARGS+=(--tensor-parallel-size "$TP"), or move the base initialization above the DP-attention/EP-size append blocks (restoring the original ordering).
|
|
||
| - config-keys: | ||
| - dsv4-fp4-mi355x-sglang-agentic-hicache | ||
| description: | ||
| - "Bump image to lmsysorg/sglang-rocm:v0.5.15-rocm700-mi35x-20260713" | ||
| - "Align launcher env vars and server args with fixed-seq-len sibling (dsv4 attention backend, fp8_e4m3 kv-cache, disable-radix-cache, cuda-graph-max-bs, DP-attention exports, two-batch-overlap)" | ||
| - "Add SGLang router for DP-attention configs (consistent-hashing, dp-aware, correlation-id routing)" | ||
| - "Add HiCache KV offloading support" | ||
| - "Add SGLANG_CMD array pattern with command logging and env-var dump" | ||
| - "Add capture_cache_metrics for pre/post-benchmark cache stats" | ||
| - "Sweep conc=48 across TP8 +/- DPA +/- HiCache" | ||
| pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2146 |
There was a problem hiding this comment.
🟡 The new perf-changelog.yaml entry for dsv4-fp4-mi355x-sglang-agentic-hicache sets pr-link to pull/2146, but this changelog entry is actually introduced by this PR, #2199. Every other entry in the file links to the PR that introduced it, so this breaks the convention; please update the link to #2199 (and it looks like the description bullets were also copy-pasted from #2146 and don't match this diff, e.g. "disable-radix-cache" vs. the actual SGLANG_ENABLE_UNIFIED_RADIX_TREE=1 change, and "Sweep conc=48" vs. the actual conc-lists).
Extended reasoning...
What the bug is
The new perf-changelog.yaml entry for config-key dsv4-fp4-mi355x-sglang-agentic-hicache (added at the bottom of the file, lines 4753-4764) sets:
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2146But per the PR metadata, this changelog entry is being introduced by this PR, #2199. Every other entry in perf-changelog.yaml links to the PR that actually introduced it (the immediately preceding entries link to #2144, #2169, #2137, etc.), so the convention throughout the file is consistent, and pull/2146 breaks it.
Why this happened (copy-paste leftover)
This looks like the whole changelog block — link included — was copy-pasted from an earlier, unrelated PR (#2146) rather than authored fresh for #2199. The description bullets corroborate this: they describe things that do not match this PR's actual diff:
- The entry claims "disable-radix-cache", but the launcher (
benchmarks/single_node/agentic/dsv4_fp4_mi355x_sglang.sh) never passes--disable-radix-cache; it instead exportsSGLANG_ENABLE_UNIFIED_RADIX_TREE=1, which enables a unified radix tree — the opposite framing. - The entry claims "Sweep conc=48 across TP8 +/- DPA +/- HiCache", but the actual
configs/amd-master.yamlsearch-space for this key sweepsconc-list: [1, 2, 4, 8],[16, 32, 48, 64], and[80, 96]— conc=48 only appears inside the DPA-no-HiCache row, not as a dedicated cross-cutting sweep, and the HiCache row itself only covers[80, 96].
So the whole entry (link + several bullets) appears lifted wholesale from the earlier #2146 hicache work rather than describing this PR's actual changes.
Impact
This is a documentation/traceability field only — pr-link is not consumed by any benchmark execution path, so nothing breaks functionally, no runs fail, and no results are miscomputed. The impact is limited to anyone using the changelog to trace which PR introduced a given recipe change (e.g. for auditing or bisecting a perf regression) getting sent to the wrong PR (#2146 instead of #2199).
Step-by-step proof
- Open
perf-changelog.yamllines 4753-4764 — the new entry fordsv4-fp4-mi355x-sglang-agentic-hicache. - Note
pr-link: .../pull/2146. - Check the PR metadata for the current PR: it is [AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache + MTP #2199, and the diff for this PR is exactly what adds this changelog block (
git blame/git log -ponperf-changelog.yamlwould show this hunk was introduced in [AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache + MTP #2199, not [AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache #2146). - Compare adjacent entries in the same file (e.g. the entry just above, pr-link ...Add Qwen3.5 FP8 GB300 disaggregated multinode SGLang benchmarks via Dynamo / 新增 Qwen3.5 FP8 GB300 分离式多节点 SGLang(Dynamo)基准测试 #2137) — each of those links to the PR whose diff actually introduced that entry, confirming the file-wide convention.
- Cross-check the entry's own description against this PR's diff: "disable-radix-cache" is absent from the launcher script's
SGLANG_CMDarray, and there is no standalone "conc=48" sweep in the config — both signs that the description (and by extension the pr-link) were copied from a different PR's changelog entry rather than written for [AMD][MI355X] DSv4 SGLang agentic: v0.5.15 image, router, HiCache + MTP #2199.
How to fix
Change pr-link to https://github.com/SemiAnalysisAI/InferenceX/pull/2199, and while touching it, reconcile the description bullets to reflect what this PR actually changed (unified radix tree env var, fp8_e4m3 KV cache, SGLang router for DP-attention, SGLANG_CMD array pattern, capture_cache_metrics, and the real conc-list sweep), dropping the stale "disable-radix-cache" / "Sweep conc=48" bullets.
Summary
dsv4-fp4-mi355x-sglang-agentic→dsv4-fp4-mi355x-sglang-agentic-hicachelmsysorg/sglang-rocm:v0.5.15-rocm700-mi35x-20260713Test plan
🤖 Generated with Claude Code