Skip to content

Commit

Permalink
Let remote RPCModule get function recursively (#11053)
Browse files Browse the repository at this point in the history
Same reason as we changed the get_function to recursive searching. This is useful when we treat the local module as a data segment and wrap it in another empty LLVM module to reuse the export_lib API. After de-serialization in remote, the data segment will be translated as an imported module. Thus we need to fetch the function recursively.
  • Loading branch information
Maximilianxu authored Apr 19, 2022
1 parent fe948da commit e2dd0f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/rpc/rpc_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ TVM_REGISTER_GLOBAL("runtime.RPCTimeEvaluator")
<< "Cannot find " << f_preproc_name << " in the global function";
f_preproc = *pf_preproc;
}
PackedFunc pf = m.GetFunction(name, false);
PackedFunc pf = m.GetFunction(name, true);
CHECK(pf != nullptr) << "Cannot find " << name << " in the global registry";
return WrapTimeEvaluator(pf, dev, number, repeat, min_repeat_ms, f_preproc);
}
Expand Down

0 comments on commit e2dd0f8

Please sign in to comment.