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

Legalize - Use Non-recursive Rewriter. #5296

Merged
merged 2 commits into from
Apr 10, 2020

Conversation

anijain2305
Copy link
Contributor

One of my pre-quantized model parsing was seeing segfault because of stack overflow. Switching to non-recursive mutation resolves the issue, and I can compile the model successfully. Thanks for this work!

@mbrookhart @tqchen

@tqchen
Copy link
Member

tqchen commented Apr 9, 2020

@mbrookhart can you help to review the PR

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.

LGTM. Thanks!

// Get the new_call node without any changes to current call node.
Expr new_e = ExprMutator::VisitExpr_(call_node);
Expr new_e = post;
Copy link
Member

Choose a reason for hiding this comment

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

Can we just rename post to new_e and remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not directly rename, as new_e was supposed to be the new expr and post is a cont. But, I have cleaned up the code, so that new_e is not needed anymore.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

great to see the non-recursive rewriter being used!

@FrozenGene
Copy link
Member

@LiangHao151941 I think you could benefit this in your pr #4828

@tqchen tqchen merged commit 7d670b0 into apache:master Apr 10, 2020
@tqchen
Copy link
Member

tqchen commented Apr 10, 2020

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
* Legalize - Use Non-recursive Rewriter.

* Cleanup.
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
* Legalize - Use Non-recursive Rewriter.

* Cleanup.
dpankratz pushed a commit to dpankratz/incubator-tvm that referenced this pull request Apr 24, 2020
* Legalize - Use Non-recursive Rewriter.

* Cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants