-
Notifications
You must be signed in to change notification settings - Fork 360
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
feat: support aten.resize_ converter #2874
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
be85f5d
feat: support aten.resize_ converter
chohk88 c3a2ed2
chore: minor naming issues
chohk88 dfa5d16
feat: revise run_test function to compare only valid elements
chohk88 7774738
chore: Moved comparators function to a class method to avoid redundancy
chohk88 6bcadc5
chore: remove dependency on fx util, move to dynamo
chohk88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Is there a specific case where the len(cuda_inputs) == 1 is required? In general I assume the
len(cuda_inputs)
would be 1 in most cases. And since it conditioned onres_trt
could you highlight the cases where it would be required?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.
Thank you for your comment!
As you mentioned, in most cases, the length of
cuda_inputs
is 1. Below are the outputs when I set a breakpoint in the original code for two cases wheretorch.ops.aten.resize_.default(x, target_shape)
returns tensors with shapes(3,)
and(10, 15, 10)
.In both cases, the length of
cuda_inputs
is also1
. Whencuda_inputs
has a length of1
,res_trt
andres_cpu
are not lists of length1
but aretorch.Tensors
with shapes(3,)
and(10, 15, 10)
for each case. Therefore, when we usezip
infor output_trt, output_cpu, comparator in zip(res_trt, res_cpu, comparators)
, and the comparators list has a length of1
, it results in comparing fewer elements because one dimension is lost fromres_trt
andres_cpu
.