tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] t-vi commented on a change in pull request #5822: fix relay.build to not change the module argument in place
Date Tue, 16 Jun 2020 11:54:44 GMT

t-vi commented on a change in pull request #5822:
URL: https://github.com/apache/incubator-tvm/pull/5822#discussion_r440792289



##########
File path: src/relay/backend/build_module.cc
##########
@@ -244,6 +244,9 @@ class RelayBuildModule : public runtime::ModuleNode {
       GlobalVar main_glb_var = relay_module->GetGlobalVar("main");
       Function main_func = Downcast<Function>(relay_module->Lookup(main_glb_var));
       auto new_main = BindParamsByName(main_func, params);
+      // copy module to avoid changing our input
+      relay_module = IRModule(relay_module->functions, relay_module->type_definitions,

Review comment:
       I must admit I'm not understanding this very well yet, in particular in for the use
of the new `relay_module_ptr` I get from `CopyOnWrite` and the original module.
   Which one would I use for what after CopyOnWrite?




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message