Skip to content

[Bugfix] Fix for builtins (forward fix of pytorch/177558)#37234

Merged
zou3519 merged 5 commits intovllm-project:mainfrom
Lucaskabela:lucaskabela/monkeypatch_aot_compile_fix
Mar 31, 2026
Merged

[Bugfix] Fix for builtins (forward fix of pytorch/177558)#37234
zou3519 merged 5 commits intovllm-project:mainfrom
Lucaskabela:lucaskabela/monkeypatch_aot_compile_fix

Conversation

@Lucaskabela
Copy link
Copy Markdown
Contributor

@Lucaskabela Lucaskabela commented Mar 16, 2026

Purpose

Forward fix of pytorch/pytorch#177558

Test Plan

See #30518 - needed so that the updated unit test with transformers passes

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify Bot added the bug Something isn't working label Mar 16, 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 introduces a monkey-patch to address an issue with serializing builtins in PyTorch's AOT compilation path, which is a forward-fix of an upstream PyTorch pull request. The change adds the patch in vllm/compilation/wrapper.py and updates the pre-commit checks to allow the necessary pickle import. The patch seems correct and is defensively implemented. My main feedback is on improving the maintainability of the patch by updating a placeholder in the docstring to reference the correct upstream pull request.

Comment thread vllm/compilation/wrapper.py Outdated
@Lucaskabela Lucaskabela force-pushed the lucaskabela/monkeypatch_aot_compile_fix branch from 777c535 to c540235 Compare March 16, 2026 22:44
@Lucaskabela
Copy link
Copy Markdown
Contributor Author

cc @zhxchen17 for forward fix here

@Lucaskabela Lucaskabela force-pushed the lucaskabela/monkeypatch_aot_compile_fix branch 2 times, most recently from fec4c5a to 0317548 Compare March 19, 2026 17:07
@Lucaskabela
Copy link
Copy Markdown
Contributor Author

cc @zhxchen17 @hmellor

@Lucaskabela Lucaskabela marked this pull request as ready for review March 19, 2026 20:16
Comment thread vllm/compilation/wrapper.py Outdated
Comment thread vllm/compilation/wrapper.py Outdated
Signed-off-by: Lucas Kabela <lucaskabela@meta.com>
@Lucaskabela Lucaskabela force-pushed the lucaskabela/monkeypatch_aot_compile_fix branch from 0317548 to 160e4da Compare March 19, 2026 22:44
@Lucaskabela Lucaskabela requested a review from zou3519 March 19, 2026 22:44
Comment thread vllm/env_override.py
Comment on lines +494 to +496
# ===================================================
# torch <2.12 GraphCaptureOutput.get_runtime_env monkeypatch
# ===================================================
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do you have a test that would exercise this? Otherwise we may just silently break it in the 2.12 update

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is in @hmellor's PR which surfaced the need for this monkeypatch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tests/compile/fullgraph/test_multimodal_compile.py test with transformers backend fails without this PR's patch

Copy link
Copy Markdown
Member

@hmellor hmellor Mar 27, 2026

Choose a reason for hiding this comment

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

Looks like we have a bit of a stalemate, could we merge this first then I'll be using it in #30518?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yup let's do it

@Lucaskabela Lucaskabela requested a review from zou3519 March 25, 2026 14:50
@zou3519
Copy link
Copy Markdown
Collaborator

zou3519 commented Mar 30, 2026

cc @zhxchen17 too

@zou3519 zou3519 added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 30, 2026
@zou3519 zou3519 enabled auto-merge (squash) March 30, 2026 21:19
@zou3519 zou3519 merged commit e319150 into vllm-project:main Mar 31, 2026
47 checks passed
neweyes pushed a commit to neweyes/vllm that referenced this pull request Mar 31, 2026
…ct#37234)

Signed-off-by: Lucas Kabela <lucaskabela@meta.com>
Signed-off-by: neweyes <328719365@qq.com>
puririshi98 pushed a commit to puririshi98/vllm that referenced this pull request Apr 7, 2026
…ct#37234)

Signed-off-by: Lucas Kabela <lucaskabela@meta.com>
Signed-off-by: Rishi Puri <riship@nvidia.com>
mtparet pushed a commit to blackfuel-ai/vllm that referenced this pull request Apr 9, 2026
iboiko-habana pushed a commit to vllm-project/vllm-gaudi that referenced this pull request Apr 10, 2026
…xtral, MoE and Granite regressions (#1311)

## Summary
This PR fixes a set of regressions introduced by recent upstream changes
and observed in vLLM-Gaudi hourly validation.

The branch now includes:
- Pixtral HPUAttention projection path fix,
- MoE dispatch and method override alignment updates for fused MoE and
compressed tensors,
- unit test updates to match the new MoE runner API usage,
- fix hybrid model page size alignment for Granite 4.0-H.

## Related upstream PRs that introduced the regressions
- vllm-project/vllm#37234
- vllm-project/vllm#35153
- vllm-project/vllm#36963
- vllm-project/vllm#38960
- vllm-project/vllm#35326
- vllm-project/vllm#37467

---------

Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@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