Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
117 changes: 117 additions & 0 deletions benchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env bash
set -euo pipefail
set -x

# AgentX trace replay for Qwen3.5-397B-A17B MXFP4 on MI355X with SGLang
# without speculative decoding (baseline non-MTP configuration).

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

export EVAL_FRAMEWORK="lm-eval"

check_env_vars \
MODEL TP CONC EP_SIZE RESULT_DIR DURATION

SCHEDULER_RECV_INTERVAL=${SCHEDULER_RECV_INTERVAL:-30}

if [[ -n "${SLURM_JOB_ID:-}" ]]; then
echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}"
fi

if [[ -n "${MODEL_PATH:-}" ]]; then
if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then
hf download "$MODEL" --local-dir "$MODEL_PATH"
fi
else
hf download "$MODEL"
export MODEL_PATH="$MODEL"
fi

rocm-smi || true
amd-smi || true

export WEKA_LOADER_OVERRIDE=semianalysis_cc_traces_weka_062126_256k
resolve_trace_source
install_agentic_deps

export AIPERF_SERVER_METRICS_URLS="http://localhost:${PORT}/metrics"
export AIPERF_REQUIRED_SERVER_METRIC_PREFIX="sglang:"

SERVER_LOG="$RESULT_DIR/server.log"
mkdir -p "$RESULT_DIR"

SERVER_PID=""
cleanup_agentic_services() {
local exit_code=$?
trap - EXIT INT TERM
set +e
stop_background_process_tree "$SERVER_PID" "SGLang server" 60
exit "$exit_code"
}
trap cleanup_agentic_services EXIT
trap 'exit 130' INT
trap 'exit 143' TERM

PARALLEL_ARGS=(
--tp "$TP"
--dp 1
--ep-size "$EP_SIZE"
)

TOKENIZER_ARGS=()
if [ "$TP" -ge 4 ]; then
TOKENIZER_ARGS=(--tokenizer-worker-num 6)
fi

MAX_RUNNING_REQUESTS=$((2 * CONC))
CUDA_GRAPH_MAX_BS="$CONC"
[ "$CUDA_GRAPH_MAX_BS" -gt 64 ] && CUDA_GRAPH_MAX_BS=64

export PYTHONNOUSERSITE=1
export SGLANG_USE_AITER=1
export SGLANG_USE_AITER_UNIFIED_ATTN=1
export AITER_FLYDSL_FORCE=1
export SGLANG_MAMBA_SSM_DTYPE=bfloat16
export SGLANG_TIMEOUT_KEEP_ALIVE=1800

SGLANG_CMD=(
python3 -m sglang.launch_server
--model-path "$MODEL_PATH"
--served-model-name "$MODEL"
--host 0.0.0.0
--port "$PORT"
--trust-remote-code
"${PARALLEL_ARGS[@]}"
--attention-backend aiter
--mem-fraction-static 0.80
--model-loader-extra-config '{"enable_multithread_load": true}'
--watchdog-timeout 1200
--page-size 16
--cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS"
--max-running-requests "$MAX_RUNNING_REQUESTS"
--max-prefill-tokens 32768
--chunked-prefill-size 32768
--scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL"
--stream-interval 50
"${TOKENIZER_ARGS[@]}"
--tokenizer-path "$MODEL"
--reasoning-parser qwen3
--tool-call-parser qwen3_coder
--enable-metrics
--enable-cache-report
)

printf '%q ' "${SGLANG_CMD[@]}" | tee "$RESULT_DIR/sglang_command.txt"
printf '\n' | tee -a "$RESULT_DIR/sglang_command.txt"
"${SGLANG_CMD[@]}" > "$SERVER_LOG" 2>&1 &
SERVER_PID=$!

wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID"

if [ "${EVAL_ONLY:-false}" = "true" ]; then
run_eval --port "$PORT"
else
build_replay_cmd "$RESULT_DIR"
REPLAY_CMD+=" --apply-chat-template"
run_agentic_replay_and_write_outputs "$RESULT_DIR"
fi
15 changes: 15 additions & 0 deletions configs/amd-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,21 @@
- { tp: 2, conc-start: 4, conc-end: 128, spec-decoding: mtp }
- { tp: 4, conc-start: 4, conc-end: 16, spec-decoding: mtp }

qwen3.5-fp4-mi355x-sglang-agentic:
image: lmsysorg/sglang-rocm:v0.5.17-rocm720-mi35x-20260811
model: amd/Qwen3.5-397B-A17B-MXFP4
model-prefix: qwen3.5
runner: cluster:mi355x-amds
precision: fp4
framework: sglang
multinode: false
scenarios:
agentic-coding:
- dram-utilization: 0.80
search-space:
- { tp: 2, ep: 2, kv-offloading: none, conc-list: [1, 4, 8, 12, 16, 20] }
- { tp: 4, ep: 1, kv-offloading: none, conc-list: [1, 4, 8, 12, 16, 20, 24, 28, 32, 40] }

Check failure on line 391 in configs/amd-master.yaml

View check run for this annotation

Claude / Claude Code Review

Missing perf-changelog.yaml entry for new recipe

This PR adds a brand-new recipe (`qwen3.5-fp4-mi355x-sglang-agentic` in configs/amd-master.yaml plus a new benchmark script) but does not append the required entry to perf-changelog.yaml. Per AGENTS.md's non-negotiable benchmark invariant, every recipe addition needs a new append-only tail entry — please add one describing this config before merging.

Check warning on line 391 in configs/amd-master.yaml

View check run for this annotation

Claude / Claude Code Review

[quality] PR title/description missing required Simplified Chinese translation

This PR's title and description are English-only, but AGENTS.md and docs/documentation-procedures.md require PR titles/descriptions to include natural Simplified Chinese alongside English (bot-generated content is the only carve-out). Please add a Simplified Chinese translation to the title and description.
Comment on lines +364 to +377

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.

🔴 This PR adds a brand-new recipe (qwen3.5-fp4-mi355x-sglang-agentic in configs/amd-master.yaml plus a new benchmark script) but does not append the required entry to perf-changelog.yaml. Per AGENTS.md's non-negotiable benchmark invariant, every recipe addition needs a new append-only tail entry — please add one describing this config before merging.

Extended reasoning...

AGENTS.md, under Non-negotiable benchmark invariants, states verbatim: 'Every change that can affect benchmark performance and every recipe addition or modification requires a new perf-changelog.yaml entry. The file is append-only and byte-sensitive... append only at the tail.' This is not a stylistic suggestion — it's called out as a non-negotiable invariant that gates recipe changes in this repository.

This PR introduces a brand-new top-level config key, qwen3.5-fp4-mi355x-sglang-agentic, in configs/amd-master.yaml (lines 377-391), along with its own new benchmark script benchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang.sh. This is unambiguously a 'recipe addition' as defined by the invariant — it's a new model/hardware/framework combination (Qwen3.5-397B MXFP4 baseline, non-MTP, on MI355X via SGLang) with its own search space (TP2/EP2 and TP4/EP1 arms) and its own image pin.

The PR diff touches exactly two files: the new benchmark script and configs/amd-master.yaml. perf-changelog.yaml is not part of the diff at all. I confirmed this directly by reading the tail of the current perf-changelog.yaml in the repo: the last two entries are for PR #2578 (dsv4-fp4-b200-sglang-agentic-hicache-mtp) and PR #2577 (dsv4-fp4-b300-sglang-agentic-hicache-mtp) — there is no entry referencing PR #2605 or the qwen3.5-fp4-mi355x-sglang-agentic config key anywhere in the file.

Step-by-step proof:

  1. Read AGENTS.md — non-negotiable invariant requires a perf-changelog.yaml entry for every recipe addition, appended at the tail.
  2. Read the PR diff — a new config key qwen3.5-fp4-mi355x-sglang-agentic is added to configs/amd-master.yaml, and a new script implements it. This satisfies the definition of 'recipe addition.'
  3. Enumerate the PR's changed files — only 2 files: the script and the config. perf-changelog.yaml is absent.
  4. Read the tail of perf-changelog.yaml on the base branch — ends with the PR Refresh DeepSeek-V4 B300 SGLang AgentX MTP #2577/Refresh DeepSeek-V4 B200 SGLang AgentX MTP #2578 entries, with no entry for this recipe or PR [AMD] [AGENTX] Qwen3.5 FP4 MI355X SGLang Agentic MTP / Qwen3.5 FP4 MI355X SGLang Agentic 数据集 MTP 基准配置 #2605.
  5. Conclusion: the required changelog entry is missing.

Nothing in the diff suggests this recipe is exempt (e.g. it isn't a config-only tweak to an existing key — it's a wholly new entry with a companion script). The fix is straightforward: append a new entry at the tail of perf-changelog.yaml with config-keys: [qwen3.5-fp4-mi355x-sglang-agentic], scenario-type: [agentic-coding], a short description of the TP2/EP2 and TP4/EP1 non-MTP baseline, and the PR link for #2605 — following the exact format of the adjacent entries already in the file.

Comment thread
claude[bot] marked this conversation as resolved.
qwen3.5-fp4-mi355x-sglang-agentic-mtp:
image: lmsysorg/sglang-rocm:v0.5.17-rocm720-mi35x-20260811
model: amd/Qwen3.5-397B-A17B-MXFP4
Expand Down