-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Refactor error input tests in test_torch.py to OpInfos #73981
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
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 80f07a6 (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:
|
6209588 to
51fd8d4
Compare
| error_type=RuntimeError, | ||
| error_regex='unsupported operation') | ||
|
|
||
| yield ErrorInput(SampleInput(src, args=(0, ind,), kwargs=dict(out=src)), |
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.
I suppose it's OK for error inputs to share data because they're just supposed to throw an error
mruberry
left a comment
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! Thanks @saketh-are!
|
@saketh-are has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: This PR ports several tests in `test/test_torch.py` over to OpInfo ErrorInputs. Some tests commented "convert to ErrorInputs" still remain in `test_torch.py`. They fall under two categories: - Memory overlap tests which specifically test the in-place version of an operator (e.g. [this test](https://github.com/pytorch/pytorch/blob/424a054d53e5f3229411532fb69fae276b29dcb2/test/test_torch.py#L3788) for index_add_). - Tests with non-trivial behavior calling `torch.cuda.synchronize()` after calling the operator being tested (e.g. [this test](https://github.com/pytorch/pytorch/blob/424a054d53e5f3229411532fb69fae276b29dcb2/test/test_torch.py#L4948) for torch.multinomial). Pull Request resolved: #73981 Reviewed By: qihqi Differential Revision: D35016669 Pulled By: saketh-are fbshipit-source-id: bc0016d2b2bfb566a9dfef81ecf44e0adb9e4b14
|
Hey @saketh-are. |
Summary: This PR ports several tests in `test/test_torch.py` over to OpInfo ErrorInputs. Some tests commented "convert to ErrorInputs" still remain in `test_torch.py`. They fall under two categories: - Memory overlap tests which specifically test the in-place version of an operator (e.g. [this test](https://github.com/pytorch/pytorch/blob/424a054d53e5f3229411532fb69fae276b29dcb2/test/test_torch.py#L3788) for index_add_). - Tests with non-trivial behavior calling `torch.cuda.synchronize()` after calling the operator being tested (e.g. [this test](https://github.com/pytorch/pytorch/blob/424a054d53e5f3229411532fb69fae276b29dcb2/test/test_torch.py#L4948) for torch.multinomial). Pull Request resolved: #73981 Reviewed By: qihqi Differential Revision: D35016669 Pulled By: saketh-are fbshipit-source-id: bc0016d2b2bfb566a9dfef81ecf44e0adb9e4b14 (cherry picked from commit 99bcbdb)
This PR ports several tests in
test/test_torch.pyover to OpInfo ErrorInputs.Some tests commented "convert to ErrorInputs" still remain in
test_torch.py. They fall under two categories:torch.cuda.synchronize()after calling the operator being tested (e.g. this test for torch.multinomial).