Merged
Conversation
zewenli98
reviewed
May 22, 2024
Collaborator
zewenli98
left a comment
There was a problem hiding this comment.
I think it's fine to have this warning. We just keep the same behavior as pytorch. A minor comment below, the others LGTM
| from .harness import DispatchTestCase | ||
|
|
||
|
|
||
| class TestAtan2OutConverter(DispatchTestCase): |
Collaborator
There was a problem hiding this comment.
Can you move the test class into the test_atan2_aten.py considering they are just variants of atan2?
Collaborator
Author
There was a problem hiding this comment.
I have moved the test class inside test_atan2_aten.py, combining the test cases for aten.atan2.out and aten.atan2.default. Thank you for your useful comment.
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_atan2_aten.py 2024-05-24 08:10:32.451612+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_atan2_aten.py 2024-05-24 08:12:34.674439+00:00
@@ -125,10 +125,11 @@
self.run_test(
atan2(),
inputs,
)
+
class TestAtan2OutConverter(DispatchTestCase):
@parameterized.expand(
[
((10,), (5,), torch.float),
((10,), (10,), torch.float),
@@ -150,7 +151,8 @@
self.run_test(
atan2_out(),
inputs,
)
+
if __name__ == "__main__":
run_tests()There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_atan2_aten.py 2024-05-24 13:35:19.016148+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_atan2_aten.py 2024-05-24 13:37:16.028715+00:00
@@ -125,10 +125,11 @@
self.run_test(
atan2(),
inputs,
)
+
class TestAtan2OutConverter(DispatchTestCase):
@parameterized.expand(
[
((10,), (5,), torch.float),
((10,), (10,), torch.float),
@@ -150,7 +151,8 @@
self.run_test(
atan2_out(),
inputs,
)
+
if __name__ == "__main__":
run_tests()
laikhtewari
pushed a commit
that referenced
this pull request
May 24, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
aten.atan2.outoperation calculates the element-wise arctangent of two tensors and stores the results in a specified output tensor,out. This does not alter the input tensors, meaning it isn't aninplace operationin the traditional sense.However, I've encountered two issues:
First, when the shape of the input
outtensor does not match theactual output shape, PyTorch issues a warning but does not produce an error, and still outputs the correct results. I've attached the results of running the atan2.out operation in PyTorch below:Second, even though TensorRT displays an error message when above warning occurs, the test case still passes. I've attached the results of the executed test case below.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: