-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Fix] Fix recursive let for well formed check #5780
Conversation
@lixiaoquan Could you check if the pr fixes your issue? |
Thanks for fixing this, I found other passes also have similar issue. This is VarVisitor used in FreeVars().
I also run into stack overflow in DeDup() and ConstantFold(), but I'm not sure whether they are similar issue. |
We probably need to port the passes to the non-recursive form. |
Thanks @lixiaoquan. I've applied your patch. For other passes, I agree with @zhiics that we should rewrite them to non-recursive form. |
@MarisaKirisame can you check this out. |
@icemelon9 @lixiaoquan I am missing context. what is this patch trying to solve? |
@MarisaKirisame This is to fix too many recursive visits into the let list that causes the stack overflow. |
} | ||
CheckWellFormed(let); | ||
while (!scopes.empty()) { | ||
delete scopes.back(); |
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.
can you use unique_ptr?
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.
cc @lixiaoquan @jroesch