Skip to content

only patch runtime_env for torch >= 2.10#38763

Merged
zou3519 merged 1 commit intovllm-project:mainfrom
ROCm:fix_pytorch_2.9_fail
Apr 7, 2026
Merged

only patch runtime_env for torch >= 2.10#38763
zou3519 merged 1 commit intovllm-project:mainfrom
ROCm:fix_pytorch_2.9_fail

Conversation

@Rohan138
Copy link
Copy Markdown
Contributor

@Rohan138 Rohan138 commented Apr 1, 2026

IIUC #37234 added a patch for #30518 so the transformers backend test works with can_return_tuple, but the GraphRuntimeEnv and GraphCaptureOutput classes were introduced for torch 2.10 onwards. To preserve backwards compatibility, can we gate this patch behind a torch >= 2.10 check? cc @Lucaskabela @zou3519

Motivation: ROCm only moved to torch 2.10 recently via #38252, and we're still testing some vllm mainline builds against older Pytorch versions to check for regressions across ROCm/Pytorch/Triton. I think some other OOT backends (vllm-tpu/vllm-gaudi) haven't bumped Pytorch versions yet as well.

Purpose

Test Plan

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.

Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
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 version check in vllm/env_override.py to restrict a PyTorch-related patch to versions between 2.10.0 and 2.12.0. I have no feedback to provide as there were no review comments.

@Lucaskabela
Copy link
Copy Markdown
Contributor

cc @zou3519 @zhxchen17

Copy link
Copy Markdown
Contributor

@Lucaskabela Lucaskabela left a comment

Choose a reason for hiding this comment

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

Thanks for the catch and apologies for the oversight on this

Copy link
Copy Markdown
Contributor

@BowenBao BowenBao left a comment

Choose a reason for hiding this comment

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

@Potabk
Copy link
Copy Markdown
Contributor

Potabk commented Apr 7, 2026

I wholeheartedly agree. For some OOT backends, such as Ascend, are still using torch==2.9.0. hope can merge it

@zou3519 zou3519 added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 7, 2026
@zou3519 zou3519 enabled auto-merge (squash) April 7, 2026 08:05
@zou3519 zou3519 merged commit dd9342e into vllm-project:main Apr 7, 2026
50 of 51 checks passed
jacob-lou pushed a commit to jacob-lou/vllm that referenced this pull request Apr 7, 2026
Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
Signed-off-by: Jacob Lou <jacoblou0924@gmail.com>
mtparet pushed a commit to blackfuel-ai/vllm that referenced this pull request Apr 9, 2026
Signed-off-by: Rohan138 <rohanpotdar138@gmail.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.

5 participants