Hzfengsy commented on code in PR #14396:
URL: https://github.com/apache/tvm/pull/14396#discussion_r1147593515


##########
src/relax/ir/expr_functor.cc:
##########
@@ -752,6 +752,7 @@ Var ExprMutator::VisitVarDef(const Var& var) {
   } else {
     LOG(FATAL) << "TypeError: Invalid type: " << var->GetTypeKey();
   }
+  this->var_remap_[var->vid] = ret;

Review Comment:
   We only call `VisitVarDef` at the definition side, e.g. the param or 
binding. If we mutate the var `x` to `x'` at the definition side, all use side 
needs to be updated, since `x` no longer exists. 
   
   Could you please show an example to indicate what I missed?



-- 
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]

Reply via email to