-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Add forward AD test for op info #57701
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
[ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 3a9e11b (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 to the (internal) Dr. CI Users group. |
The new OpInfo flag has the following semantic: - If not specified, that means the given function does not have forward AD implemented. And we check that the corresponding error is raised - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we skip the test altogether (this happen right now because some formulas are wrong for complex and because the forward AD code make complex input invalid for some linalg functions) [ghstack-poisoned]
The new OpInfo flag has the following semantic: - If not specified, that means the given function does not have forward AD implemented. And we check that the corresponding error is raised - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we skip the test altogether (this happen right now because some formulas are wrong for complex and because the forward AD code make complex input invalid for some linalg functions) [ghstack-poisoned]
The new OpInfo flag has the following semantic: - If not specified, that means the given function does not have forward AD implemented. And we check that the corresponding error is raised - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we skip the test altogether (this happen right now because some formulas are wrong for complex and because the forward AD code make complex input invalid for some linalg functions) [ghstack-poisoned]
The new OpInfo flag has the following semantic: - If not specified, that means the given function does not have forward AD implemented. And we check that the corresponding error is raised - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we skip the test altogether (this happen right now because some formulas are wrong for complex and because the forward AD code make complex input invalid for some linalg functions) [ghstack-poisoned]
The new OpInfo flag has the following semantic: - If not specified, that means the given function does not have forward AD implemented. And we check that the corresponding error is raised - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we skip the test altogether (this happen right now because some formulas are wrong for complex and because the forward AD code make complex input invalid for some linalg functions) [ghstack-poisoned]
ghstack-source-id: d41fe33 Pull Request resolved: pytorch#57701
if op.supports_forward_ad: | ||
self._grad_test_helper(device, dtype, op, op.get_op(), check_forward_ad=True) | ||
else: | ||
err_msg = r"Trying to use forward AD with .* that does not support it\." |
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.
Really nice test
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 is a brilliant extension of our automated testing
The new OpInfo flag has the following semantic: - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we check that the corresponding error is raised All the added tests take 3s to run for CPU builds and 1min for GPU builds which should be pretty negligible compared to the test_ops runtime for each of these arch. [ghstack-poisoned]
ghstack-source-id: 541f279 Pull Request resolved: pytorch#57701
The new OpInfo flag has the following semantic: - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we check that the corresponding error is raised All the added tests take 3s to run for CPU builds and 1min for GPU builds which should be pretty negligible compared to the test_ops runtime for each of these arch. [ghstack-poisoned]
The new OpInfo flag has the following semantic: - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we check that the corresponding error is raised All the added tests take 3s to run for CPU builds and 1min for GPU builds which should be pretty negligible compared to the test_ops runtime for each of these arch. [ghstack-poisoned]
@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This pull request has been reverted by f88297c. |
Summary: Pull Request resolved: pytorch#57701 The new OpInfo flag has the following semantic: - If it says that it supports forward AD, we run gradcheck with forward AD to ensure it is correct - If it says that it does not support it, we check that the corresponding error is raised All the added tests take 3s to run for CPU builds and 1min for GPU builds which should be pretty negligible compared to the test_ops runtime for each of these arch. Test Plan: Imported from OSS Reviewed By: agolynski Differential Revision: D28387767 Pulled By: albanD fbshipit-source-id: 369d76921c8460aa4548f9b5159b7297994672f5
The new OpInfo flag has the following semantic:
All the added tests take 3s to run for CPU builds and 1min for GPU builds which should be pretty negligible compared to the test_ops runtime for each of these arch.
Stack from ghstack:
Differential Revision: D28387767