-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add einops x torch.compile testing in PyTorch CI #157416
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
Conversation
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157416
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit db6a8ed with merge base 0f9c1b3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
test/dynamo/test_einops.py
Outdated
einops_version = einops.__version__ | ||
else: | ||
einops_version = "none" | ||
print("einops not available, skipping tests", file=sys.stderr) |
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.
Remove? As @skipIf
will print to stderr if einops is not available.
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
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, I'm sure this will be helpful.
Thank you @zou3519 @guilhermeleobas
test/dynamo/test_einops.py
Outdated
addition = einsum(x_abc, x_abcd, suf("a b c , a b c d -> d"))[0] | ||
return x1 + addition | ||
|
||
compiled_fn = torch.compile(TorchModuleWithOperations()) |
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.
do you want to put fullgraph here as well? No opinion, just asking
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.
thank you, I missed that
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
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.
Thank you so much for leading this!
@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 |
@pytorchbot cherry-pick --onto release/2.8 -c critical |
Cherry picking #157416Command
Details for Dev Infra teamRaised by workflow job |
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI Pull Request resolved: #157416 Approved by: https://github.com/guilhermeleobas, https://github.com/arogozhnikov, https://github.com/anijain2305
Fixes #146782. This PR adds testing for multiple einops versions in PyTorch CI. This occurs in a new "einops" CI job that runs for both Python 3.9 and 3.13 (aka, what we test Dynamo over). Test Plan: - wait for CI Pull Request resolved: #157416 Approved by: https://github.com/guilhermeleobas, https://github.com/arogozhnikov, https://github.com/anijain2305
Fixes #157451 If/when einops releases a version greater than 0.8.1, it will just break (without this patch). The history is: - Between 2.6 and 2.7, we tried to delete the einops import (#142847) - That didn't work so well, so we applied a hotfix in 2.7.1. (#153925) - The hotfix wasn't completely correct (0.8.1 is the latest version of einops, so the condition in the hotfix just always evaluates to True!) - It turns out we didn't need to delete the einops import. We already do not eagerly import einops. - I reverted the code back to the state it was in in 2.6. https://github.com/pytorch/pytorch/blob/release/2.6/torch/_dynamo/decorators.py Test Plan: - We have testing in CI for einops 0.6.1, 0.7.0, and 0.8.1. Wait for CI. Pull Request resolved: #157600 Approved by: https://github.com/guilhermeleobas, https://github.com/anijain2305 ghstack dependencies: #157416
Fixes #157451 If/when einops releases a version greater than 0.8.1, it will just break (without this patch). The history is: - Between 2.6 and 2.7, we tried to delete the einops import (#142847) - That didn't work so well, so we applied a hotfix in 2.7.1. (#153925) - The hotfix wasn't completely correct (0.8.1 is the latest version of einops, so the condition in the hotfix just always evaluates to True!) - It turns out we didn't need to delete the einops import. We already do not eagerly import einops. - I reverted the code back to the state it was in in 2.6. https://github.com/pytorch/pytorch/blob/release/2.6/torch/_dynamo/decorators.py Test Plan: - We have testing in CI for einops 0.6.1, 0.7.0, and 0.8.1. Wait for CI. Pull Request resolved: #157600 Approved by: https://github.com/guilhermeleobas, https://github.com/anijain2305 ghstack dependencies: #157416 (cherry picked from commit 5d8d126)
Fix einops x torch.compile interaction (#157600) Fixes #157451 If/when einops releases a version greater than 0.8.1, it will just break (without this patch). The history is: - Between 2.6 and 2.7, we tried to delete the einops import (#142847) - That didn't work so well, so we applied a hotfix in 2.7.1. (#153925) - The hotfix wasn't completely correct (0.8.1 is the latest version of einops, so the condition in the hotfix just always evaluates to True!) - It turns out we didn't need to delete the einops import. We already do not eagerly import einops. - I reverted the code back to the state it was in in 2.6. https://github.com/pytorch/pytorch/blob/release/2.6/torch/_dynamo/decorators.py Test Plan: - We have testing in CI for einops 0.6.1, 0.7.0, and 0.8.1. Wait for CI. Pull Request resolved: #157600 Approved by: https://github.com/guilhermeleobas, https://github.com/anijain2305 ghstack dependencies: #157416 (cherry picked from commit 5d8d126) Co-authored-by: rzou <zou3519@gmail.com>
Stack from ghstack (oldest at bottom):
Fixes #146782. This PR adds testing for multiple einops versions in
PyTorch CI. This occurs in a new "einops" CI job that runs for both
Python 3.9 and 3.13 (aka, what we test Dynamo over).
Test Plan:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames