- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
[compile] Turn standalone_compile back on #27460
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
Conversation
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.
Code Review
This pull request aims to re-enable standalone_compile by default. However, the current change only updates the default value within a TYPE_CHECKING block in vllm/envs.py, which does not affect the runtime behavior. The runtime default for VLLM_USE_STANDALONE_COMPILE is still False. I've added a critical comment to point out the necessary change to make this effective, and also noted an outdated comment that should be updated.
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.
💡 Codex Review
Lines 496 to 502 in 57869e4
| # Feature flag to enable/disable Inductor standalone compile. | |
| # In torch <= 2.7 we ignore this flag; in torch >= 2.8 this is | |
| # disabled by default. | |
| "VLLM_USE_STANDALONE_COMPILE": lambda: os.environ.get( | |
| "VLLM_USE_STANDALONE_COMPILE", "0" | |
| ) | |
| == "1", | 
Setting VLLM_USE_STANDALONE_COMPILE to True inside the TYPE_CHECKING block only affects static type checking; it does not change runtime behavior. The actual value returned by envs.VLLM_USE_STANDALONE_COMPILE still comes from the environment_variables mapping where the default is "0", so the flag remains False unless explicitly set in the environment. Consequently make_compiler will continue to pick InductorAdaptor and standalone compile stays disabled despite the intent of the commit.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
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.
💡 Codex Review
Lines 496 to 502 in 57869e4
| # Feature flag to enable/disable Inductor standalone compile. | |
| # In torch <= 2.7 we ignore this flag; in torch >= 2.8 this is | |
| # disabled by default. | |
| "VLLM_USE_STANDALONE_COMPILE": lambda: os.environ.get( | |
| "VLLM_USE_STANDALONE_COMPILE", "0" | |
| ) | |
| == "1", | 
Setting VLLM_USE_STANDALONE_COMPILE to True inside the TYPE_CHECKING block only affects static type checking; it does not change runtime behavior. The actual value returned by envs.VLLM_USE_STANDALONE_COMPILE still comes from the environment_variables mapping where the default is "0", so the flag remains False unless explicitly set in the environment. Consequently make_compiler will continue to pick InductorAdaptor and standalone compile stays disabled despite the intent of the commit.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
We turned it off due to it having a bad interaction with gemma3n. This has now been fixed in PyTorch 2.9. Test Plan: - `vllm serve google/gemma-3n-E2B-it -tp 1` Signed-off-by: Richard Zou <zou3519@gmail.com>
57869e4    to
    b4271a4      
    Compare
  
    Signed-off-by: Richard Zou <zou3519@gmail.com>
Signed-off-by: Richard Zou <zou3519@gmail.com>
Signed-off-by: Richard Zou <zou3519@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
Signed-off-by: Richard Zou <zou3519@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
We turned it off due to it having a bad interaction with gemma3n. This has now been fixed in PyTorch 2.9.
Closes #24547
Test Plan:
vllm serve google/gemma-3n-E2B-it -tp 1