Skip to content

[CI][Bugfix] Fix CI failures for "PyTorch Compilation Unit Tests"#41940

Merged
vllm-bot merged 1 commit intovllm-project:mainfrom
haosdent:bugfix/always-hit-shape-env-var-to-hint-override
May 8, 2026
Merged

[CI][Bugfix] Fix CI failures for "PyTorch Compilation Unit Tests"#41940
vllm-bot merged 1 commit intovllm-project:mainfrom
haosdent:bugfix/always-hit-shape-env-var-to-hint-override

Conversation

@haosdent
Copy link
Copy Markdown
Contributor

@haosdent haosdent commented May 7, 2026

Purpose

vLLM's duck-type ShapeEnv mock AlwaysHitShapeEnv (used by the legacy
InductorAdaptor path when VLLM_USE_STANDALONE_COMPILE=0) was missing
var_to_hint_override. torch._inductor.codecache.FxGraphHashDetails
reads it unconditionally in torch>=2.11, so engine-core init raised
AttributeError and surfaced as Server exited unexpectedly in CI.

Fix: add the attribute as an empty dict, matching the real ShapeEnv default.

Failed buildkite runs (all on unrelated HEAD commits):

Related to #41423

Test Plan

Test Result

PyTorch 2.11 added a `var_to_hint_override` attribute on `ShapeEnv`,
and Inductor's `FxGraphHashDetails.__init__` now reads it
unconditionally (`torch/_inductor/codecache.py:939`). vLLM's duck-type
mock `AlwaysHitShapeEnv` (used by the legacy `InductorAdaptor` path
when `VLLM_USE_STANDALONE_COMPILE=0`) was missing this attribute,
which raised `AttributeError` during engine-core init and surfaced as
`Server exited unexpectedly` in CI.

Add the attribute as an empty dict so the cache-key code short-circuits
the override branch, matching the real `ShapeEnv` default.

Signed-off-by: haosdent <haosdent@hotmail.com>

Signed-off-by: haosdent <haosdent@gmail.com>
@mergify mergify Bot added the bug Something isn't working label May 7, 2026
@haosdent haosdent changed the title [WIP][Bugfix] AlwaysHitShapeEnv: add var_to_hint_override for torch>=2.11 [Bugfix] AlwaysHitShapeEnv: add var_to_hint_override for torch>=2.11 May 7, 2026
Copy link
Copy Markdown
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 updates the AlwaysHitShapeEnv class in vllm/compilation/compiler_interface.py by initializing an empty var_to_hint_override dictionary. This change ensures compatibility with torch>=2.11, where FxGraphHashDetails reads this attribute to incorporate dynamic-shape hint overrides into the cache key. I have no feedback to provide as no review comments were submitted.

@haosdent haosdent marked this pull request as ready for review May 7, 2026 10:29
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@haosdent haosdent changed the title [Bugfix] AlwaysHitShapeEnv: add var_to_hint_override for torch>=2.11 [CI][Bugfix] Fix CI failures for "PyTorch Compilation Unit Test" May 7, 2026
@haosdent haosdent changed the title [CI][Bugfix] Fix CI failures for "PyTorch Compilation Unit Test" [CI][Bugfix] Fix CI failures for "PyTorch Compilation Unit Tests" May 7, 2026
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label May 7, 2026
@haosdent
Copy link
Copy Markdown
Contributor Author

haosdent commented May 7, 2026

@dzhengAP Please take a look when you are available, thank you in advance!

@ProExpertProg
Copy link
Copy Markdown
Collaborator

@haosdent failure looks related. Also do you know why we're running with standalone compile = 0?

@haosdent
Copy link
Copy Markdown
Contributor Author

haosdent commented May 7, 2026

Also do you know why we're running with standalone compile = 0?

I am not very clear about this part, in production mode, it is always 1.
I saw #38015 add this @zou3519 do you think if we should remove it?

@ProExpertProg
Copy link
Copy Markdown
Collaborator

Yeah we should remove it, but let's do that in follow-up, I think we can merge this PR.

@vllm-bot vllm-bot merged commit 57c2f72 into vllm-project:main May 8, 2026
62 of 65 checks passed
libinta pushed a commit to libinta/vllm that referenced this pull request May 8, 2026
…lm-project#41940)

Signed-off-by: haosdent <haosdent@gmail.com>
Signed-off-by: Libin Tang <libin.tang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

4 participants