-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[inductor] Don't inherit __future__
flags from the calling scope when compile
-ing generated modules
#126454
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/126454
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 13a5aef with merge base 4b23c4f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Looks good, modulo the lint failures
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The `compile` + `exec` workflow is susceptible to behavior drifting from a "normal" import use importlib instead to avoid this. In particular here annotations were being stored as strings due to `from __futures__ import annotations` in the scope calling `compile`. Triton cares about annotations on global variables and this makes it much easier to reliably code-gen them. Pull Request resolved: pytorch#126454 Approved by: https://github.com/peterbell10
@pytorchbot revert -m "Break internal build" -c ghfirst |
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit faa26df. Reverted #126454 on behalf of https://github.com/DanilBaibak due to Break internal build ([comment](#126454 (comment)))
@amjames your PR has been successfully reverted. |
Hi @amjames! Sorry, I need to revert your PR because it breaks the internal build. Here are the details:
Traceback:
|
I reverted back to using @DanilBaibak do you want to see if those tests fail on the internal build, or should I just try to re-land this after CI is done? |
__future__
flags from the calling scope when compile
-ing generated modules
@amjames, I think you can just re-land after CI is done. |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
__future__
flags from the calling scope whencompile
-ing generated modules #126454This file includes
from __futures__ import annotations
which interacts withcompile
by causing type annotations to be populated as strings. Triton does not parse the string annotation correctly. Avoid this behavior by passingdont_inherit=True
tocompile
.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @desertfire @chauhang