-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[testing] add broadcasts_input and verifies the behaviour for inplace_variant.
#55771
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
[testing] add broadcasts_input and verifies the behaviour for inplace_variant.
#55771
Conversation
💊 CI failures summary and remediationsAs of commit 0bb8bbb (more details on the Dr. CI page):
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. |
| cloned = clone_input_helper(sample.input) if variant in inplace_ops else sample.input | ||
|
|
||
| if variant in inplace_ops and sample.broadcasts_input: | ||
| with self.assertRaises(RuntimeError): |
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.
Received two different error messages, so haven't used assertRaisesRegex.
Message 1:
expand(CUDABoolType{[5, 5]}, size=[5]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
Message 2:
output with shape [5, 5] doesn't match the broadcast shape [5, 5, 5]
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.
Not using assertRaisesRegex sounds good
Codecov Report
@@ Coverage Diff @@
## master #55771 +/- ##
==========================================
+ Coverage 77.13% 77.25% +0.11%
==========================================
Files 1912 1896 -16
Lines 189312 187966 -1346
==========================================
- Hits 146024 145209 -815
+ Misses 43288 42757 -531 |
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.
Cool! This might pick up a merge conflict. When it's about to be landed (after the internal CI and approval process) I'll ping so we can update it (if needed) and then land it immediately.
|
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mruberry updated. Have tested locally. Lets wait for the CI to pass. |
|
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ce_variant. (pytorch#55771) Summary: Fixes pytorch#55595 * Add `broadcasts_input` attribute to SampleInput * Update test_variant_consistency_eager to verify that sample with `broadcasts_input==True` and inplace variant raises an error. Pull Request resolved: pytorch#55771 Reviewed By: jbschlosser, ngimel Differential Revision: D27760530 Pulled By: mruberry fbshipit-source-id: feb0658730d4cff483848a5ade9512837a65c24c
…xed before (#61579) Summary: This PR: 1. Removes `test_out` skip: it's not needed anymore after it was fixed in #55746. This should also close #55589. 2. Removes `test_variant_consistency_eager` skip, it was added by mistake in #55771. 3. Refines `sample_inputs_addmv` function, the updated function should now be cleaner and easy to read. cc: mruberry Pull Request resolved: #61579 Reviewed By: gchanan Differential Revision: D29709674 Pulled By: mruberry fbshipit-source-id: 9b975c024777efdd33c6b9444b0b36e0eab85c03
Fixes #55595
broadcasts_inputattribute to SampleInputbroadcasts_input==Trueand inplace variant raises an error.