yzh119 commented on code in PR #14502:
URL: https://github.com/apache/tvm/pull/14502#discussion_r1160844278
##########
src/tir/schedule/primitive/compute_inline.cc:
##########
@@ -295,7 +295,8 @@ class BaseInliner : public StmtExprMutator {
* \param stmt The statement in which to count undefined variables
*/
static int GetNumUndefinedNonpointerVars(const Stmt& stmt) {
- auto undefined_vars = UndefinedVars(stmt, {});
+ // Do not visit buffer shape/strides.
+ auto undefined_vars = UndefinedVars(/*stmt=*/stmt, /*defs=*/{},
/*visit_buffer=*/false);
Review Comment:
@Lunderberg Thanks for your suggestion!
I agree with you that collecting variables outside LCA producer/consumer is
a better idea. I'll revise the code accordingly and ping you again once it's
ready.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]