-
Notifications
You must be signed in to change notification settings - Fork 863
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
Enable torch.compile
support for torch 2.0.0 pre release
#2256
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2256 +/- ##
=======================================
Coverage 70.40% 70.40%
=======================================
Files 75 75
Lines 3392 3392
Branches 57 57
=======================================
Hits 2388 2388
Misses 1001 1001
Partials 3 3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
@msaroufim I wonder if the fix should be to change the logic to just check for >= 2 in 2.x.x
@morgandu Could you please share whats the context of this alpha release. Also, the proposed fix would mean torch.compile wouldn't work on 2.0.0? |
@agunapal for context this PR is needed for the new TPU support, I believe this PR is correct and will return True in the case of torch__version__ = 2.0.0 since that's considered greater than an alpha release |
@agunapal we are currently fixed on using a particular version of torch 2.0.0, which is an alpha pre release version. According to the packaging.version comparison. '2.0.0a0' < '2.0.0'. However, I believe dynamo is enabled in '2.0.0a0'. So this change should enable the torch.compile support for users on any pre release of 2.0.0, but not lower, and it will not affect users on 2.0.0 official release / post release and other future versions above 2.0.0. |
All green but I don't have write access so can't merge myself. Please help merge this PR. Thanks! |
We are currently locked on an alpha version of torch 2.0.0. TorchServe (HEAD) was working for us before the PT2 refactor when the
base_handler
was deciding PT2, as below:Creating a minor PR for enable torch2.0.0 alpha pre release to use torch.compile.