-
Notifications
You must be signed in to change notification settings - Fork 243
[experimental][AgentX]: B300 deterministic AIPerf #2408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f0ff198
2ccc039
ba397f1
99f4929
c767a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| [submodule "utils/aiperf"] | ||
| path = utils/aiperf | ||
| url = https://github.com/SemiAnalysisAI/aiperf.git | ||
| branch = cquil11/aiperf-agentx-v1.0 | ||
| branch = cquil11/deterministic-agentic-warmup-count-main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1744,14 +1744,13 @@ build_replay_cmd() { | |
| # utils/aiperf/docs/tutorials/agentx-mvp.md. | ||
| local result_dir="$1" | ||
| local duration="$DURATION" | ||
| local cache_warmup_duration="${AIPERF_AGENTIC_CACHE_WARMUP_DURATION:-600}" | ||
| local warmup_requests_per_lane="${AIPERF_WARMUP_REQUESTS_PER_LANE:-10}" | ||
|
|
||
| # Fast mode is an e2e-only feedback preset used before canonical one-hour | ||
| # sweeps. AIPerf already exposes both controls, so no AIPerf patch is | ||
| # required. | ||
| if [[ "${AIPERF_EXPERIMENTAL_FAST:-0}" == "1" ]]; then | ||
| duration=1200 | ||
| cache_warmup_duration=300 | ||
| fi | ||
|
|
||
| export AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES="${AIPERF_DATASET_WEKA_LIVE_ASSISTANT_RESPONSES:-0}" | ||
|
Comment on lines
1744
to
1756
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Fast mode ( Extended reasoning...What changed and what broke: if [[ "${AIPERF_EXPERIMENTAL_FAST:-0}" == "1" ]]; then
duration=1200
cache_warmup_duration=300 # <-- halved from the 600s default
fiAfter the PR, only if [[ "${AIPERF_EXPERIMENTAL_FAST:-0}" == "1" ]]; then
duration=1200
fiStep-by-step proof:
Why nothing catches this: there's no test or assertion tying fast-mode env vars to a proportional warmup reduction; it was purely convention in the old code. Documentation impact: AGENTS.md:122 still reads: "This selects a 5-minute cache warmup and 20-minute profile for every AgentX job... canonical AgentX timing remains a 10-minute cache warmup and 1-hour profile." That text describes the removed Fix options: (a) add an explicit fast-mode override, e.g. This is a defensible, low-risk change on its own (10 request-per-lane warmup with no idle delay is already fast), so nothing crashes or produces incorrect benchmark data — it's a silent behavior change to an experimental fast-mode preset plus a stale doc, not a functional regression. |
||
|
|
@@ -1765,6 +1764,9 @@ build_replay_cmd() { | |
| # aiperf validates that SERVICE_PROFILE_CONFIGURE_TIMEOUT >= | ||
| # DATASET_CONFIGURATION_TIMEOUT at startup. Bump it in lockstep. | ||
| export AIPERF_SERVICE_PROFILE_CONFIGURE_TIMEOUT=1800 | ||
| # Headless realtime metrics are opt-in on current AIPerf main. Enable the | ||
| # rolling TTFT/ITL/throughput block and emit it every 30 seconds. | ||
| export AIPERF_UI_REALTIME_METRICS_ENABLED=true | ||
| REPLAY_CMD="$AIPERF_CLI profile --scenario inferencex-agentx-mvp" | ||
| REPLAY_CMD+=" --url http://localhost:$PORT" | ||
| REPLAY_CMD+=" --endpoint /v1/chat/completions" | ||
|
|
@@ -1773,6 +1775,7 @@ build_replay_cmd() { | |
| REPLAY_CMD+=" --model $MODEL" | ||
| REPLAY_CMD+=" --concurrency $CONC" | ||
| REPLAY_CMD+=" --benchmark-duration $duration" | ||
| REPLAY_CMD+=" --stats-interval 30" | ||
| REPLAY_CMD+=" --random-seed 42" | ||
| # Fail runs once more than 10% of requests error. This keeps known | ||
| # transient low-rate failures from killing long sweeps while still | ||
|
|
@@ -1784,10 +1787,11 @@ build_replay_cmd() { | |
| # least one profile turn after warmup. | ||
| REPLAY_CMD+=" --trajectory-start-min-ratio 0.25" | ||
| REPLAY_CMD+=" --trajectory-start-max-ratio 0.75" | ||
| # After the normal t* snapshot warmup, continue those exact trajectories | ||
| # with one-token outputs and no idle delays. Profiling begins only after | ||
| # those requests drain and resumes from the resulting live state. | ||
| REPLAY_CMD+=" --agentic-cache-warmup-duration $cache_warmup_duration" | ||
| # After the normal t* snapshot warmup, advance every trajectory lane by | ||
| # the same deterministic number of one-token requests with no idle delay. | ||
| # Profiling begins after those requests drain and resumes from the | ||
| # resulting live state. | ||
| REPLAY_CMD+=" --warmup-requests-per-lane $warmup_requests_per_lane" | ||
| # Give long-context warmup requests up to 30 minutes to drain before | ||
| # declaring warmup failed. Recipes whose saturation arms carry a larger | ||
| # in-flight working set may override via AGENTIC_WARMUP_GRACE_PERIOD | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 The AIPerf warmup rename (
AIPERF_AGENTIC_CACHE_WARMUP_DURATION→AIPERF_WARMUP_REQUESTS_PER_LANE) inbuild_replay_cmd()isn't propagated to its consumers: the 4 GB300 DeepSeek-V4 agentic recipe YAMLs (disagg-gb300-1p1d-dep4-dep8-c128-mtp-agentic.yaml:201, agg-gb300-tp8-mtp-agentic.yaml:147, agg-gb300-tp4-mtp-agentic.yaml:144, disagg-gb300-1p1d-dep8-dep8-c384-mtp-agentic.yaml:202) still set the now-deadAIPERF_AGENTIC_CACHE_WARMUP_DURATION: "600", andbenchmarks/multi_node/amd_utils/server_sglang.sh:989still forwards that dead var into the client container instead of the newAIPERF_WARMUP_REQUESTS_PER_LANE. Nothing crashes since those recipes just fall back to the new default (10 requests/lane), but the stale env vars are misleading and worth cleaning up, and AMD multi-node runs currently have no way to override the new knob via that allowlist.Extended reasoning...
build_replay_cmd()inbenchmarks/benchmark_lib.sh(used by every agentic recipe, including the 4 GB300 DeepSeek-V4 ones despite the PR's 'B300-only' framing) is changed to readAIPERF_WARMUP_REQUESTS_PER_LANE(default 10) and emit--warmup-requests-per-lane, replacing the oldAIPERF_AGENTIC_CACHE_WARMUP_DURATION(default 600) /--agentic-cache-warmup-durationpath entirely. That is exactly the intended behavior change described in the PR summary, so this itself isn't a bug — but two consumers of the old var were left un-migrated.Step-by-step proof:
disagg-gb300-1p1d-dep4-dep8-c128-mtp-agentic.yaml:201(and the other 3 GB300 agentic recipes) setAIPERF_AGENTIC_CACHE_WARMUP_DURATION: "600"in their env, whichbuild_replay_cmd()read via${AIPERF_AGENTIC_CACHE_WARMUP_DURATION:-600}and passed as--agentic-cache-warmup-duration 600.build_replay_cmd()no longer references that var at all — grep confirms zero remaining reads inbenchmark_lib.sh. The recipe'sAIPERF_AGENTIC_CACHE_WARMUP_DURATION: "600"setting becomes a silent no-op: it's still exported into the environment but nothing consumes it.build_replay_cmd()now readsAIPERF_WARMUP_REQUESTS_PER_LANE, which none of these 4 YAMLs set, so they silently pick up the new default of10requests/lane via${AIPERF_WARMUP_REQUESTS_PER_LANE:-10}.benchmarks/multi_node/amd_utils/server_sglang.sh:989forwardsAIPERF_AGENTIC_CACHE_WARMUP_DURATION(now dead) into the client container's env allowlist, but does not forwardAIPERF_WARMUP_REQUESTS_PER_LANE. So even if an AMD multi-node recipe wanted to override the new per-lane count, there's currently no path for that override to reach the client container.Existing code doesn't catch this because there's no validation that env vars referenced in recipe YAMLs are actually consumed anywhere — a renamed/removed var is simply silently ignored rather than erroring, and the env-forward allowlist is a static list that has to be manually kept in sync with whatever knobs
build_replay_cmd()currently exposes.Impact is limited: because the old default was also
600s (i.e., these recipes were never overriding the default, just re-stating it), no customized behavior is actually being lost — they're just moving to the new mechanism's default like every other agentic recipe would after this PR merges, which is the PR's intended outcome. Nothing errors or crashes. The concrete cost is (a) 4 lines of dead/misleading config in production recipe YAMLs that should be updated or removed, and (b) a gap in the AMD env-forward allowlist that blocks overriding the new knob for multi-node AMD runs until it's added.Fix: replace
AIPERF_AGENTIC_CACHE_WARMUP_DURATION: "600"with the equivalentAIPERF_WARMUP_REQUESTS_PER_LANEsetting (if a non-default value is actually desired) or drop the stale key entirely in the 4 YAMLs, and swap the forwarded var name atserver_sglang.sh:989fromAIPERF_AGENTIC_CACHE_WARMUP_DURATIONtoAIPERF_WARMUP_REQUESTS_PER_LANE.