Skip to content

Commit 6121b49

Browse files
apivovarovTrevor Morris
authored andcommitted
Default value for graph_runtime Init lookup_linked_param_func (apache#7676)
1 parent 2fd5c04 commit 6121b49

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/runtime/graph/graph_runtime.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ void GraphRuntime::Run() {
6666
* processor.
6767
* \param ctxs The context of the host and devices where graph nodes will be
6868
* executed on.
69-
* \param lookup_linked_param_func Linked parameter lookup function.
69+
* \param lookup_linked_param_func Linked parameter lookup function. Default is nullptr.
7070
*/
7171
void GraphRuntime::Init(const std::string& graph_json, tvm::runtime::Module module,
72-
const std::vector<TVMContext>& ctxs, PackedFunc lookup_linked_param_func) {
72+
const std::vector<TVMContext>& ctxs,
73+
const PackedFunc lookup_linked_param_func) {
7374
std::istringstream is(graph_json);
7475
dmlc::JSONReader reader(&is);
7576
this->Load(&reader);

src/runtime/graph/graph_runtime.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ class TVM_DLL GraphRuntime : public ModuleNode {
9393
* executed on.
9494
* \param lookup_linked_param_func If given, a PackedFunc invoked to lookup linked parameters
9595
* by storage_id. If not given, linked parameters are looked-up using an internal implementation,
96-
* which is not compatible with RPCModules.
96+
* which is not compatible with RPCModules. Default is nullptr.
9797
*/
9898

9999
void Init(const std::string& graph_json, tvm::runtime::Module module,
100-
const std::vector<TVMContext>& ctxs, const PackedFunc lookup_linked_param_func);
100+
const std::vector<TVMContext>& ctxs,
101+
const PackedFunc lookup_linked_param_func = nullptr);
101102

102103
/*!
103104
* \brief Get the input index given the name of input.

0 commit comments

Comments
 (0)