areusch commented on a change in pull request #6917:
URL: https://github.com/apache/incubator-tvm/pull/6917#discussion_r528400453
##########
File path: src/runtime/graph/graph_runtime.cc
##########
@@ -64,14 +64,19 @@ void GraphRuntime::Run() {
* processor.
* \param ctxs The context of the host and devices where graph nodes will be
* executed on.
+ * \param lookup_linked_param_func Linked parameter lookup function.
*/
void GraphRuntime::Init(const std::string& graph_json, tvm::runtime::Module
module,
- const std::vector<TVMContext>& ctxs) {
+ const std::vector<TVMContext>& ctxs, PackedFunc
lookup_linked_param_func) {
std::istringstream is(graph_json);
dmlc::JSONReader reader(&is);
this->Load(&reader);
module_ = module;
ctxs_ = ctxs;
+ lookup_linked_param_ = lookup_linked_param_func;
+ if (lookup_linked_param_ == nullptr) {
+ lookup_linked_param_ = PackedFunc(&GraphRuntime::DefaultLookupLinkedParam);
Review comment:
done
----------------------------------------------------------------
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]