-
Notifications
You must be signed in to change notification settings - Fork 24k
enable device index check for all device types #126767
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/126767
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit 7e8d1d8 with merge base 00f675b ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
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 fine to me, needs test though
The blast radius is pretty large but that sounds ok to me as any device with single hw should just return 0 all the time. Will let @soulitzer give the final stamp if he's happy with it. Also agreed that we need test to make sure it works fine. |
I believe there are already some tests in place. https://github.com/pytorch/pytorch/blob/main/test/test_autograd.py#L11299
|
Do we run this test on non-cuda devices? I would expect that this was failing before and would be fixed with this PR for non-cuda devices? |
I am adding a custom backend for PyTorch. This test case used to fail and will be fixed by this PR. @albanD |
2fb3012
to
7d3bfe4
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.
Sounds reasonable to me
Though also on testing, @albanD, do you know what our general testing strategy is for non-cuda devices, for things like this
The best Plan On Record for testing these is what is described in this rfc: pytorch/rfcs#64 but it is not done yet I'm afraid. |
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.
Sounds good then!
@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 |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-focal-cuda12.1-py3.10-gcc9 / test (nogpu_NO_AVX2, 1, 1, linux.2xlarge) Details for Dev Infra teamRaised by workflow job |
The CI failure seems unrelated to the changes in the PR, and I am unable to reproduce it locally. |
7d3bfe4
to
ba8175f
Compare
cc @albanD @soulitzer @garfield1997 pytorch/rfcs#64 is currently in the design and development stage. We will do our best to speed up the development and open source it as soon as possible. As stated in the RFC, we plan to abstract and standardize the third-party device access mechanism and in theory, it can provide the following benefits:
|
@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 |
Merge failedReason: 3 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
ba8175f
to
4ce3403
Compare
Could you please help trigger the merge again? @albanD |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
4ce3403
to
7e8d1d8
Compare
@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 |
enable device index check for all device types for grad setter.