Mousius commented on a change in pull request #8788:
URL: https://github.com/apache/tvm/pull/8788#discussion_r721190481
##########
File path: include/tvm/relay/transform.h
##########
@@ -165,11 +165,12 @@ TVM_DLL Pass ToANormalForm();
/*!
* \brief ToANormalForm but on incomplete graph.
*
+ * \param maybe_mod optional module holding definitions for global vars in \p
expr
* \param expr the graph.
*
* \return The transformed program.
*/
-TVM_DLL Expr ToANormalForm(const Expr& expr);
+TVM_DLL Expr ToANormalForm(const Optional<IRModule>& maybe_mod, const Expr&
expr);
Review comment:
The optional argument should probably be second to allow for the default
behaviour to be just passing `expr` ?
##########
File path: src/relay/transforms/fuse_ops.cc
##########
@@ -1028,7 +1029,7 @@ Pass FuseOps(int fuse_opt_level) {
auto max_fuse_depth = pc->GetConfig("relay.FuseOps.max_depth",
Integer(kMaxFusedOps));
return Downcast<Function>(FuseOps(f, opt_level,
max_fuse_depth.value(), m));
};
- return CreateFunctionPass(pass_func, 1, "FuseOps", {"InferType"});
+ return CreateFunctionPass(pass_func, 0, "FuseOps", {"InferType"});
Review comment:
Shouldn't this be `1` as it's an optimisation in itself?
--
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]