comaniac commented on a change in pull request #5797:
URL: https://github.com/apache/incubator-tvm/pull/5797#discussion_r440993336
##########
File path: src/relay/transforms/merge_composite.cc
##########
@@ -36,22 +36,24 @@ namespace tvm {
namespace relay {
namespace merge_composite {
-Function InferType(const Function& expr) {
- auto mod = IRModule::FromExpr(expr);
+Function InferType(const Function& expr, const IRModule& m) {
+ IRModule mod(m);
+ mod->Update(mod->GetGlobalVar("main"), expr);
Review comment:
Make sense, although I still prefer to avoid dummy modules. I think it's
fine to let his PR in first, and maybe I can fix that later on.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]