Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 38 additions & 21 deletions benchmarks/single_node/agentic/dsv4_fp4_mi355x_atom_mtp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ set -euo pipefail
set -x

# Agentic trace replay benchmark for DeepSeek-V4-Pro FP4 on MI355X using
# ATOM MTP. Throughput runs use the committed golden synthetic acceptance;
# eval-only runs use the model's real MTP acceptance.
# ATOM MTP. TP throughput runs use the committed golden synthetic acceptance;
# DEP and eval-only runs use the model's real MTP acceptance.

source "$(dirname "$0")/../../benchmark_lib.sh"

Expand Down Expand Up @@ -46,26 +46,39 @@ export ATOM_DEBUG_PREFIX_HITS=1
export ATOM_PROFILER_MORE=0
export ATOM_PROFILER_TIMEOUT=1200

# DP-attention runs layer ATOM's DPA routing and two-batch-overlap knobs on top of
# the TP settings above (recipe section "Server - DP attention"); exported only for
# the DP band. ATOM_DP_SESSION_AFFINITY is not optional: without it a session's
# turns scatter across DP ranks, the prefix KV written by one turn is unreachable
# by the next, and the multi-turn agentic workload collapses to cold prefill.
# GPU_MAX_HW_QUEUES and ATOM_NUMA_BIND are prerequisites of --enable-tbo.
DP_ATTN_ARGS=()
# EP is config-driven so the TP band remains TP-only while DEP uses one expert
# shard per GPU.
EP_ARGS=()
if [ "$EP_SIZE" -gt 1 ]; then
EP_ARGS=(--enable-expert-parallel)
fi

# The high-concurrency band uses ATOM's native RCCL DEP transport. Session
# affinity is required: otherwise consecutive turns can land on another DPA
# rank and lose access to the prefix KV produced by the previous turn.
DEP_ARGS=()
STATE_CHECKPOINT_INTERVAL_TOKENS=8192

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkpoint interval misses validated 32K

Medium Severity

STATE_CHECKPOINT_INTERVAL_TOKENS stays at 8192, but the validated native RCCL DEP c48 run and this PR’s changelog both set the state checkpoint interval to 32768 tokens. The DEP band will checkpoint four times more often than the measured recipe, changing prefix-cache behavior and adding extra publisher forwards.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5c91ae8. Configure here.

if [ "$DP_ATTENTION" = "true" ]; then
export GPU_MAX_HW_QUEUES=5
export ATOM_NUMA_BIND=1
if [ "$EP_SIZE" -ne "$TP" ]; then
echo "ERROR: native RCCL DEP requires EP_SIZE=$TP for TP=$TP, got EP_SIZE=$EP_SIZE" >&2
exit 1
fi
# Keep only runtime controls that are not already expressed by DEP_ARGS.
export ATOM_DP_SESSION_AFFINITY=1
export ATOM_DP_LB_REQ_EQUIV=512
export ATOM_ENABLE_PREFILL_DELAYER=1
export ATOM_PREFILL_DECODE_INTERVAL=10
# Client-side counterpart to session affinity: make AIPerf emit a stable
# session id (x-dynamo-session-id, falling back to the always-sent
# x-correlation-id) so the DPA router pins each conversation to one rank.
export AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID=true
export AIPERF_HTTP_X_SESSION_ID_FROM_CORRELATION_ID=true
DP_ATTN_ARGS=(--enable-dp-attention --enable-tbo)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request equivalence not set to zero

Medium Severity

ATOM_DP_LB_REQ_EQUIV remains 512 even though the validated DEP recipe and changelog require zero request equivalence. With the new least_tokens policy, load is prompt_tokens + (ATOM_DP_LB_REQ_EQUIV * in-flight requests), so 512 reweights routing away from the measured pure token balance.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5c91ae8. Configure here.

# session id from its correlation id so the DPA router pins each
# conversation to one rank.
export AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID=1
export AGENTIC_WARMUP_GRACE_PERIOD=3600
DEP_ARGS=(
--enable-dp-attention
--all2all-backend rccl
--dp-load-balance least_tokens
--moe-backend standard
)
fi

# Raise the AIPerf HTTP TCP user timeout to 900000 ms (15 min), well above the
Expand Down Expand Up @@ -103,19 +116,21 @@ trap 'exit 143' TERM
# request bursts produced by subagent fan-out.
MAX_NUM_SEQS=$((2 * CONC))

# golden_al_distribution/dsv4_mtp.yaml: thinking_on, 3 draft tokens -> AL 2.49
# golden_al_distribution/dsv4_mtp.yaml: thinking_on, 3 draft tokens -> AL 2.49.
# https://github.com/SemiAnalysisAI/InferenceX/blob/main/golden_al_distribution/dsv4_mtp.yaml
# Native RCCL DEP was validated with the model's real acceptance, so only the
# TP throughput band applies the synthetic golden value.
NUM_SPEC_TOKENS=3
SPEC_DECODE_AL=2.49
SPEC_ARGS=(
--method mtp
--num-speculative-tokens "$NUM_SPEC_TOKENS"
)
if [ "${EVAL_ONLY:-false}" != "true" ]; then
if [ "${EVAL_ONLY:-false}" != "true" ] && [ "$DP_ATTENTION" != "true" ]; then
SPEC_ARGS+=(--spec-decode-acceptance-length "$SPEC_DECODE_AL")
fi

echo "Starting ATOM server with MAX_NUM_SEQS=$MAX_NUM_SEQS NUM_SPEC_TOKENS=$NUM_SPEC_TOKENS SPEC_DECODE_AL=$SPEC_DECODE_AL EVAL_ONLY=${EVAL_ONLY:-false}"
echo "Starting ATOM server with MAX_NUM_SEQS=$MAX_NUM_SEQS NUM_SPEC_TOKENS=$NUM_SPEC_TOKENS STATE_CHECKPOINT_INTERVAL_TOKENS=$STATE_CHECKPOINT_INTERVAL_TOKENS DP_ATTENTION=$DP_ATTENTION EP_SIZE=$EP_SIZE EVAL_ONLY=${EVAL_ONLY:-false}"
ATOM_CMD=(
python3 -u -m atom.entrypoints.openai_server
--model "$MODEL_PATH"
Expand All @@ -129,17 +144,19 @@ ATOM_CMD=(
# warmup request aborts the whole run. Outlast the client idle window.
--timeout-keep-alive 900
--tensor-parallel-size "$TP"
--data-parallel-size 1
--kv-cache-dtype fp8
--index-cache-dtype fp4
--enable-prefix-caching
--gpu-memory-utilization 0.9
--max-num-batched-tokens 16384
--attn-prefill-chunk-size 16384
--state-checkpoint-interval-tokens 8192
--state-checkpoint-interval-tokens "$STATE_CHECKPOINT_INTERVAL_TOKENS"
--level 3
--cudagraph-mode FULL
"${SPEC_ARGS[@]}"
"${DP_ATTN_ARGS[@]}"
"${EP_ARGS[@]}"
"${DEP_ARGS[@]}"
--max-num-seqs "$MAX_NUM_SEQS"
)
write_command "$RESULT_DIR/server_command.txt" "${ATOM_CMD[@]}"
Expand Down
10 changes: 5 additions & 5 deletions configs/amd-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1333,11 +1333,11 @@ dsv4-fp4-mi355x-vllm-agentic-mtp:
# while MTP creates two. Restore these points after the upstream hybrid
# KV recovery fix lands: https://github.com/vllm-project/vllm/pull/45497

# DeepSeek-V4-Pro FP4 AgentX on one MI355X node using ATOM MTP. Throughput
# uses the thinking_on golden AL 2.49 for three draft tokens; eval uses real
# MTP acceptance. max-num-seqs is set to 2x concurrency by the recipe.
# DeepSeek-V4-Pro FP4 AgentX on one MI355X node using ATOM MTP. The TP band
# uses the thinking_on golden AL 2.49 for throughput; the DEP band and eval
# use real MTP acceptance. max-num-seqs is set to 2x concurrency by the recipe.
dsv4-fp4-mi355x-atom-agentic-mtp:
image: rocm/atom-dev:nightly_202608280858
image: rocm/atom-dev:nightly_202609071454
model: deepseek-ai/DeepSeek-V4-Pro
model-prefix: dsv4
runner: cluster:mi355x-amds
Expand All @@ -1348,7 +1348,7 @@ dsv4-fp4-mi355x-atom-agentic-mtp:
agentic-coding:
- search-space:
- { tp: 8, ep: 1, dp-attn: false, kv-offloading: none, spec-decoding: mtp, conc-list: [1, 2, 4, 8, 16] }
- { tp: 8, ep: 1, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [48, 64, 96, 128, 256] }
- { tp: 8, ep: 8, dp-attn: true, kv-offloading: none, spec-decoding: mtp, conc-list: [48, 64, 96, 128, 256] }

dsr1-fp4-mi355x-sglang-disagg-mtp:
image: lmsysorg/sglang-rocm:v0.5.12-rocm720-mi35x-20260519
Expand Down
11 changes: 11 additions & 0 deletions perf-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6948,6 +6948,17 @@
- "Add --compilation-config cudagraph_mode=FULL_DECODE_ONLY to the serve command. The upstream nightly does not torch-compile MiniMaxM3SparseForConditionalGeneration, so with VLLM_USE_BREAKABLE_CUDAGRAPH=0 the default FULL_AND_PIECEWISE mode aborts at engine init with piecewise CUDA graphs unavailable (first sweep, run 34174124043, eval cell); full decode-only graphs are what the MI355X MiniMax-M3 sibling runs on its nightly (#2825)."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2873

- config-keys:
- dsv4-fp4-mi355x-atom-agentic-mtp
scenario-type:
- agentic-coding
description:
- "Update the ATOM image from rocm/atom-dev:nightly_202608280858 to rocm/atom-dev:nightly_202609071454 (digest sha256:f252ec9a30e3d17b91f15887ea32baa1a0c5503b775f5adf42ff7cee8cfff769), built from ROCm/ATOM merge commit 5a9c2068 containing native RCCL DEP."
- "Move the concurrency 48/64/96/128/256 ATOM AgentX band from DPA with TBO and the default MoE transport to native RCCL DEP (TP8/DPA8/EP8), while preserving the TP-only concurrency 1/2/4/8/16 band."
- "Match the validated DEP run: disable EPLB and TBO, use least-tokens routing with session affinity and zero request equivalence, set the state checkpoint interval to 32768 tokens, and use real MTP acceptance on DEP."
- "Carry over the validated AgentX transport, terminal-MTP, and AIPerf timeout/failure settings for stable multi-turn replay."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2886

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.

🟡 (optional) The changelog entry's third bullet claims "zero request equivalence" and a "32768" token checkpoint interval, but the script actually sets ATOM_DP_LB_REQ_EQUIV=512 and STATE_CHECKPOINT_INTERVAL_TOKENS=8192 unconditionally — readers/auditors relying on the changelog to explain observed throughput will be misled about the real DEP config. Fix: correct the bullet to state ATOM_DP_LB_REQ_EQUIV=512 and an 8192-token checkpoint interval, matching benchmarks/single_node/agentic/dsv4_fp4_mi355x_atom_mtp.sh lines 65 and 57.

Extended reasoning...

perf-changelog.yaml lines 6958-6959 (the new dsv4-fp4-mi355x-atom-agentic-mtp entry) state 'zero request equivalence' and 'set the state checkpoint interval to 32768 tokens'. The script sets export ATOM_DP_LB_REQ_EQUIV=512 (line 65) and STATE_CHECKPOINT_INTERVAL_TOKENS=8192 (line 57) with no code path that changes either value to 0 or 32768. Since perf-changelog.yaml is append-only and treated as the authoritative record of what changed and why (per AGENTS.md invariant #1), this factual error will mislead future engineers debugging DEP throughput/latency differences from the documented values.

Verification: nit. The changelog claim and the script genuinely disagree. perf-changelog.yaml line 6958 (new dsv4-fp4-mi355x-atom-agentic-mtp entry) states: "...use least-tokens routing with session affinity and zero request equivalence, set the state checkpoint interval to 32768 tokens...". The script benchmarks/single_node/agentic/dsv4_fp4_mi355x_atom_mtp.sh sets STATE_CHECKPOINT_INTERVAL_TOKENS=8192…


- config-keys:
- qwen3.5-fp8-b200-sglang
scenario-type:
Expand Down
Loading