-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[MPS] Support torch.Event for MPS #142468
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/142468
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit c8b0153 with merge base 1cb2ebd ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@malfet May I know if this PR is reasonable to you? |
|
Don't we have this support here ? |
|
@guangyey can you take a look and see what's missing ? |
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 very much for the prompt fix
|
@pytorchbot merge -f "Lint + MPS are green" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: PR #142468 has not been reviewed yet |
This PR is step forward towards the idea of being able to write accelerator agnostic code and replace neverending event = torch.cuda.Event() if torch.cuda.is_available() else torch.mps.Event() if torch.mps.is_available() else DummyEvent()with something |
|
@pytorchbot merge -f "Lint + MPS are green" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
# Motivation This PR intends to add UTs for accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in #142468. The previous commit is 952514f Pull Request resolved: #133572 Approved by: https://github.com/EikanWang, https://github.com/albanD ghstack dependencies: #142468
# Motivation This PR intends to add C++ accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in #142468. The previous commit is f84e533 Pull Request resolved: #138677 Approved by: https://github.com/albanD, https://github.com/EikanWang ghstack dependencies: #142468, #133572
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 to me.
Thanks. |
ghstack-source-id: ffe3755 Pull Request resolved: pytorch/pytorch#142468
# Motivation This PR intends to add UTs for accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in #142468. The previous commit is 952514f Pull Request resolved: #133572 Approved by: https://github.com/EikanWang, https://github.com/albanD ghstack dependencies: #143171
…38677) # Motivation This PR intends to add C++ accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in pytorch#142468. The previous commit is pytorch@f84e533 Pull Request resolved: pytorch#138677 Approved by: https://github.com/albanD, https://github.com/EikanWang ghstack dependencies: pytorch#143171, pytorch#133572
…h#133572) # Motivation This PR intends to add UTs for accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in pytorch#142468. The previous commit is pytorch@952514f Pull Request resolved: pytorch#133572 Approved by: https://github.com/EikanWang, https://github.com/albanD ghstack dependencies: pytorch#143171
…38677) # Motivation This PR intends to add C++ accelerator device-agnostic APIs. # Additional Context This PR is relanded. It is reverted because `torch.Event` doesn't support mps backend. We have fixed it in pytorch#142468. The previous commit is pytorch@f84e533 Pull Request resolved: pytorch#138677 Approved by: https://github.com/albanD, https://github.com/EikanWang ghstack dependencies: pytorch#143171, pytorch#133572
Stack from ghstack (oldest at bottom):
Motivation
Support
torch.Eventon mps backend.