Add tan_cuda for complex dtypes#38400
Add tan_cuda for complex dtypes#38400anjali411 wants to merge 8 commits intogh/anjali411/23/basefrom
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit d912829 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
| ('rsqrt', '', lambda t, d: _small_3d(t, d) + 1, lambda t, d: [], 1e-2, 1e-5, 1e-4, _float_types_no_half), | ||
| ('sinh', '', lambda t, d: _small_3d(t, d).clamp(-1, 1), lambda t, d: [], 1e-3, 1e-5, 1e-5, _float_types), | ||
| ('tan', '', lambda t, d: _small_3d(t, d).clamp(-1, 1), lambda t, d: [], 1e-3, 1e-5, 1e-5, _float_types), | ||
| ('tan', 'complex', lambda t, d: _small_3d(t, d), lambda t, d: [], 1e-3, 1e-5, 1e-5, _complex_types) |
There was a problem hiding this comment.
I am surprised that _complex_types did not exist yet here. How do we test the other methods that already support complex?
There was a problem hiding this comment.
Unfortunately there are no existing tests for these ops for complex dtypes. we should add it soon though ...
| test_case.assertEqual(self_variable.size(), self_variable.grad.size()) | ||
|
|
||
| separate_complex_tests = ['log', 'log10', 'log1p', 'log2', 'reciprocal'] | ||
| separate_complex_tests = ['log', 'log10', 'log1p', 'log2', 'reciprocal', 'tan'] |
There was a problem hiding this comment.
Why is this one in the reparate list? It should work for real numbers as well no?
There was a problem hiding this comment.
the test for floating points uses clamp in the input and clamp does not work for complex
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Differential Revision: [D21556867](https://our.internmc.facebook.com/intern/diff/D21556867) [ghstack-poisoned]
* #38399 Added autograd tests, disabled jit autograd tests for complex and added a separate list for tests for complex dtype only [ghstack-poisoned]
Differential Revision: [D21572209](https://our.internmc.facebook.com/intern/diff/D21572209) [ghstack-poisoned]
|
@anjali411 merged this pull request in 242af6c. |
1 similar comment
|
@anjali411 merged this pull request in 242af6c. |
Summary: Pull Request resolved: pytorch#38400 * pytorch#38399 Added autograd tests, disabled jit autograd tests for complex and added a separate list for tests for complex dtype only Test Plan: Imported from OSS Differential Revision: D21572209 Pulled By: anjali411 fbshipit-source-id: 7036029e9f8336139f5d54e0dfff9759f3bf8376
Stack from ghstack:
Differential Revision: D21572209