Skip to content
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

[relay][simplify_expr]: Add pass to remove trivial transpose ops #14858

Merged
merged 1 commit into from
May 16, 2023
Merged

[relay][simplify_expr]: Add pass to remove trivial transpose ops #14858

merged 1 commit into from
May 16, 2023

Conversation

f2013519
Copy link
Contributor

With my BYOC flow, I see that during various transformations, sometimes trivial no-ops like relay.transpose(x, axes=[0, 1, 2, 3]) are created. I would expect these to be optimized out with the SimplifyExpr pass which is not happening currently. This creates issues when I try to perform pattern matching on the graph.

Currently, SimplifyExpr looks for back to back transpose ops to optimize. This PR splits the current pass into two allowing us to optimize out these trivial ops as well.

@tvm-bot
Copy link
Collaborator

tvm-bot commented May 15, 2023

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

@f2013519
Copy link
Contributor Author

cc @shingjan @junrushao @masahi

@masahi masahi merged commit f6bbe94 into apache:main May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants