Repository navigation
[rollout, vllm] fix: keep vLLM compile mode working under full_determinism - #8366
Open
flyingdoubleG wants to merge 1 commit into
Open
flyingdoubleG wants to merge 1 commit into
flyingdoubleG wants to merge 1 commit into
Conversation
…inism full_determinism calls torch.use_deterministic_algorithms(True), which also puts Inductor in deterministic mode. vLLM < 0.32 enables combo-kernel benchmarking on torch >= 2.9, which Inductor then refuses, so the vLLM engine fails to start unless enforce_eager=True. Disable combo-kernel benchmarking (keeping combo kernels) when full_determinism is on, matching vllm-project/vllm#59074; user-provided combo kernel settings are kept. Co-authored-by: Claude
flyingdoubleG
requested review from
HollowMan6,
PeterSH6 and
wuxibin89
as code owners
October 25, 2026 12:31
Contributor
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.
What does this PR do?
actor_rollout_ref.rollout.full_determinism=truedoes not work with the default vLLM compile mode on the pinned stack (vllm 0.29.0, torch 2.13). The vLLM engine fails during startup:Cause:
enable_full_determinism()runs in the vLLM server and callstorch.use_deterministic_algorithms(True). That call also setstorch._inductor.config.deterministic = True.inductor_compile_config["benchmark_combo_kernel"] = Trueunconditionally on torch >= 2.9, sotorch.compileof the model aborts.vLLM fixed this upstream in vllm-project/vllm#59074, which turns off combo-kernel benchmarking in deterministic mode. That fix first ships in v0.32.0, so 0.29 (pinned) and 0.30 (#8072) are both affected. The determinism tests in this repo all set
enforce_eager=true, so CI does not exercise the compile path. The setup indocs/advance/determinism.mddoes not mentionenforce_eager, so users following it hit the crash.Fix: when
full_determinismis on, the vLLM server setscombo_kernels=True, benchmark_combo_kernel=Falseincompilation_config.inductor_compile_config, the same values vLLM >= 0.32 chooses itself. If the user already set either key throughengine_kwargs.vllm.compilation_config, it is left alone. Nothing changes whenfull_determinismis off.Not a duplicate: I searched issues and PRs for
full_determinism,deterministic mode of Inductorandbenchmark_combo_kernel. The open ones (#7667, #8026) cover routing and actor-side batch invariance, not this startup failure.Checklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI)Test
CPU tests:
tests/workers/rollout/test_vllm_cli_args_on_cpu.pygainsTestApplyDeterministicInductorDefaults, which covers the defaults, preserving other inductor options, and user settings winning.GPU runs: 1x RTX 4090, main @ 3c6d9b4, vllm 0.29.0, torch 2.13. Qwen3-0.6B, GSM8K GRPO, batch 32 × n=4, 2 steps, following the setup in
docs/advance/determinism.md:rollout.full_determinism=true,trainer.use_v1=false, and actor/reffsdp_config.full_determinism=true. Each config ran twice; the values below are step 1 / step 2.critic/score/meanresponse_length/meanrollout_probs_diff_meanenforce_eager=trueThe V1 trainer fails the same way. Its separate reproducibility limitations are already documented.
Design & Code Changes
verl/workers/rollout/vllm_rollout/utils.py: newapply_deterministic_inductor_defaults(compilation_config).verl/workers/rollout/vllm_rollout/vllm_async_server.py: call it while buildingcompilation_configwhenconfig.full_determinismis set.Once verl moves to vLLM >= 0.32, the helper is a no-op in effect, since vLLM picks the same values, and it can be removed.
Checklist Before Submitting
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=alwaystests/workers/rollout/test_vllm_cli_args_on_cpu.py(runs in the vLLM workflow).ci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group (飞书群).)AI assistance: This PR was prepared with AI assistance (Claude), which helped find the failure during GPU config sweeps, trace it to vLLM's combo-kernel defaults, write the fix and tests, and run the commands above.