Skip to content

Commit

Permalink
[BYOC][Verilator] change runtime registry function name (apache#7351)
Browse files Browse the repository at this point in the history
* use lowercase for verilator runtime registry function

* lint fix

* update comment
  • Loading branch information
vegaluisjose authored and trevor-m committed Mar 2, 2021
1 parent 09ca0e8 commit e163fc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit e163fc0

Please sign in to comment.