-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Composite Compliance testing for backward formulas #74646
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
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
[ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 342653f (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).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
ghstack-source-id: 903f52c
Pull Request resolved: #74646
|
Pre-empting questions about runtime:
I think this qualifies as "quick enough that the benefits outweigh the cost" but please feel free to disagree. If we're really pressed on capacity, this test only really needs to run in one CI environment configuration |
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
[ghstack-poisoned]
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
ghstack-source-id: ee6e420
Pull Request resolved: #74646
| return | ||
| raise RuntimeError( | ||
| f"This operator is not CompositeImplicitAutograd compliant: the " | ||
| f"This operator is not Composite Compliant: the " |
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.
Name change because "CompositeImplicitAutograd" only applies to operators and many backward formulas are just regular c++ functions that consist of pytorch operations
|
|
||
| # CompositeCompliantTensor steals the "requires_grad"-ness. | ||
| if elem.requires_grad: | ||
| # Why clone? Because sometimes OpInfo shares inputs between tests... |
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.
bruh lol
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
[ghstack-poisoned]
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
- wait for tests
ghstack-source-id: 9d2e1e0
Pull Request resolved: #74646
|
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Pull Request resolved: #74646 The OpInfo-based test, given an operator and sample inputs, checks all permutations of {inputs, grad_output} being either {CompositeCompliantTensor, regular Tensor}, running them through a forward pass and a backward pass. Test Plan: - wait for tests Reviewed By: albanD Differential Revision: D35186860 Pulled By: zou3519 fbshipit-source-id: 8b2577dd6106c05db2ab583bbefd10545fdd8adf
|
Hey @zou3519. |
Follow up to #74646. Do not skip the entire TestCompositeCompliance test_backward for ROCm, only skip the the two unexpected successes. Pull Request resolved: #75810 Approved by: https://github.com/zou3519
Summary: Follow up to #74646. Do not skip the entire TestCompositeCompliance test_backward for ROCm, only skip the the two unexpected successes. Pull Request resolved: #75810 Approved by: https://github.com/zou3519 Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e587c8bc5782510c7e518c8db8663014ac5e063f Reviewed By: seemethere Differential Revision: D35751446 fbshipit-source-id: e5cae9bf19d46572cc360d9fb4cb87642e5960d3
Follow up to #74646. Do not skip the entire TestCompositeCompliance test_backward for ROCm, only skip the the two unexpected successes. Pull Request resolved: #75810 Approved by: https://github.com/zou3519 (cherry picked from commit e587c8b)
Stack from ghstack:
The OpInfo-based test, given an operator and sample inputs,
checks all permutations of {inputs, grad_output} being either
{CompositeCompliantTensor, regular Tensor}, running them through a
forward pass and a backward pass.
Test Plan:
Differential Revision: D35186860