comaniac commented on a change in pull request #5797:
URL: https://github.com/apache/incubator-tvm/pull/5797#discussion_r440335267
##########
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:
Since now we update the original module with new transformed function,
should we update the corresponding function instead of `main`?
----------------------------------------------------------------
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]