Skip to content

Conversation

@xiszishu
Copy link
Contributor

@xiszishu xiszishu commented Aug 17, 2025

Reimplementation of #20836, compatible with torch 2.6.0 now

Purpose

Disable enable_cpp_symbolic_shape_guards to optimize compute time while compatible with the older version pytorch (required by cpu only setup).

Test Plan

Test Result

(Optional) Documentation Update


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.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

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 disables the enable_cpp_symbolic_shape_guards configuration in PyTorch Dynamo to improve compilation time. The change is implemented in a backward-compatible way, using a try-except block to handle different PyTorch versions gracefully. This ensures the code works correctly whether the configuration flag is present or not. The implementation is sound and I have no concerns.

Comment on lines +280 to +281
# Note: this config is not available in torch 2.6, we can skip
# if the config doesn't exist
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you using PyTorch 2.6?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess my higher-level question is, why does vLLM CPU use PyTorch 2.6 instead of PyTorch 2.7?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is due to the issue with 2.7.0 on x86 cpu: #19258

@zou3519 zou3519 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 18, 2025
@zou3519
Copy link
Collaborator

zou3519 commented Aug 18, 2025

@xiszishu are you able to merge main into this branch?

@xiszishu
Copy link
Contributor Author

xiszishu commented Aug 18, 2025

@xiszishu are you able to merge main into this branch?

@zou3519 no can't merge

@zou3519 zou3519 merged commit a4454e9 into vllm-project:main Aug 19, 2025
39 checks passed
princepride pushed a commit to princepride/vllm that referenced this pull request Aug 20, 2025
divakar-amd pushed a commit to divakar-amd/vllm_upstream that referenced this pull request Aug 20, 2025
cyang49 pushed a commit to cyang49/vllm that referenced this pull request Aug 20, 2025
djmmoss pushed a commit to djmmoss/vllm that referenced this pull request Aug 21, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
mengxingkongzhouhan pushed a commit to mengxingkongzhouhan/vllm that referenced this pull request Aug 30, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
@laithsakka
Copy link
Contributor

laithsakka commented Sep 17, 2025

what was the compile time win amount Contributor
@xiszishu

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.

3 participants