Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for graph_runtime Init lookup_linked_param_func #7676

Merged
merged 1 commit into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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