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
[ONNX] Add GreaterOrEqual and LessOrEqual to opset 12 ONNX export #38311
Conversation
💊 CI failures summary and remediationsAs of commit 6f0e642 (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: pytorch_windows_vs2019_py36_cuda10.1_test2 (1/1)Step: "Test" (full log | diagnosis details | 🔁 rerun)
|
@@ -1956,42 +1956,70 @@ def forward(self, input): | |||
x = torch.ones(5, 6) | |||
self.run_test(DimArange(), x) | |||
|
|||
def _test_compare_ops(self, model, num_inputs): |
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.
What is the output data type in PyTorch if inputs don't have the same data type?
Edit: Inferred data type*
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.
The output type is always bool, regardless of the input types.
In reply to: 424530939 [](ancestors = 424530939)
@@ -1956,42 +1956,70 @@ def forward(self, input): | |||
x = torch.ones(5, 6) | |||
self.run_test(DimArange(), x) | |||
|
|||
def _test_compare_ops(self, model, num_inputs): |
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.
Can you add a couple more tests for combination of input types (like float and int)?
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.
Thanks!
cc @houseroad for review. Thanks. |
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.
Thanks
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@houseroad merged this pull request in ece878e. |
GreaterOrEqual and LessOrEqual were added in opset 12, this PR adds support to export these operators to ONNX instead of using "not" and "less than" or "greater than".