Fix pytorch axis#14930
Merged
echuraev merged 83 commits intoapache:mainfrom May 25, 2023
Merged
Conversation
added 30 commits
March 18, 2020 19:30
# Conflicts: # python/tvm/relay/frontend/tensorflow.py
…nto mikeseven/fix_pytorch_axis
Collaborator
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
echuraev
reviewed
May 24, 2023
Contributor
echuraev
left a comment
There was a problem hiding this comment.
Please add a unit test for your changes.
| # TODO (t-vi): why is the cast to int needed? similarly elsewhere | ||
| axis = [int(inputs[1])] | ||
| # [MBS] squeeze axis can be a list | ||
| # axis = [int(inputs[1])] |
Contributor
There was a problem hiding this comment.
Probably the old code can be removed?
Contributor
Author
There was a problem hiding this comment.
test added with other tests for this frontend.
echuraev
reviewed
May 24, 2023
echuraev
approved these changes
May 25, 2023
mei-ye
pushed a commit
to mei-ye/tvm
that referenced
this pull request
Jun 1, 2023
* fix conv transpose import from TF * fix String::fromwe() to String::from() * torch squeeze can use a list of axis * added test for squeeze with multiple axis (pytorch 2) * clean old code * code without reformating --------- Co-authored-by: Mikael Sevenier <mikael.sevenier@sima.ai>
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.
relay.frontend.from_pytorch maps torch.squeeze() using 1 axis while pytorch allows multiple axis.
This fixes that.
Note that this pattern seems to be used for other functions. This frontend may need to be updated elsewhere. I only tested for squeeze for my current needs.
cc @areusch