Lunderberg commented on code in PR #16594:
URL: https://github.com/apache/tvm/pull/16594#discussion_r1499387353


##########
src/relax/transform/canonicalize_bindings.cc:
##########
@@ -247,7 +247,8 @@ class BindingCanonicalizer : public ExprMutator {
   }
 
   Expr VisitExpr_(const VarNode* var) override {
-    Var new_var = GetRef<Var>(var);

Review Comment:
   Hmm, this was definitely required during initial development, and was 
intended to handle cases where a replacement in `ExprMutator::var_remap_` 
occurs outside of the planned replacements in the 
`ReplacementPlan.replace_usage_`.  This can happen if the removal of trivial 
bindings triggers `InferStructInfo` in a downstream operation.  However, that 
doesn't reproduce the bug, nor does that bug occur in anything on my local dev 
branch.
   
   I'm removing this line from the PR, and can make a separate PR (with test 
case!) if/when the bug resurfaces.



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