Uh oh!
There was an error while loading. Please reload this page.
[TIR][FIX] Fix crash when using 'if' without 'else' in TVMScript - #13054
Conversation
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 |
shingjan
left a comment
There was a problem hiding this comment.
Thanks for sending this! Looks fine to me. Would that be possible that some tests can be added to this PR so we will know if future changes will break this?
13ff8eb to
0127232CompareWuSiYu
commented
Oct 13, 2022
Yes, a test has been added in test_tir_analysis_estimate_tir_flops.py |
0127232 to
5370454CompareWuSiYu
commented
Oct 13, 2022
@tvm-bot rerun |
5370454 to
b98a87cCompareWuSiYu
commented
Oct 15, 2022
I am not sure but it seem's like the CI is failed by the other ramdom reason, should I continue to try to rerun it? |
This commit fix the tvm's crash during TVMScript's auto-tune when having a 'if' statement which doesn't have a 'else' part. It's cause in tvm's tir processing (tvm.tir.analysis.estimate_flops), in VisitStmt_() for IfThenElseNode it trying to visit the 'else' part whether it is exist. So in this commit, an if logic is added in VisitStmt_() for IfThenElseNode, it will not visit the 'else' part if it is not exist.
b98a87c to
5f95c0fCompare…che#13054) This commit fix the tvm's crash during TVMScript's auto-tune when having a 'if' statement which doesn't have a 'else' part. It's cause in tvm's tir processing (tvm.tir.analysis.estimate_flops), in VisitStmt_() for IfThenElseNode it trying to visit the 'else' part whether it is exist. So in this commit, an if logic is added in VisitStmt_() for IfThenElseNode, it will not visit the 'else' part if it is not exist. Co-authored-by: SiYu Wu <wusiyu@buaa.edu.cn>
…che#13054) This commit fix the tvm's crash during TVMScript's auto-tune when having a 'if' statement which doesn't have a 'else' part. It's cause in tvm's tir processing (tvm.tir.analysis.estimate_flops), in VisitStmt_() for IfThenElseNode it trying to visit the 'else' part whether it is exist. So in this commit, an if logic is added in VisitStmt_() for IfThenElseNode, it will not visit the 'else' part if it is not exist. Co-authored-by: SiYu Wu <wusiyu@buaa.edu.cn>
This commit fix the tvm's crash during auto-tune when having a 'if' statement which doesn't have a 'else' part in TVMScript.
It's cause in tvm's tir processing, in
VisitStmt_()for IfThenElseNode its trying to visit the 'else' part (in TVMScript) whether it is exist.So in this commit, an if logic is added in
VisitStmt_()for IfThenElseNode, it will not visit the 'else' part if it is not exist.