support complex types for tanh_backward_cpu#37791
support complex types for tanh_backward_cpu#37791kshitij12345 wants to merge 3 commits intopytorch:masterfrom
Conversation
d343a30 to
9125f0c
Compare
|
@anjali411 |
|
@kshitij12345 this looks good! I am working on adding a whitelist for testing backwards for some C->C functions (will have a PR soon). so once that's pushed, you would be easily able to enable the test for complex dtype by adding tanh to the whitelist. should have the PR up by tomorrow |
|
@anjali411 Sounds good. |
|
hey @kshitij12345 you can add tanh to this whitelist and then this test should run with complex as well. |
|
@anjali411 Or should we add another Would take care of |
Generally we could add "Expectedcudafailure" (used here) if it were not working for floating and complex dtypes. And we might need to add something for that later, but for now I think we can just add a new test for complex |
9125f0c to
9961106
Compare
|
Also, would you like to work on adding cuda support for complex for a few other ops as well? |
Sure would. :) |
great! let's follow up on this on slack |
9961106 to
5fdac7a
Compare
💊 CI failures summary and remediationsAs of commit cd2d446 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 4 times. |
|
@anjali411 PTAL :)
I applied for slack invite, but sadly haven't received any response. |
|
@anjali411 Gentle ping. |
| }); | ||
| }); | ||
| if (isComplexType(iter.dtype())) { | ||
| AT_DISPATCH_COMPLEX_TYPES(iter.dtype(), "tanh_backward_cpu", [&]() { |
There was a problem hiding this comment.
we could combine this in future when AT_DISPATCH_FLOATING_AND_COMPLEX_TYPES starts using c10::complex
cc. @zasdfgbnm
facebook-github-bot
left a comment
There was a problem hiding this comment.
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@anjali411 merged this pull request in 09c430a. |
Summary: Closes: pytorch#37701 TO-DO: * [x] Add Tests Pull Request resolved: pytorch#37791 Differential Revision: D21619827 Pulled By: anjali411 fbshipit-source-id: 0919ec80168a7f8b8092da8d39b8bc6f519d3440
…8786) Summary: Builds on pytorch#37791 Pull Request resolved: pytorch#38786 Differential Revision: D21666138 Pulled By: anjali411 fbshipit-source-id: cbd313b8fd21109aadd614c60259b9dc505771a5
Closes: #37701
TO-DO: