-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Generalize toAccumulateType() #108248
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
Generalize toAccumulateType() #108248
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/108248
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b9fe25c with merge base 92f4a7b ( 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.
Super cool update!
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
| #define CUDA_ACC_TYPE(t, acc_t) ACC_TYPE(t, acc_t, c10::DeviceType::CUDA) | ||
| #define CPU_ACC_TYPE(t, acc_t) ACC_TYPE(t, acc_t, c10::DeviceType::CPU) | ||
|
|
||
| MPS_ACC_TYPE(BFloat16, float); |
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.
This looks great! Thanks for the refactor!
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
Trying to address this comment: #106666 (comment) cc albanD kulinseth [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.
Change sounds good.
I just want a quick stamp from Kulin to make sure the double complex handling is fine.
| MPS_ACC_TYPE(bool, bool); | ||
| MPS_ACC_TYPE(c10::complex<Half>, c10::complex<float>); | ||
| MPS_ACC_TYPE(c10::complex<float>, c10::complex<float>); | ||
| MPS_ACC_TYPE(c10::complex<double>, c10::complex<float>); |
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.
cc @kulinseth just to confirm that this is ok to have this for now.
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.
Can we issue a warning that we are falling back to using float for double types ?
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.
I'm a bit concerned about that would be somewhat verbose from a user's point of view since accumulate type is an internal thing of which a regular user probably doesn't have idea.
What do you think @albanD?
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.
I'm not sure what is the best place to put this warning for sure. Also note that the user would need to have created a compleex to begin with to reach this.
So I would say that not having a warning here is fine?
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.
If the current state is fine, this PR needs your approval @albanD. Thanks!
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.
Other than the warning . This looks good to me
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.
SGTM
|
@pytorchbot merge -r |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
|
Successfully rebased |
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: Mac MPS / macos-13-py3-arm64-mps / test (default, 1, 1) Details for Dev Infra teamRaised by workflow job |
Trying to address this comment: #106666 (comment) cc albanD kulinseth [ghstack-poisoned]
|
@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 / macos-12-py3-arm64 / build 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 |
Stack from ghstack (oldest at bottom):
Trying to address this comment: #106666 (comment)
cc @albanD @kulinseth