-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Support conditional torch.compile per module #22269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
👋 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 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 🚀 |
There was a problem hiding this 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 compile_cond
argument to the support_torch_compile
decorator, allowing for conditional compilation of models. The implementation is clean and well-tested. I've found one minor issue in the new test file that should be addressed. Overall, this is a great addition that increases the flexibility of the compilation framework.
a51f22b
to
8e302bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit around the name but otherwise lgtm
8bf5031
to
d48647a
Compare
Can you merge from main to fix the CI failures? |
d48647a
to
58b56f2
Compare
Signed-off-by: Yong Hoon Shin <[email protected]>
Signed-off-by: Yong Hoon Shin <[email protected]>
Signed-off-by: Yong Hoon Shin <[email protected]>
Signed-off-by: Yong Hoon Shin <[email protected]>
58b56f2
to
bd849d6
Compare
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
Required fro #22628
#21044 shows an example of compiling multiple submodules within a model. We also want to provide the user the flexibility of triggering this on/off.
This PR adds a new arg
enable_if
to thesupport_torch_compile
decorator, which is a function that takes inVllmConfig
and returns abool
of whether to enable compile or not.Test Plan
added new unit tests
Test Result
Tests pass
cc: @zou3519 @BoyuanFeng