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

[BYOC][Verilator] change runtime registry function name #7351

Merged
merged 3 commits into from
Jan 29, 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
2 changes: 1 addition & 1 deletion src/relay/backend/contrib/verilator/codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ runtime::Module VerilatorCompiler(const ObjectRef& ref) {

auto lib_name = cfg.value()->lib;

const auto* pf = runtime::Registry::Get("runtime.VerilatorJSONRuntimeCreate");
const auto* pf = runtime::Registry::Get("runtime.verilator_runtime_create");
CHECK(pf != nullptr) << "Cannot find JSON runtime module to create";
auto mod = (*pf)(lib_name, func_name, graph_json, params);
return mod;
Expand Down
5 changes: 2 additions & 3 deletions src/runtime/contrib/verilator/verilator_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class VerilatorJSONRuntime : public JSONRuntimeBase {
VerilatorHandle device_{nullptr};
/* The verilator library handle. */
VerilatorLibrary* lib_{nullptr};
/* The verilator add function handle */
/* The verilator vadd function handle. */
VerilatorAddFunc vadd_func_{nullptr};
};

Expand All @@ -154,8 +154,7 @@ runtime::Module VerilatorJSONRuntimeCreate(String lib_name, String symbol_name,
return runtime::Module(n);
}

TVM_REGISTER_GLOBAL("runtime.VerilatorJSONRuntimeCreate")
.set_body_typed(VerilatorJSONRuntimeCreate);
TVM_REGISTER_GLOBAL("runtime.verilator_runtime_create").set_body_typed(VerilatorJSONRuntimeCreate);

TVM_REGISTER_GLOBAL("runtime.module.loadbinary_verilator_json")
.set_body_typed(JSONRuntimeBase::LoadFromBinary<VerilatorJSONRuntime>);
Expand Down