Repository navigation
perf(tests): enable vLLM CUDA graphs in eight eager nightly recipes - #4569
Conversation
70ebabe to
aee4ef3
Compare
|
/ok to test aee4ef3 |
|
/ok to test 6670519 |
yuki-97
left a comment
There was a problem hiding this comment.
Moving the eager nightly recipes onto vLLM CUDA graphs cuts generation time per step by roughly half or more, a clear win for nightly GPU-hours.
Great to see the eager / PIECEWISE / FULL_AND_PIECEWISE A/B posted per recipe, with the graph mode picked by that A/B rather than one blanket setting, and the same-release Nano eager control reported with its tail spikes: each recipe's effect can be read off clearly.
Scope: the recipe YAMLs and their test scripts, the nightly GPU-hours bound test, and the CI platform-selection change (workflow, cicd skill, new unit test).
Checked:
- Effective config sweep — loading every recipe before and after the PR changes only the 13 intended recipes (the two
tqchildren included), and the TRT-LLM children keep their effective vLLM config. - Per-recipe graph mode — FULL_AND_PIECEWISE vs PIECEWISE chosen by A/B, and gspo's
backend: eagermatches the deepscaler sibling. - Time budgets — the new
NUM_MINUTESvalues are 1.8-2.2x the measured wall andcheckpoint_must_save_bysits 15 minutes under them. - The mmpr tp8ep16 child's
fuse_allreduce_rms: trueequals vLLM's default for TP > 1 on Hopper/Blackwell (vllm/config/vllm.py:161), so its effective config is unchanged.
Remaining comments are on splitting the CI platform-selection change out of this PR (and whether the feature is needed at all, since CI:Lfast already runs with H100 only), the Nano tail spikes and the comment that describes them, and re-checking the nightly GPU-hours bound. The long recipe comments and the note in the mmpr tp8ep16 recipe are nits, not blocking merging.
|
/ok to test 17ea2d2 |
|
/ok to test 39ba4ff |
These recipes ran vLLM with enforce_eager: true. On cw_dfw H100 that left
generation launch-bound for decode-tail-bound GRPO/DAPO steps. Same-window
A/Bs (frozen container, identical code) show generation per step down
48-85% and nightly wall time down 15-66%. The tests' own check_metrics gates
pass, and token_mult_prob_error and gen_kl_error stay at their eager levels.
The graph mode per recipe is whichever arm won the A/B:
- vLLM default FULL_AND_PIECEWISE: qwen3-8b-nvfp4-w4a16, qwen3.5-35b-a3b cp2,
gemma4-e4b, and the three Nemotron-Omni recipes. The omni recipes keep
fuse_allreduce_rms: false, as tested.
- PIECEWISE:
- dapo-nanov3.5-30BA3B: FULL_AND_PIECEWISE was no faster and failed
check_metrics with a step-20 token_mult_prob_error spike.
- qwen3-30b-a3b-32k: FULL_AND_PIECEWISE was 3% faster but added a
token_mult_prob_error spike.
- qwen3.5 -fp8 child: FULL graphs left fewer Mamba cache blocks than
max_num_seqs, so vLLM failed at startup.
- FULL_AND_PIECEWISE with compilation_config.backend: eager: gspo-deepscaler-
1.5b-8K. Inductor kernels failed its gen_kl_error gate; backend eager
matches the grpo-deepscaler recipes.
Child recipes:
- gspo -tq_simple and omni clevr -tq_mooncake inherit their parent's change
and were A/B tested themselves.
- The two GB200 qwen3.5 trtllm children and omni mmpr megatron-tp8ep16 already
ran graphs. Their now-redundant enforce_eager: false is dropped, and
mmpr-tp8ep16 pins fuse_allreduce_rms: true (the H100 default). Their
effective vLLM config is unchanged.
NUM_MINUTES is lowered to about 1.5-2x the measured wall time, along with
checkpoint_must_save_by where the recipe sets it. The nightly GPU-hour total
goes from 4789 to 4529.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Jonas Yang <[email protected]>
Signed-off-by: fujial <[email protected]>
39ba4ff to
bb11e55
Compare
|
/ok to test bb11e55 |
Signed-off-by: fujial <[email protected]>
|
/ok to test 31399f7 |
…) (#4787) Signed-off-by: Jonas Yang <[email protected]> Signed-off-by: fujial <[email protected]> Co-authored-by: Jonas Yang CN <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
What does this PR do?
Turns on vLLM CUDA graphs in eight nightly recipes that ran with
enforce_eager: true, with corresponding time-budget reductions and child-config cleanup. Nano 3.5 is excluded from this PR: its recipe and driver are restored exactly tor0.8.0(eager mode, 240-minute runtime budget, and 03:45:00 checkpoint deadline). Its numerical-error investigation remains in #4777.The current configured H100 nightly budget is 4613 GPU-hours, with a 4633 budget-test limit (20 GPU-hours of headroom). The other recipe optimizations are unchanged. The original measurements below include the since-withdrawn Nano optimization and refer to historical snapshots; their totals are not the current PR budget.
Why
These are decode-tail-bound GRPO/DAPO tests: the longest response hits
max_new_tokenson almost every step, and generation is 45–98% of step time. Eager mode makes every decode step pay full kernel-launch overhead. Each recipe was diagnosed and A/B-tested following therollout-perfskill (#4556).Original main-based evidence
Historical scope before Nano withdrawal. Nano rows below are retained as investigation evidence only; its CUDA-graph optimization is not shipped by this PR.
Setup: same-window A/B on cw_dfw, 8×H100 per node. All arms used one frozen nightly container (
rl.71856875.sqsh, vLLM 0.29) and the identical CI code snapshot. Arms differ only in the vLLM override.Gates in the original nightly A/B above: every shipped arm passed the test's own
check_metrics. The original measurements reported eager-leveltoken_mult_prob_errorandgen_kl_error. The later r0.8.0 rerun below found large intermediate Nano probability-error spikes despite passing its native gates; the original statement should not be read as a general numerical-stability guarantee.grpo-qwen3.5-35ba3b-2n8g-megatron-ep16tp2-fp8vlm_grpo-nemotron-omni-30ba3b-clevr-2n8g-megatron-tp8ep8.v1grpo-qwen3.5-35ba3b-2n8g-megatron-ep16tp2cp2grpo-qwen3-8b-base-dapo-2n8g-long-megatron-qa-nvfp4-w4a16grpo-math-qwen3-30ba3b-megatron-tp4-32kvlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1dapo-nanov3.5-30BA3B-4n8g-automodelvlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v2vlm_grpo-gemma4-e4b-geo3k-1n8g-automodelgrpo-gspo-deepscaler-1.5b-8Kbackend: eagerHow the graph mode was chosen
Every test had an eager arm, a PIECEWISE arm and a vLLM-default FULL_AND_PIECEWISE arm. PIECEWISE-only was a workaround for the vLLM 0.20 FULL-graph accuracy bug, so on vLLM 0.29 the mode was picked per test by A/B:
dapo-nanov3.5: same speed, but the FULL_AND_PIECEWISE arm failedcheck_metricswith a step-20token_mult_prob_errorof 6.5e9 (spikes on 6/20 steps, against 1/20).qwen3-30b-32k: FULL_AND_PIECEWISE was 3% faster but added a step-1 spike (1.30).-fp8child: FULL graphs left 833 Mamba cache blocks formax_num_seqs1024, so vLLM failed at startup.token_mult_prob_errorfrom 1.013 to 1.040 and failed thegen_kl_errorgate (0.00063 > 0.0005).backend: eagerkeeps vLLM's custom kernels under graphs and holds the eager-level 1.013 / 0.00044. This matchesgrpo-deepscaler-1.5b-*.Child recipes
-tq_simpleand omni clevr-tq_mooncakeinherit their parent's change and were A/B-tested themselves.-tq_simple(backend: eager): 129 → 67 s per step, 226 → 135 min.-tq_mooncake(FULL_AND_PIECEWISE): 174 → 29 s per step, 60 → 30 min.token_mult_prob_error/gen_kl_errorstay at their eager levels.grpo-qwen3.5-35ba3b-6n4g-async-1off-bf16-trtllm,grpo-qwen3.5-35ba3b-4n4g-megatron-ep16tp2-mxfp8-trtllm(GB200) andvlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-megatron-tp8ep16.v1.enforce_eager: falseis removed; minimize-check rejects it once the parent no longer setstrue.mmpr-tp8ep16pinsfuse_allreduce_rms: true, the H100 default, so it does not inherit its parent'sfalse.nemo_rl.utils.config.load_configthat their effective vLLM config is unchanged.Original main-based validation
tools/config_cli.py minimize-check examples/configs/recipes/{llm,vlm}/*.yamlpasses.load_configon all 15 affected recipes, compared withmain:vllm_cfgdiffers only inenforce_eager(True → False).vllm_kwargs.compilation_configequals what the winning arm ran.vllm_cfgbecame null.'cudagraph_mode': <CUDAGraphMode.…>andCapturing CUDA graphs (…)lines.DRYRUN=1 tools/launchnightly total drops from 4789 to 4529.NUM_MINUTESkeeps at least a 1.5× margin over the measured wall time (1.8–2.2× for every lowered value).vllm_cfg:that would have loaded as null;Current release scope and validation
r0.8.0; current PR commit:31399f7aac74b8010827c451f7e53c44bd70245a; release base:b0617dab12f58a48b8a1a57e60e9e0db53d3e194.examples/configs/recipes/llm/dapo-nanov3.5-30BA3B-4n8g-automodel-ep8.yamland its matching shell driver are byte-for-byte identical to the release base, includingenforce_eager: true,NUM_MINUTES=240, andcheckpoint_must_save_by: 00:03:45:00. No PIECEWISE or fusion override is introduced for Nano.bb11e5513f555b1e7e9c45cf49b48b63f0439edf. The net PR diff now contains those 19 files plus the nightly-budget unit test. No training metric threshold was changed.git diff --checkpassed. Both restored Nano files match the release base exactly.CI:Lfast. Final-commit CI passed on attempt 1: run 39205885113 completed successfully on31399f7aac74b8010827c451f7e53c44bd70245a. All 27 unit-test jobs and 21 H100 fast functional jobs, documentation tests/build, lint, branch freshness, script coverage, and all three coverage reports passed. The required CI quality check passed and was verified via the PR required checks. No retries or further code changes were needed. This is the existingFAST=1subset, not a full nightly rerun; no GB200 GPU tests were run.test_nightly_compute_stays_below_4633_hours, with the actual nightly allocation total 4613. The Other unit-test job completed with 4546 passed, 368 skipped, and 2 deselected.Prior CI result before Nano withdrawal (October 19, 2026)
Run 39195619932 passed on attempt 1 for prior commit
bb11e5513f555b1e7e9c45cf49b48b63f0439edf: all 27 unit-test jobs and 21 H100 fast functional jobs, documentation, lint, freshness, script coverage and coverage reports passed, including the required CI quality check. That revision still included Nano's PIECEWISE optimization and used budget 4549 / 4569.CI:Lfastuses the existingFAST=1subset and skips some full-training subtests; successful job counts do not imply full L1 or nightly coverage. GB200 GPU tests were not run by this tier. Release base:b0617dab12f58a48b8a1a57e60e9e0db53d3e194; test merge:df10fd54c5c42b8dea4b0b0a677532c6ad0640ba. The completed AutoModel job recorded the reused release image digestsha256:9fc74355741229e239480e712901b3e956541db072c3052cd45f78cdcf56d11b.Historical release integration and CI (October 15, 2026)
r0.8.0.6670519df7de945e194be6a6c15e12fb916ea8d1, containing the recipe commitaee4ef3e0f66545c8924ecdc61b6adedfc2aa40aand a CI platform-selection fix, on release commita3ba27a28f455e939ffbb75f0270d2daf6fc912a.-automodel-ep8and the PR's reduced checkpoint deadline.aee4ef3epassed on attempt 2: all 27 unit-test groups and 21 H100 functional groups, documentation, lint and that run's quality gate succeeded. The run usedtest_to_run=L2andtest_platform=h100; only PPO_1 and Megatron_3 were retried, retaining the original successful results. No training code or metric thresholds were changed for the retries. This matrix is not a rerun of every historical nightly recipe below; GB200 validation remains separate.6670519df7de945e194be6a6c15e12fb916ea8d1completed successfully. All 27/27 unit-test groups and 21/21 H100 functional groups, documentation tests/build, lint, script-coverage checks, and coverage-report jobs passed. The required CI quality check passed and is reported bygh pr checks --required. GB200 GPU build/tests were skipped as intended. This CI matrix does not rerun every historical nightly recipe below.L1andh100, with release basea3ba27a28f455e939ffbb75f0270d2daf6fc912aand merge candidate9e0f3a88096c3ad36cb738ebe4c61f6fb306ea91(same code tree as the PR head). H100 image:766267172432.dkr.ecr.us-east-1.amazonaws.com/rl:38720249750, digestsha256:af7404071a1d992020cffd23c7375e4f11147654ac2aec27b351075f1d57aba4. That run used the since-revertedCI-platform:h100support to select H100 while retainingCI:L1. All 12 new platform-selection regression tests passed in formal CI, in addition to local tests and Ruff checks. Historical entry-point distinction:workflow_dispatchjob checks are not eligible required PR checks (GitHub documentation).r0.8.0had advanced to3dc075c389cd5c4049e4f14508987338b7c1d868, adding fix(nightly): make dpo-nanov3-30B3AB-1n8g-automodel-ep8.v2 deterministic #4619 (1678c667) and docs: make NeMo Gym the primary evaluation path #4687 (3dc075c3) after the tested base. This rerun retained the original PR-info snapshot and testeda3ba27, not those later release commits. At that audit the PR was conflict-free and two release commits behind, within the workflow's 10-commit freshness limit.ppo_non_colocated.shcompleted both training steps and passed its other 10 checks, butmax(train/critic/grad_norm)was 368.7537, above the unchanged 350 bound. The same test passed at 188.8472 on the exact release parent in release CI; its maximum rollout probability-error metric was identical (1.02363336) in both runs. This PR does not change the PPO implementation, default config, functional tests, or dependencies. Critic numerical variation is a hypothesis, not an established root cause. The single bounded retry passed: both PPO subtests completed, and all 11 non-colocated checks passed, with maximum critic gradient norm 40.6437 < 350 and maximum rollout probability error 1.02363336. The container digest matches attempt 1 (sha256:6829e4b4e1494fb708466afefb6022a6c1680e603298fefdeaed1dcfb249cbf3). The initial failure did not reproduce; this demonstrates run-to-run critic variation, not a root-cause fix. No code or threshold was changed.sft_megatron.shprinted its initial validation result and the start of epoch 1, followed by 85.5 minutes without further test output. The run was intentionally cancelled after approximately 110 minutes to retrieve logs; this is not a completed SFT validation. The same release-parent SFT subtest passed in 3m52s. The corresponding test and training implementation are unchanged in this PR. The bounded retry passed the full group: SFT completed in 3m44.6s, with step-3 loss 0.74016 < 0.8, and both ModelOpt rollout cases passed. Its image digest matches attempt 1. The stall did not recur; its root cause is not established.get-pr-infodoes not handleworkflow_dispatchthere (Could not determine pull request number). The linked replacement uses the same commit via the source-branch manual entry point.GB200 validation
GB200 validation was run in two stages. These runs validate the snapshots named below; they predate the current release head and are not presented as tests of the current PR commit.
Original
main-based PR snapshotSource:
70ebabebad4817bf532bee4244b964d7e9080d72.grpo-qwen3.5-35ba3b-4n4g-megatron-ep16tp2-mxfp8-trtllmgen_kl_error0.002337 < 0.003; mean reward 0.557617 > 0.45; all losses finitegrpo-qwen3.5-35ba3b-6n4g-async-1off-bf16-trtllmgen_kl_error0.001081 < 0.002; max reward 0.736328 > 0.5Both jobs exited successfully. Their engine logs show
enforce_eager=False,CUDAGraphMode.FULL_AND_PIECEWISE, and successful CUDA graph capture. No OOM, NCCL error, NaN, or traceback was found.Local
r0.8.0validation rebaseSource:
25b9b39181d658b8274298295fcc9f20bfbede71, directly on release commite7ad28433bc2740b23c2667589c8a8f3b3248a31.grpo-qwen3.5-35ba3b-6n4g-async-1off-bf16-trtllmgen_kl_error0.001009 < 0.002; max reward 0.767578 > 0.5grpo-qwen3.5-35ba3b-4n4g-megatron-ep16tp2-mxfp8-trtllm(diagnostic only)MXFP8 refit does not support grouped MoE expert weightsThe 4n4g row is not a failed release recipe:
r0.8.0never contained either this recipe or its grouped-MoE MXFP8 refit dependency. For diagnosis only, the exact recipe and driver from the original PR snapshot were restored outside the rebased PR. The failure confirms the missing #3724 dependency rather than a CUDA graph regression. The current release PR therefore omits the 4n4g change; it should be restored when the release commit is cherry-picked back tomain, where #3724 is present.Historical H100 validation after local rebase to r0.8.0
Runs completed on October 12, 2026; final results audited on October 15, 2026. All 13 affected H100 recipes completed their full configured steps and passed the release-native metric gates: 12 jobs exited successfully, and one Mooncake run had a post-recipe harness error, documented below. Nano still has a numerical-stability concern despite passing those gates.
Tested source and environment
70ebabebad4817bf532bee4244b964d7e9080d72.0f6e549f88b85e0cfe86784ff91de57d7fe76313, directly onr0.8.0commite7ad28433bc2740b23c2667589c8a8f3b3248a31. These GPU results came from a separate validation checkout on the earlier release snapshot. The PR has since been updated to the newer release base and commit listed above; these results must not be treated as tests of that newer commit.rl.71311563.sqsh, vLLM 0.29.0. Release dependency manifests and submodule pins were checked against the image. Three worker class-name differences were handled with task-local environment aliases after verifying equivalent registry entries; no dependency-version check was bypassed.Recipe results
Wall times exclude queue time.
PASS*means the native recipe and an independent post-run recheck passed, but the scheduler job did not exit successfully. All listed runs finished within their configured time limits.grpo-gspo-deepscaler-1.5b-8K-tq_simplegrpo-gspo-deepscaler-1.5b-8Kgrpo-math-qwen3-30ba3b-megatron-tp4-32kgrpo-qwen3-8b-base-dapo-2n8g-long-megatron-qa-nvfp4-w4a16grpo-qwen3.5-35ba3b-2n8g-megatron-ep16tp2-fp8grpo-qwen3.5-35ba3b-2n8g-megatron-ep16tp2cp2vlm_grpo-nemotron-omni-30ba3b-clevr-2n8g-megatron-tp8ep8.v1-tq_mooncakevlm_grpo-nemotron-omni-30ba3b-clevr-2n8g-megatron-tp8ep8.v1vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-megatron-tp8ep16.v1dapo-nanov3.5-30BA3B-4n8g-automodelvlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v2vlm_grpo-gemma4-e4b-geo3k-1n8g-automodelMooncake harness exception (job
20044559): all 10 training steps and all three original metric-check rows passed. The external validation driver was edited while running and subsequently read from the wrong position, causing a command-not-found error after the recipe completed. Slurm therefore recordsFAILED, exit127:0. An independent recheck of the saved metrics confirmed the original gates and exact steps 1–10. This is recorded as recipe success with a harness failure, not a clean scheduler pass.Withdrawn Nano optimization: historical same-release eager control and numerical concern
Tracking issue: #4777 — Nano 3.5 PIECEWISE logprob-error tail spikes. The Nano optimization has been withdrawn from this PR and the release eager settings restored. The following data describes the earlier experimental configuration. The issue tracks the unresolved numerical concern; it is not a claim that the cause has been identified or fixed.
Both arms used the same release image, 4 nodes × 8 H100, and 20 steps. The control used unmodified
r0.8.0(enforce_eager=True, graph modeNONE); the rebased PR usedPIECEWISE,enforce_eager=False, andfuse_allreduce_rms=False. These settings were verified in the actual engine logs.20044958)20044563)For this release snapshot, the configured budget for these 13 recipes is 800 → 540 GPU-hours (−260, −32.5%); these are scheduler limits, not measured GPU-hour savings. The complete H100 nightly dry-run budget is 4509 GPU-hours, within the release limit of 4769. These release totals are separate from the original
mainsnapshot totals above.Notes
rollout-perfskill in docs(skills): add cross-engine rollout-perf contributor skill #4556.token_mult_prob_error1.010. This PR now introduces no Nano parent change to inherit.tests/unit/test_recipes_and_test_suites.pyis 4633, based on the measured dry-run allocation total of 4613 + 20. These are configured scheduler budgets, not measured runtime savings.🤖 Generated with Claude Code