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

FoldScaleAxis became non-recursive #8325

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Conversation

d-smirnov
Copy link
Contributor

This PR migrates FoldScaleAxis optimization pass from ExprVisitor/ExprMutator to non-recursive MixedModeVisitor/MixedModeMutator. The specific transforming part itself is still recursive, however the underlying traversal machinery is now non-recursive.

FoldScaleAxis moved from ExprVisitor and ExprMutator
to non-recursive MixedModeVisitor and MixedModeMutator.
The specific transforming part itself is still recursive,
however the underlying traversal machinery is non-recursive.

Change-Id: I8bf40bd1f3f039ef0705c665a34a4624067048a1
@d-smirnov
Copy link
Contributor Author

@mbrookhart

@d-smirnov
Copy link
Contributor Author

bump. also cc @tqchen

@mbrookhart
Copy link
Contributor

Sorry! Not sure how I lost this. I don't fully understand this pass, and it seems you've made some more complicated changes above moving it to mixed mode? I would appriciate @tqchen's review, since it was originally his code.

@tqchen
Copy link
Member

tqchen commented Jun 30, 2021

Would be great if @vinx13 can also help to take a look

@d-smirnov
Copy link
Contributor Author

d-smirnov commented Jul 1, 2021

@mbrookhart

and it seems you've made some more complicated changes above moving it to mixed mode?

There is an extra minor change related to not doing the optimization if there were no messages produced by preparation sub-passes.

@d-smirnov
Copy link
Contributor Author

bump

Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the mixed mode parts, but I'd still love to get @vinx13's eyes on it.

src/relay/transforms/fold_scale_axis.cc Show resolved Hide resolved
src/relay/transforms/fold_scale_axis.cc Show resolved Hide resolved
@vinx13
Copy link
Member

vinx13 commented Jul 8, 2021

@d-smirnov There are some irrelevant errors on CI, Could you try again to get CI passed? Thanks

Change-Id: I242ec95f92b3dfc7fa3dd89385f56ab07c6e72a8
@mbrookhart mbrookhart merged commit 63c6df8 into apache:main Jul 15, 2021
@mbrookhart
Copy link
Contributor

Thanks @d-smirnov @vinx13 @tqchen

ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* FoldScaleAxis became non-recursive

FoldScaleAxis moved from ExprVisitor and ExprMutator
to non-recursive MixedModeVisitor and MixedModeMutator.
The specific transforming part itself is still recursive,
however the underlying traversal machinery is non-recursive.

Change-Id: I8bf40bd1f3f039ef0705c665a34a4624067048a1

* Added extra empty lines as requested

Change-Id: I242ec95f92b3dfc7fa3dd89385f56ab07c6e72a8
zxy844288792 pushed a commit to zxy844288792/tvm that referenced this pull request Mar 4, 2022
* FoldScaleAxis became non-recursive

FoldScaleAxis moved from ExprVisitor and ExprMutator
to non-recursive MixedModeVisitor and MixedModeMutator.
The specific transforming part itself is still recursive,
however the underlying traversal machinery is non-recursive.

Change-Id: I8bf40bd1f3f039ef0705c665a34a4624067048a1

* Added extra empty lines as requested

Change-Id: I242ec95f92b3dfc7fa3dd89385f56ab07c6e72a8
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