Skip to content

Commit c9bef91

Browse files
authored
chore(agentx): move InferenceX to upstream-based AIPerf (#2395)
Point the AIPerf submodule at SemiAnalysisAI/aiperf main after syncing with upstream and applying the global-idle barrier fix. Preserve the existing AgentX phase-start and dataset-wrap behavior explicitly, and migrate Dynamo affinity from retired nvext request controls to supported session headers and router-side TTLs. 中文:将 AIPerf 子模块切换到基于上游同步的 SemiAnalysisAI/aiperf main,并包含全局空闲上限在屏障延迟后的修复。显式保留 AgentX 阶段启动和数据集循环复用行为,同时将 Dynamo 会话亲和从已弃用的 nvext 请求控制迁移到受支持的会话请求头和路由器侧 TTL。 Signed-off-by: Cam Quilici <cjquilici@gmail.com>
1 parent de6ba0b commit c9bef91

16 files changed

Lines changed: 36 additions & 53 deletions

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "utils/aiperf"]
22
path = utils/aiperf
33
url = https://github.com/SemiAnalysisAI/aiperf.git
4-
branch = cquil11/aiperf-agentx-v1.0
4+
branch = main

benchmarks/benchmark_lib.sh

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,19 +1729,14 @@ resolve_trace_source() {
17291729
build_replay_cmd() {
17301730
# aiperf invocation for the inferencex-agentx-mvp scenario.
17311731
#
1732-
# Pre-canned assistant replay is the default: recorded assistant responses
1733-
# are used for future prompt construction, and live server responses are
1734-
# discarded. Set AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES=1 explicitly
1735-
# to use live-assistant mode, where the loader emits user-only deltas and
1736-
# the worker threads the server's live assistant response back into the
1737-
# session.
1732+
# Weka replay uses recorded assistant responses when constructing future
1733+
# prompts, preserving the captured hash-id and KV-prefix structure.
17381734
#
17391735
# The scenario plugin locks: --cache-bust first_turn_prefix and
1740-
# --trace-idle-gap-cap-seconds 10 (per-trace idle-gap compression
1741-
# against parent + subagent request-start timestamps; supersedes the
1742-
# legacy --use-think-time-only / --inter-turn-delay-cap-seconds path),
1743-
# and auto-injects them — so we do not pass them. See
1744-
# utils/aiperf/docs/tutorials/agentx-mvp.md.
1736+
# --system-idle-gap-cap-seconds 10. The global cap advances all pending
1737+
# timers only when the whole replay is idle; per-trace think times remain
1738+
# unchanged. The scenario forbids the old per-trace and per-turn delay
1739+
# caps. See utils/aiperf/docs/tutorials/agentx-mvp.md.
17451740
local result_dir="$1"
17461741
local duration="$DURATION"
17471742
local cache_warmup_duration="${AIPERF_AGENTIC_CACHE_WARMUP_DURATION:-600}"
@@ -1754,7 +1749,6 @@ build_replay_cmd() {
17541749
cache_warmup_duration=300
17551750
fi
17561751

1757-
export AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES="${AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES:-0}"
17581752
# Dataset configuration (load + reconstruct + inputs.json + mmap)
17591753
# routinely takes 4-5 min for the Weka corpus on fast /tmp
17601754
# (B300) but can stretch to 14 min on slower /tmp + parallel contention
@@ -1784,6 +1778,14 @@ build_replay_cmd() {
17841778
# least one profile turn after warmup.
17851779
REPLAY_CMD+=" --trajectory-start-min-ratio 0.25"
17861780
REPLAY_CMD+=" --trajectory-start-max-ratio 0.75"
1781+
# Preserve the existing InferenceX traffic shape when moving to upstream
1782+
# aiperf: start all configured warmup/profiling lanes immediately instead
1783+
# of spreading their first requests by the recorded offset around t*.
1784+
REPLAY_CMD+=" --burst-phase-starts"
1785+
# Filtering can leave fewer Weka roots than requested concurrency. Reuse
1786+
# roots with independent replay points and cache-bust identities, matching
1787+
# the previous fork behavior instead of failing oversubscription.
1788+
REPLAY_CMD+=" --allow-dataset-wrap"
17871789
# After the normal t* snapshot warmup, continue those exact trajectories
17881790
# with one-token outputs and no idle delays. Profiling begins only after
17891791
# those requests drain and resumes from the resulting live state.
@@ -1801,22 +1803,13 @@ build_replay_cmd() {
18011803
# CPU on minimax-m2.5 at high concurrency. Lossless for vLLM (server
18021804
# usage is authoritative).
18031805
REPLAY_CMD+=" --use-server-token-count"
1804-
# Dynamo's KV router needs an explicit conversation session binding to
1805-
# keep later turns on the prefill worker that owns their prefix blocks.
1806-
# X-Correlation-ID is useful tracing metadata but does not establish that
1807-
# binding by itself. AIPerf emits nvext.session_control bind/close actions
1808-
# keyed by the stable conversation correlation ID when this flag is set.
1809-
# Opt-out: recipes set AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING=0 to skip this.
1810-
# aiperf's conv-aware routing emits nvext.session_control, a removed POC field
1811-
# (dynamo #9920 / v1.3.0-dev) that current dynamo builds reject with a 400
1812-
# (they moved to router/routing_constraints/agent_context). Default stays on.
1813-
if [[ "${FRAMEWORK:-}" == dynamo-* && "${AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING:-1}" != "0" ]]; then
1814-
REPLAY_CMD+=" --use-dynamo-conv-aware-routing"
1815-
# The upstream 300s affinity TTL is shorter than an overloaded
1816-
# high-concurrency agentic request. Keep bindings alive across long
1817-
# prefills, generation, and capped inter-turn delay. This controls the
1818-
# router's inactivity lease; it does not relax HTTP/request failures.
1819-
REPLAY_CMD+=" --dynamo-session-timeout-seconds ${AIPERF_DYNAMO_SESSION_TIMEOUT_SECONDS:-3600}"
1806+
# Current Dynamo routers use session-affinity headers rather than the
1807+
# retired nvext.session_control request body. Stamp the stable correlation
1808+
# ID onto every root/child request; router-side TTLs live in the recipes.
1809+
# Individual recipes can explicitly disable the header.
1810+
if [[ "${FRAMEWORK:-}" == dynamo-* &&
1811+
-z "${AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID+x}" ]]; then
1812+
export AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID=true
18201813
fi
18211814
# Disable DCGM GPU telemetry collection. aiperf's GpuMetricTimeSeries
18221815
# freezes its metric schema on the first DCGM scrape, then KeyErrors when

benchmarks/multi_node/amd_utils/server_sglang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ if [ "$NODE_RANK" -eq 0 ]; then
988988
WEKA_LOADER_OVERRIDE AIPERF_FAILED_REQUEST_THRESHOLD \
989989
AIPERF_AGENTIC_CACHE_WARMUP_DURATION AIPERF_UNSAFE_OVERRIDE \
990990
AIPERF_TRAJECTORY_START_MIN_RATIO AIPERF_TRAJECTORY_START_MAX_RATIO \
991-
AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES ROUTER_PORT TQDM_MININTERVAL; do
991+
ROUTER_PORT TQDM_MININTERVAL; do
992992
if [[ -n "${!_v+x}" ]]; then
993993
_val="${!_v}"
994994
# docker --env-file requires one KEY=VALUE per line with no

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/agg-gb300-tp4-mtp-kvoffload.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,13 @@ benchmark:
139139
# in process_agentic_result.py instead. TP must match sglang_config tp-size.
140140
IS_MULTINODE: "false"
141141
TP: "4"
142-
# Enable dynamo conv-aware routing (per-session affinity so multi-turn
143-
# KV cache is reused across turns). Previously opted out because the
144-
# frontend 400'd on aiperf's nvext.session_control actions; re-enabled
145-
# to test with the current build.
146-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
142+
# Enable header-based Dynamo session affinity so multi-turn requests retain
143+
# KV locality. The retired nvext.session_control body is not used.
144+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
147145
# Container-side path of the aiperf mmap dataset cache; host-side mount
148146
# wired via launch_gb300-*.sh srtslurm.yaml default_mounts. Without it,
149147
# aiperf re-tokenizes + re-writes the dataset mmap on every run.
150148
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
151149
# Persistent HF hub cache (also via default_mounts) so the trace dataset
152150
# isn't re-downloaded each run; overrides the workflow-level HF_HUB_CACHE.
153151
HF_HUB_CACHE: "/hf_hub_cache"
154-

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/disagg-gb300-12p4d-dep8-dep16-c1024-mtp-kvoffload.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ benchmark:
206206
RESULT_DIR: /logs/agentic
207207
PORT: "8000"
208208
IS_MULTINODE: "true"
209-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
209+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
210210
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
211211
HF_HUB_CACHE: "/hf_hub_cache"
212-

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/disagg-gb300-2p1d-dep8-tp4-c8-mtp-kvoffload.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ benchmark:
205205
RESULT_DIR: /logs/agentic
206206
PORT: "8000"
207207
IS_MULTINODE: "true"
208-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
208+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
209209
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
210210
HF_HUB_CACHE: "/hf_hub_cache"
211-

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/disagg-gb300-2p4d-dep8-dep16-c256-mtp-kvoffload.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ benchmark:
206206
RESULT_DIR: /logs/agentic
207207
PORT: "8000"
208208
IS_MULTINODE: "true"
209-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
209+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
210210
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
211211
HF_HUB_CACHE: "/hf_hub_cache"
212-

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/disagg-gb300-4p4d-dep8-dep16-c256-mtp-kvoffload.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ benchmark:
206206
RESULT_DIR: /logs/agentic
207207
PORT: "8000"
208208
IS_MULTINODE: "true"
209-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
209+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
210210
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
211211
HF_HUB_CACHE: "/hf_hub_cache"
212-

benchmarks/multi_node/srt-slurm-recipes/sglang/deepseek-v4/agentic/disagg-gb300-6p4d-dep8-dep16-c512-mtp-kvoffload.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ benchmark:
206206
RESULT_DIR: /logs/agentic
207207
PORT: "8000"
208208
IS_MULTINODE: "true"
209-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "1"
209+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true"
210210
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
211211
HF_HUB_CACHE: "/hf_hub_cache"
212-

benchmarks/multi_node/srt-slurm-recipes/vllm/deepseek-v4/agentic/agg-gb300-tp4-mtp-agentic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ benchmark:
140140
RESULT_DIR: "/logs/agentic"
141141
PORT: "8000"
142142
IS_MULTINODE: "true"
143-
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "0"
143+
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "false"
144144
AIPERF_AGENTIC_CACHE_WARMUP_DURATION: "600"
145145
AIPERF_DATASET_MMAP_CACHE_DIR: "/aiperf_mmap_cache"
146146
HF_HUB_CACHE: "/hf_hub_cache"

0 commit comments

Comments
 (0)