StrongerXi commented on code in PR #13343:
URL: https://github.com/apache/tvm/pull/13343#discussion_r1019723407


##########
src/relay/transforms/fold_constant.cc:
##########
@@ -434,11 +426,20 @@ Expr FoldConstantExpr(const Expr& expr, const IRModule& 
mod, bool fold_qnn) {
   return result;
 }
 
-TVM_REGISTER_GLOBAL("relay._transform.FoldConstantExpr").set_body_typed(FoldConstantExpr);
+Expr FoldConstantExpr(const Expr& expr, bool fold_qnn) {
+  auto mod = IRModule::FromExpr(expr);
+  return FoldConstantExpr(expr, mod, fold_qnn);
+}
+
+TVM_REGISTER_GLOBAL("relay._transform.FoldConstantExpr").set_body_typed(
+    [](const Expr& expr, const IRModule& mod, bool fold_qnn) {
+      return FoldConstantExpr(expr, mod, fold_qnn);
+    }
+);

Review Comment:
   This is needed to resolve the name overloading -- I decided to keep the 
`FoldConstantExpr` names.



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