Skip to content

Commit 9e950fa

Browse files
committed
Merge remote-tracking branch 'origin/main' into agentx/dsv4-v300-vllm-mtp
2 parents 7b940f8 + a141bfc commit 9e950fa

38 files changed

Lines changed: 3132 additions & 443 deletions

.github/workflows/collectivex-sweep.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
description: Keep only shards whose expert-parallel degree is in this comma-list (8 keeps EP8 only, dropping EP16 so GB SKUs co-schedule with 8-GPU SKUs; blank = all)
2424
type: string
2525
default: ''
26+
modes:
27+
description: "Keep only shards in this comma-list of modes (normal, low-latency); low-latency is a decode-only EP8 addition; blank = all"
28+
type: string
29+
default: ''
2630
concurrency:
2731
group: cx-${{ github.ref }}-${{ inputs.backend }}-${{ inputs.only_sku }}
2832
cancel-in-progress: false
@@ -44,12 +48,14 @@ jobs:
4448
INPUT_ONLY_SKU: ${{ inputs.only_sku }}
4549
INPUT_EXCLUDE_SKUS: ${{ inputs.exclude_skus }}
4650
INPUT_EP_SIZES: ${{ inputs.ep_sizes }}
51+
INPUT_MODES: ${{ inputs.modes }}
4752
run: |
4853
set -euo pipefail
4954
args=(--backend "$INPUT_BACKEND")
5055
[ -n "$INPUT_ONLY_SKU" ] && args+=(--only-sku "$INPUT_ONLY_SKU")
5156
[ -n "$INPUT_EXCLUDE_SKUS" ] && args+=(--exclude-skus "$INPUT_EXCLUDE_SKUS")
5257
[ -n "$INPUT_EP_SIZES" ] && args+=(--ep-sizes "$INPUT_EP_SIZES")
58+
[ -n "$INPUT_MODES" ] && args+=(--modes "$INPUT_MODES")
5359
python3 sweep_matrix.py "${args[@]}" --out matrix_full.json >/dev/null
5460
python3 - "$GITHUB_OUTPUT" <<'PY'
5561
import json
@@ -94,10 +100,10 @@ jobs:
94100
COLLX_SHARD_SKU: ${{ matrix.sku }}
95101
COLLECTIVEX_CANONICAL_GHA: '1'
96102
COLLECTIVEX_SOURCE_SHA: ${{ github.sha }}
97-
# Consolidated shards run one bounded build-group in one Slurm allocation.
98-
# MI300X's compute partition has a 180-minute ceiling; the other production
99-
# pools accept 300 minutes. Allocations release as soon as the shard finishes.
100-
COLLX_TIME: ${{ matrix.sku == 'mi300x' && '180' || '300' }}
103+
# Consolidated shards run one bounded build-group in one Slurm allocation;
104+
# every production pool accepts 300 minutes. Allocations release as soon as
105+
# the shard finishes.
106+
COLLX_TIME: '300'
101107
COLLECTIVEX_EXECUTION_ID: ${{ github.run_id }}_${{ github.run_attempt }}_${{ matrix.id }}
102108
COLLX_JOB_PARENT: ${{ matrix.launcher == 'mi-amds' && format('/tmp/inferencex-collectivex-parent-{0}-{1}-{2}', github.run_id, github.run_attempt, matrix.id) || '/tmp' }}
103109
COLLX_JOB_ROOT: ${{ matrix.launcher == 'mi-amds' && format('/tmp/inferencex-collectivex-parent-{0}-{1}-{2}/inferencex-collectivex-{0}-{1}-{2}', github.run_id, github.run_attempt, matrix.id) || format('/tmp/inferencex-collectivex-{0}-{1}-{2}', github.run_id, github.run_attempt, matrix.id) }}

.github/workflows/run-sweep.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ jobs:
581581
kv-offloading: ${{ matrix.config.kv-offloading }}
582582
kv-offload-backend: ${{ matrix.config['kv-offload-backend'].name }}
583583
kv-offload-backend-metadata: ${{ matrix.config['kv-offload-backend'] && toJson(matrix.config['kv-offload-backend']) || '' }}
584+
total-cpu-dram-gb: ${{ matrix.config['total-cpu-dram-gb'] }}
584585
duration: ${{ matrix.config.duration }}
585586
run-eval: false
586587
scenario-type: agentic-coding

benchmarks/benchmark_lib.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ resolve_trace_source() {
16601660
# WEKA_LOADER_OVERRIDE.
16611661
local default_loader
16621662
case "${MODEL_PREFIX:-}" in
1663-
dsv4*|minimaxm3*)
1663+
dsv4*|glm5.2*|minimaxm3*)
16641664
default_loader="semianalysis_cc_traces_weka_062126"
16651665
;;
16661666
*)
@@ -1780,8 +1780,11 @@ build_replay_cmd() {
17801780
# only after those requests drain and resumes from the resulting live state.
17811781
REPLAY_CMD+=" --agentic-cache-warmup-duration 600"
17821782
# Give long-context warmup requests up to 30 minutes to drain before
1783+
# declaring warmup failed. Recipes whose saturation arms carry a larger
1784+
# in-flight working set may override via AGENTIC_WARMUP_GRACE_PERIOD
1785+
# (grace is a maximum wait, not a fixed sleep — drain exits when done).
17831786
# cancelling any remaining requests and starting profiling.
1784-
REPLAY_CMD+=" --warmup-grace-period 1800"
1787+
REPLAY_CMD+=" --warmup-grace-period ${AGENTIC_WARMUP_GRACE_PERIOD:-1800}"
17851788
# Use server-reported usage fields (prompt_tokens / completion_tokens) for
17861789
# ISL/OSL instead of client-side tokenizer.encode(). Auto-enables
17871790
# stream_options.include_usage on the OpenAI chat endpoint. Skips the
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/usr/bin/env bash
2+
3+
# Agentic trace-replay recipe for a disaggregated SGLang server on MI355X
4+
# (DeepSeek-V4-Pro FP4, 1P1D TP8).
5+
#
6+
# CI-style sibling of dsr1_fp4_mi355x_sglang-disagg.sh: driven entirely by
7+
# environment variables and submits a SLURM job via submit.sh. The agentic /
8+
# HiCache-offload configuration mirrors the DSR1 recipe but uses DSV4-Pro
9+
# specific flags (dsv4 attention backend, page-size 256, SWA settings).
10+
11+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12+
source "$SCRIPT_DIR/../../benchmark_lib.sh"
13+
14+
check_env_vars \
15+
CONC_LIST \
16+
ISL \
17+
OSL \
18+
IMAGE \
19+
SPEC_DECODING \
20+
MODEL_PATH \
21+
PREFILL_NUM_WORKERS \
22+
PREFILL_TP \
23+
PREFILL_EP \
24+
PREFILL_DP_ATTN \
25+
DECODE_NUM_WORKERS \
26+
DECODE_TP \
27+
DECODE_EP \
28+
DECODE_DP_ATTN \
29+
PREFILL_NODES \
30+
DECODE_NODES \
31+
RANDOM_RANGE_RATIO \
32+
DURATION \
33+
KV_OFFLOADING \
34+
IS_AGENTIC \
35+
FRAMEWORK
36+
37+
if [[ -n "$SLURM_JOB_ID" ]]; then
38+
echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME"
39+
fi
40+
41+
set -x
42+
43+
# Use upstreamed multi_node scripts (no external clone needed)
44+
cd "$GITHUB_WORKSPACE/benchmarks/multi_node/amd_utils" || exit 1
45+
46+
# Set up SGL launch script-specific environment variables
47+
export TIME_LIMIT="${TIME_LIMIT:-08:00:00}"
48+
export MODEL_PATH=$MODEL_PATH
49+
export MODEL_NAME=$MODEL_NAME
50+
export CONTAINER_IMAGE=$IMAGE
51+
52+
# ── Identity / result naming ──
53+
export MODEL_PREFIX="${MODEL_PREFIX:-dsv4}"
54+
export PRECISION="${PRECISION:-fp4}"
55+
export RESULT_FILENAME="${RESULT_FILENAME:-${RUNNER_NAME:-dsv4-fp4-agentic}}"
56+
57+
# ── Agentic benchmark params ──
58+
export DURATION="${DURATION:-1800}"
59+
# DSV4-Pro max model len for agentic traces (matches single-node recipe).
60+
export MAX_MODEL_LEN="${MAX_MODEL_LEN:-1000000}"
61+
62+
# ── In-tree sglang patches ──
63+
# mori_conn.py targets hybrid-state bugs (GLM-5, Qwen3.5). DSV4-Pro uses a
64+
# pure MoE/DSA architecture without hybrid state; skip to avoid interference.
65+
export MORI_CONN_PATCH="${MORI_CONN_PATCH:-skip}"
66+
67+
# ── Aiter fault mitigation ──
68+
# --disable-custom-all-reduce avoids a known aiter fault on MI355X.
69+
export DISABLE_CUSTOM_ALL_REDUCE="${DISABLE_CUSTOM_ALL_REDUCE:-0}"
70+
71+
# ── KV cache offloading (HiCache) ──
72+
# KV_OFFLOADING=none | dram (passed from YAML; default none for disagg).
73+
# KV_OFFLOAD_BACKEND selects the backend when offloading is on; this recipe
74+
# only implements HiCache, so "hicache" is the only supported value.
75+
# HICACHE_TIER: L2 -> GPU + CPU-DRAM host pool. L3 -> + Mooncake store.
76+
export KV_OFFLOADING="${KV_OFFLOADING:-none}"
77+
if [[ "$KV_OFFLOADING" != "none" ]]; then
78+
export KV_OFFLOAD_BACKEND="${KV_OFFLOAD_BACKEND:-hicache}"
79+
fi
80+
# HiCache/Mooncake tunables only matter when KV offloading is enabled.
81+
if [[ "$KV_OFFLOADING" != "none" && "${KV_OFFLOAD_BACKEND:-}" == "hicache" ]]; then
82+
export HICACHE_TIER="${HICACHE_TIER:-L2}"
83+
export HICACHE_HOST_POOL_COUNT="${HICACHE_HOST_POOL_COUNT:-1}"
84+
# DSV4 uses page-size 256 (set in models.yaml); HiCache must match.
85+
export HICACHE_PAGE_SIZE="${HICACHE_PAGE_SIZE:-256}"
86+
# HiCache ratio (host pool = ratio * GPU KV pool). Default derived in server_sglang.sh.
87+
export HICACHE_RATIO="${HICACHE_RATIO:-}"
88+
89+
# ── HiCache layout/backend by tier ──
90+
# L3 (Mooncake): page_first + direct + write_through + storage=mooncake
91+
# L2 (CPU DRAM): layer_first + direct + write_through_selective + storage=none
92+
# NOTE: write_through_selective evicts only under GPU memory pressure, avoiding
93+
# the mori RDMA race that causes GPU memory access faults with write_through.
94+
if [[ "${HICACHE_TIER^^}" == "L3" ]]; then
95+
export HICACHE_MEM_LAYOUT="${HICACHE_MEM_LAYOUT:-page_first}"
96+
export HICACHE_IO_BACKEND="${HICACHE_IO_BACKEND:-direct}"
97+
export HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through}"
98+
export HICACHE_STORAGE_BACKEND="${HICACHE_STORAGE_BACKEND:-mooncake}"
99+
else
100+
export HICACHE_MEM_LAYOUT="${HICACHE_MEM_LAYOUT:-page_first}"
101+
export HICACHE_IO_BACKEND="${HICACHE_IO_BACKEND:-direct}"
102+
export HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through}"
103+
export HICACHE_STORAGE_BACKEND="${HICACHE_STORAGE_BACKEND:-}"
104+
fi
105+
export HICACHE_PREFETCH_POLICY="${HICACHE_PREFETCH_POLICY:-best_effort}"
106+
# Shared nodes: use non-default Mooncake ports to avoid collisions.
107+
export MC_MASTER_PORT="${MC_MASTER_PORT:-58137}"
108+
export MC_METADATA_PORT="${MC_METADATA_PORT:-8080}"
109+
export MC_METRICS_PORT="${MC_METRICS_PORT:-19003}"
110+
export MC_MASTER_THREADS="${MC_MASTER_THREADS:-64}"
111+
export MC_EVICTION_HIGH_WATERMARK="${MC_EVICTION_HIGH_WATERMARK:-0.95}"
112+
export MC_PATCH_HOSTPOOL="${MC_PATCH_HOSTPOOL:-1}"
113+
export MC_PROTOCOL="${MC_PROTOCOL:-tcp}"
114+
export MC_GLOBAL_SEG="${MC_GLOBAL_SEG:-64gb}"
115+
export MC_DEVICE="${MC_DEVICE:-}"
116+
export MC_MASTER_ADDR="${MC_MASTER_ADDR:-}"
117+
export MC_METADATA_SERVER="${MC_METADATA_SERVER:-}"
118+
fi
119+
120+
# ── MoRIIO RDMA Send Queue tuning ──
121+
export MORI_IO_SQ_BACKOFF_TIMEOUT_US="${MORI_IO_SQ_BACKOFF_TIMEOUT_US:-500000}"
122+
export MORI_IO_QP_MAX_SEND_WR="${MORI_IO_QP_MAX_SEND_WR:-32768}"
123+
124+
# ── SGLang PD router policy + server metrics ──
125+
export PREFILL_ROUTER_POLICY="${PREFILL_ROUTER_POLICY:-cache_aware}"
126+
export ENABLE_METRICS="${ENABLE_METRICS:-1}"
127+
128+
# ── MTP ──
129+
export DECODE_MTP_SIZE="${DECODE_MTP_SIZE:-0}"
130+
131+
# Derive EP/DP enable flags from the topology inputs.
132+
if [[ "${PREFILL_EP:-1}" -eq 1 ]]; then
133+
export PREFILL_ENABLE_EP=false
134+
else
135+
export PREFILL_ENABLE_EP=true
136+
fi
137+
138+
if [[ "$PREFILL_DP_ATTN" == "true" ]]; then
139+
export PREFILL_ENABLE_DP=true
140+
else
141+
export PREFILL_ENABLE_DP=false
142+
fi
143+
144+
if [[ "${DECODE_EP:-1}" -eq 1 ]]; then
145+
export DECODE_ENABLE_EP=false
146+
else
147+
export DECODE_ENABLE_EP=true
148+
fi
149+
150+
if [[ "$DECODE_DP_ATTN" == "true" ]]; then
151+
export DECODE_ENABLE_DP=true
152+
else
153+
export DECODE_ENABLE_DP=false
154+
fi
155+
156+
# Launch the job. CONC_LIST is space-delimited in YAML; submit.sh wants 'x'.
157+
JOB_ID=$(bash ./submit.sh $PREFILL_NODES \
158+
$PREFILL_NUM_WORKERS \
159+
$DECODE_NODES \
160+
$DECODE_NUM_WORKERS \
161+
$ISL $OSL "${CONC_LIST// /x}" inf \
162+
${PREFILL_ENABLE_EP} ${PREFILL_ENABLE_DP} \
163+
${DECODE_ENABLE_EP} ${DECODE_ENABLE_DP} \
164+
${PREFILL_TP} ${DECODE_TP} \
165+
${RANDOM_RANGE_RATIO})
166+
167+
if [[ $? -ne 0 ]]; then
168+
echo "Failed to submit job" >&2
169+
exit 1
170+
fi
171+
172+
echo "$JOB_ID"

0 commit comments

Comments
 (0)