FrozenGene commented on a change in pull request #5753:
URL: https://github.com/apache/incubator-tvm/pull/5753#discussion_r450051881



##########
File path: python/tvm/runtime/module.py
##########
@@ -282,7 +292,19 @@ def export_library(self,
             self.save(file_name)
             return
 
-        modules = self._collect_dso_modules()
+        graph_runtime_factory_modules = 
self._collect_modules("GraphRuntimeFactory")
+        for index, module in enumerate(graph_runtime_factory_modules):
+            if not package_params:
+                module.get_function("diable_package_params")()
+                path_params = os.path.join(os.path.dirname(file_name), 
"deploy_" + str(index) + ".params")
+                from tvm import relay
+                with open(path_params, "wb") as fo:
+                    graph_params = {}
+                    for k, v in module.get_function("get_params")().items():
+                        graph_params[k] = v
+                    fo.write(relay.save_param_dict(graph_params))

Review comment:
       Yes. Good suggestion.




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


Reply via email to