electriclilies commented on a change in pull request #8914:
URL: https://github.com/apache/tvm/pull/8914#discussion_r703725048



##########
File path: src/relay/ir/transform.cc
##########
@@ -133,9 +133,8 @@ IRModule FunctionPassNode::operator()(IRModule mod, const 
PassContext& pass_ctx)
   DLOG(INFO) << "Executing function pass : " << pass_info->name
              << " with opt level: " << pass_info->opt_level;
 
-  // Execute the pass function and return a new module.
   IRModule updated_mod =
-      IRModule(mod->functions, mod->type_definitions, mod->Imports(), 
mod->source_map);
+      IRModule(mod->functions, mod->type_definitions, mod->Imports(), 
mod->source_map, mod->attrs);

Review comment:
       I was thinking about something like that, but unfortunately the copy 
constructor will only increment refs on the shared pointers of the IRModule 
fields, so it won't work. 
   I can make a helper function that returns `IRModule(mod->functions, ..., 
mod->attrs)`, though. 




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