Added autograd tests, disabled jit autograd tests for complex and added a separate list for tests for complex dtype only#38399
Conversation
…ed a separate list for tests for complex dtype only [ghstack-poisoned]
…lex and added a separate list for tests for complex dtype only" [ghstack-poisoned]
| ('log1p', uniform_scalar(requires_grad=True), NO_ARGS, 'scalar', (True,)), | ||
| ('log2', torch.rand(S, S, S) + 1e-2, NO_ARGS, '', (True,)), | ||
| ('log2', uniform_scalar(1e-2, requires_grad=True), NO_ARGS, 'scalar', (True,)), | ||
| ('log', torch.randn(S, S, S, dtype=torch.cfloat) + 1e-2, NO_ARGS, 'complex', (True,)), |
There was a problem hiding this comment.
You have special cases here when the variant name contains "complex" right? Maybe add a comment at the beginning of this list mentioning it. And what is happening for tests that have "complex" in their variant name.
| ('reciprocal', torch.rand(S, S, S) + 0.1, NO_ARGS, '', (True,)), | ||
| ('reciprocal', uniform_scalar(0.1, requires_grad=True), NO_ARGS, 'scalar', (True,)), | ||
| ('reciprocal', torch.randn(S, S, S, dtype=torch.cdouble) + 0.1, NO_ARGS, 'complex', (True,)), | ||
| ('reciprocal', uniform_scalar(0.1j, requires_grad=True), NO_ARGS, 'complex_scalar', (True,)), |
There was a problem hiding this comment.
I'm not sure why the original test set requires_grad=True here.
You don't do it for any other tests so I think you can remove it.
| test_case.assertEqualTypeString(self_variable, self_variable.grad) | ||
| test_case.assertEqual(self_variable.size(), self_variable.grad.size()) | ||
|
|
||
| separate_complex_tests = ['log', 'log10', 'log1p', 'log2', 'reciprocal'] |
There was a problem hiding this comment.
Could you add a comment for what this list contains?
These are the ones that run only for complex?
💊 CI failures summary and remediationsAs of commit 8758a25 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This 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 14 times. |
…lex and added a separate list for tests for complex dtype only" [ghstack-poisoned]
…lex and added a separate list for tests for complex dtype only" [ghstack-poisoned]
…lex and added a separate list for tests for complex dtype only" Differential Revision: [D21555941](https://our.internmc.facebook.com/intern/diff/D21555941) [ghstack-poisoned]
|
@anjali411 merged this pull request in 1676c7d. |
* #38399 Added autograd tests, disabled jit autograd tests for complex and added a separate list for tests for complex dtype only [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]
Summary: Pull Request resolved: #38400 * #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
…ed a separate list for tests for complex dtype only (pytorch#38399) Summary: Pull Request resolved: pytorch#38399 Test Plan: Imported from OSS Differential Revision: D21555941 Pulled By: anjali411 fbshipit-source-id: ea9f5a76590c5bab3df6a540617b074238bfb535
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: D21555941