Skip to content

Conversation

@zou3519
Copy link
Collaborator

@zou3519 zou3519 commented Oct 24, 2025

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:

@zou3519 zou3519 requested a review from ProExpertProg October 24, 2025 06:11
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

vllm/vllm/envs.py

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",

P1 Badge Standalone compile default not re-enabled

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".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

vllm/vllm/envs.py

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",

P1 Badge Standalone compile default not re-enabled

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>
@zou3519 zou3519 force-pushed the standalone_compile_back branch from 57869e4 to b4271a4 Compare October 24, 2025 06:14
@zou3519 zou3519 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 24, 2025
@zou3519 zou3519 enabled auto-merge (squash) October 24, 2025 16:25
@zou3519 zou3519 merged commit cd390b6 into vllm-project:main Oct 24, 2025
48 checks passed
kingsmad pushed a commit to kingsmad/vllm that referenced this pull request Oct 25, 2025
Signed-off-by: Richard Zou <zou3519@gmail.com>
rohin-garg pushed a commit to rohin-garg/vllm that referenced this pull request Oct 25, 2025
Signed-off-by: Richard Zou <zou3519@gmail.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Signed-off-by: Richard Zou <zou3519@gmail.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Signed-off-by: Richard Zou <zou3519@gmail.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: torch.compile fails for Gemma3n on pytorch 2.8

2 participants