Repository navigation
[Perf] diffusion: Skip the residency calibration probe in auto mode until a planner consumes it - #45979
Merged
Conversation
…lanner consumes it Auto mode ran a full-shape warmup probe and raised the warmup to four steps to calibrate component residency, but nothing applies the result: only the measurement half (#37916) is merged, while the planner and apply PRs (#37917/#37918/#35335) are open. The probe still cost startup time and dropped the IPC/Ulysses staging buffers afterwards, which hung a 4-GPU CFG+Ulysses Cosmos3 startup on GB300. The args gate now ends with "residency planner not available", so the warmup builder emits the bounded warmup only. The planner PR flips this line when it lands. The debug residency hint no longer claims that auto applies adjustments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mickqian
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
kevin-mii,
niehen6174,
ping1jing2 and
yichiche
as code owners
October 23, 2026 05:17
Collaborator
Author
|
/tag-and-rerun-ci |
This comment has been minimized.
This comment has been minimized.
This was referenced Oct 23, 2026
Merged
This was referenced Oct 23, 2026
Merged
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#37916 (1/4 of the auto-residency stack) added warmup-calibrated residency measurement: in
--performance-mode autowith server warmup, the warmup builder raises the step count to 4 (AUTO_RESIDENCY_TIMING_STEPS) and, when the bounded warmup shape is smaller than the default request, appends a full-shape probe plus a re-warm of the bounded shape. After the probe the worker drops the IPC and Ulysses all-to-all staging buffers.Nothing consumes the result. The planner and the apply/rollback path are still open (#37917, #37918, #35335):
_auto_residency_warmup_recordsare read only to size the probe itself, andserver_warmup.auto_residency_skip_reasonhas no caller. Auto mode therefore pays for calibration on every startup:std::get: wrong index for varianton some ranks after the probe and hung the next all-to-all until the NCCL watchdog fired.The debug residency hint also told users that auto "applies safe adjustments automatically", which is not true yet.
Modifications
auto_residency_args_skip_reasonends with"residency planner not available"after every other gate passes. The warmup builder already keys the probe, the 4-step floor and the stage-timing retention on this gate, so auto mode is back to the bounded warmup that every other mode runs. The planner PR replaces this one line withreturn Nonewhen it lands, which re-enables the probe in the same PR that consumes it.do_mem_analysiskeeps only the explicit--component-residency <name>=residentadvice.Tests (
test_auto_residency.py):test_eligible_server_warmup_runs_no_probe_or_step_floor: an auto, server-warmup, CUDA video config whose bounded warmup is smaller than its 1280x720x81 default builds one warmup request at the bounded step count. On main it builds three (bounded, probe, re-warm) at 4 steps.test_fixed_loading_paths_still_calibrate_other_components,test_parallel_paths_reach_planner_gate,test_eligible_path_reaches_planner_gate) now pin the platform to CUDA and expect the planner reason, instead of accepting eitherNoneor"requires CUDA"depending on the runner. All four tests fail on main.Accuracy Tests
No numeric path changes: only warmup requests differ, and serving requests run the same code.
Speed Tests and Profiling
Cosmos3-Nano T2V on 2xH200, flagless
sglang serve --num-gpus 2(auto mode, CFG parallel), fresh server per run, rounds interleaved main / PR / main / PR:The PR's server logs contain no
auto residency probeline.Serving requests run the same code, so their latency and memory do not change.
CI and baselines
No perf or memory baseline should move. Warmup peaks are reported apart from
runtime_peak_vram_mbsince #37916, and the probe's allocator pool and staging buffers were dropped before serving anyway. Auto-mode warmup is back to what it was before #37916: the bounded shape once, at 2 steps. Video cases in the auto-mode suites start faster; theirestimated_full_test_time_sentries are now slightly high, which only affects shard balancing.Checklist
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ✅ Run #39904976567
Latest PR Test (Extra): ❌ Run #39904976538
Latest PR Test (AMD ROCm 10): ❌ Run #39904976639