From ef4c9c7a65a3a509f11673e5d089cd0c8be7d5ac Mon Sep 17 00:00:00 2001 From: Alexander Pivovarov Date: Tue, 16 Mar 2021 17:07:42 -0700 Subject: [PATCH] Default value for graph_runtime Init lookup_linked_param_func --- src/runtime/graph/graph_runtime.cc | 5 +++-- src/runtime/graph/graph_runtime.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/runtime/graph/graph_runtime.cc b/src/runtime/graph/graph_runtime.cc index 6c51e711aef1..531852fc9057 100644 --- a/src/runtime/graph/graph_runtime.cc +++ b/src/runtime/graph/graph_runtime.cc @@ -66,10 +66,11 @@ 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. + * \param lookup_linked_param_func Linked parameter lookup function. Default is nullptr. */ void GraphRuntime::Init(const std::string& graph_json, tvm::runtime::Module module, - const std::vector& ctxs, PackedFunc lookup_linked_param_func) { + const std::vector& ctxs, + const PackedFunc lookup_linked_param_func) { std::istringstream is(graph_json); dmlc::JSONReader reader(&is); this->Load(&reader); diff --git a/src/runtime/graph/graph_runtime.h b/src/runtime/graph/graph_runtime.h index a1e2ee3b5d74..e417d2aa4bfc 100644 --- a/src/runtime/graph/graph_runtime.h +++ b/src/runtime/graph/graph_runtime.h @@ -93,11 +93,12 @@ class TVM_DLL GraphRuntime : public ModuleNode { * executed on. * \param lookup_linked_param_func If given, a PackedFunc invoked to lookup linked parameters * by storage_id. If not given, linked parameters are looked-up using an internal implementation, - * which is not compatible with RPCModules. + * which is not compatible with RPCModules. Default is nullptr. */ void Init(const std::string& graph_json, tvm::runtime::Module module, - const std::vector& ctxs, const PackedFunc lookup_linked_param_func); + const std::vector& ctxs, + const PackedFunc lookup_linked_param_func = nullptr); /*! * \brief Get the input index given the name of input.