Skip to content

Commit

Permalink
Default value for graph_runtime Init lookup_linked_param_func (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
apivovarov authored and trevor-m committed May 11, 2021
1 parent 85a98ce commit b71d106
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/runtime/graph/graph_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<TVMContext>& ctxs, PackedFunc lookup_linked_param_func) {
const std::vector<TVMContext>& ctxs,
const PackedFunc lookup_linked_param_func) {
std::istringstream is(graph_json);
dmlc::JSONReader reader(&is);
this->Load(&reader);
Expand Down
5 changes: 3 additions & 2 deletions src/runtime/graph/graph_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<TVMContext>& ctxs, const PackedFunc lookup_linked_param_func);
const std::vector<TVMContext>& ctxs,
const PackedFunc lookup_linked_param_func = nullptr);

/*!
* \brief Get the input index given the name of input.
Expand Down

0 comments on commit b71d106

Please sign in to comment.