Repository navigation
Conversation
Inductor can emit programmatic dependent launch (griddepcontrol) in the Triton kernels it generates, so each kernel starts while its predecessor drains. vLLM only picks this up through the TORCHINDUCTOR_ENABLE_PDL environment variable. On H200 it lowers decode TPOT by 3-4% at one request for dense Qwen3 models (BF16 and block-FP8) and by 1-3% at 32 requests, with a ~1% loss at 8 requests on the FP8 models, which is why the earlier attempt to turn it on everywhere (vllm-project#40555) stalled. Turn it on through the Inductor options (inductor_compile_config "triton.enable_pdl", part of the compile cache key) when performance_mode is 'interactivity', the vLLM Inductor backend is in use (checked after the compilation mode is resolved from the optimization level) and the GPU is SM90+ (NVML capability check, so the frontend does not initialize CUDA). An explicit inductor_compile_config value or TORCHINDUCTOR_ENABLE_PDL in the environment is left alone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Zhifeng Li <56554081+Rockyeast@users.noreply.github.com>
Rockyeast
marked this pull request as ready for review
November 1, 2026 18:26
Rockyeast
requested review from
WoosukKwon,
mgoin,
robertgshaw2-redhat and
youkaichao
as code owners
November 1, 2026 18:26
Rockyeast
requested review from
ProExpertProg,
houseroad,
tlrmchlsmth and
yewentao256
as code owners
November 1, 2026 18:26
This branch has not been deployed
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.
Overview
Inductor can emit programmatic dependent launch (
griddepcontrol.wait/launch_dependents) in the Triton kernels it generates (torch._inductor.config.triton.enable_pdl), so each generated kernel starts while its predecessor drains instead of waiting for the launch gap. vLLM currently only picks this up if the user setsTORCHINDUCTOR_ENABLE_PDL=1in the environment.#40543 discussed enabling it: the measured gain is a few percent at small batch, the concern was host overhead for prefill-heavy, high-concurrency serving, and #40555 (gate on
performance_mode == "interactivity", via the environment variable) went stale. This PR implements that gating through the Inductor options instead of the environment:VllmConfig.__post_init__setscompilation_config.inductor_compile_config["triton.enable_pdl"] = Truewhenperformance_mode == "interactivity", the vLLM Inductor backend is in use (CompilationMode.VLLM_COMPILEwith backend"inductor", checked after the mode is resolved from the optimization level) and the GPU is SM90+ (has_device_capability(90), the NVML check, so the frontend process does not initialize CUDA). An explicitinductor_compile_configvalue or aTORCHINDUCTOR_ENABLE_PDLenvironment variable (Inductor's own switch) wins.inductor_compile_configkeeps the option in the compile cache key ([Bugfix] Include inductor and functorch configs in compilation cache key #40627), so switching modes recompiles instead of reusing the other variant's kernels.balancedandthroughputare unchanged.Claims
interactivity.interactivitymode, and none for users who already setTORCHINDUCTOR_ENABLE_PDLorinductor_compile_config["triton.enable_pdl"].Validation
E2E
H200 NVL, vLLM nightly
0.33.0rc1.dev421,vllm serve <model> --max-model-len 4096 --no-enable-prefix-caching(defaultFULL_AND_PIECEWISECUDA graphs; Qwen3-8B with the SM90 skinny GEMM plans from #64979 applied in both arms),vllm bench serve --dataset-name random --random-input-len 1024 --random-output-len 256 --ignore-eos --seed 0; 32 prompts at concurrency 1, 8x the concurrency otherwise. PDL is toggled withTORCHINDUCTOR_ENABLE_PDL, which sets the same Inductor option this PR sets;VLLM_DISABLE_COMPILE_CACHE=1in both arms. Two runs per arm, interleaved on two GPUs with the GPUs swapped. Median TPOT (ms), both runs:Tests
tests/compile/test_config.py: newtest_interactivity_mode_enables_inductor_pdl(parametrized over the three modes and PDL support, with the defaultCompilationConfigso the mode is resolved from the optimization level),test_interactivity_mode_keeps_explicit_inductor_pdl,test_interactivity_mode_keeps_inductor_pdl_env,test_interactivity_mode_no_inductor_pdl_without_inductor.Details
interactivity. [Feature]: Dynamic PDL Enablement #40543: the win is at small batch (the generated norm / activation / RoPE kernels are a few microseconds each and the launch gap is a visible fraction), while PDL adds host-side cost per launch outside CUDA graphs, i.e. in the piecewise (prefill) part of a mixed step.interactivitymode already optimizes for small-batch latency (fine-grained CUDA graph sizes), so it is the right place for this default. The H200 runs above show a small loss at concurrency 8 on the FP8 models and slightly higher TTFT at concurrency 32, so a wider default is not proposed here.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
🤖 Generated with Claude Code