feat: dynamic shapes support for neg ops#2878
Merged
peri044 merged 1 commit intopytorch:mainfrom Jun 14, 2024
Merged
Conversation
keehyuna
commented
Jun 4, 2024
keehyuna
commented
Jun 4, 2024
narendasan
reviewed
Jun 4, 2024
py/torch_tensorrt/_Input.py
Outdated
| return torch.rand(self.shape[optimization_profile_field]).to( | ||
| dtype=self.dtype.to(torch.dtype, use_default=True) | ||
| ) | ||
| if ( |
Collaborator
There was a problem hiding this comment.
Can clean this up a bit
if self.dtype in [dtype.u8, dtype.i8, dtype.i32, dtype.i64]:
peri044
approved these changes
Jun 7, 2024
Collaborator
peri044
left a comment
There was a problem hiding this comment.
LGTM. I think your PR for where op modifies _Input.py around the example_tensor call. So make sure the bool type change is integrated when you merge.
zewenli98
reviewed
Jun 7, 2024
Collaborator
zewenli98
left a comment
There was a problem hiding this comment.
Overall LGTM, just some minor comments
07c9c2d to
436e99b
Compare
7 tasks
keehyuna
commented
Jun 10, 2024
436e99b to
6d7f2fb
Compare
Collaborator
Author
|
Changes for random integer caused failure in arange/cos/sin test. I think it unmasked potential issue as all input values were zero. |
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
Add test case for dynamic shape input of aten.neg ops
Replaced output_dtypes arg in run_test_with_dynamic_shape() with check_dtype to handle
integer type of dynamic shape input test case.
Fixes # (issue)
Type of change
Checklist: