-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add CUDA support for _dirichlet_grad #21191
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
Changelog: - Migrate _dirichlet_grad implementation from TH to ATen - Add CUDA support for _dirichlet_grad
|
cc: @fritzo |
|
@pytorchbot rebase this please |
f971b43 to
fd088b3
Compare
|
Great. Can you confirm that
|
|
The Regarding your second point, I have followed the same steps as |
ezyang
left a comment
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 assuming there were no substantive algorithmic changes.
| Tensor _dirichlet_grad_cpu(const Tensor& x, const Tensor& alpha, const Tensor& total) { | ||
| Tensor ret = at::empty(x.sizes(), x.options()); | ||
| AT_DISPATCH_FLOATING_TYPES(x.scalar_type(), "_dirichlet_grad_cpu", [&] { | ||
| CPU_tensor_apply4<scalar_t, scalar_t, scalar_t, scalar_t>(ret, x, alpha, total, |
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.
Doesn't have to be this PR, but at some point it would be good to port this into using TensorIterator (which I think should be doable here.) CC @VitalyFedyunin
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.
There are a lot of dispatches in this file that have to be ported into using TensorIterator.
|
Windows failures look related to this diff: |
|
I guess you accidentally turned on half precision support for this operation? |
|
Yes, I'm sorry. I'll revert that change - it's in Distributions.cu. |
|
Windows failure is unrelated to this PR. @ezyang is this good to go? |
|
@pytorchbot rebase this please |
|
@pytorchbot merge this please |
facebook-github-bot
left a comment
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.
@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Changelog: - Migrate _dirichlet_grad implementation from TH to ATen - Add CUDA support for _dirichlet_grad Closes #11030. Closes #15773. Pull Request resolved: pytorch/pytorch#21191 Differential Revision: D15660330 Pulled By: ezyang fbshipit-source-id: c8ad5b80366e5348139ce9be10400f22fc430344
Changelog:
Closes #11030.
Closes #15773.