From 4142128e1c2bbc4ddedf295e244b0cdb01ac3046 Mon Sep 17 00:00:00 2001 From: Luis Vega Date: Thu, 28 Jan 2021 22:11:51 -0800 Subject: [PATCH] [BYOC][Verilator] change runtime registry function name (#7351) * use lowercase for verilator runtime registry function * lint fix * update comment --- src/relay/backend/contrib/verilator/codegen.cc | 2 +- src/runtime/contrib/verilator/verilator_runtime.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/relay/backend/contrib/verilator/codegen.cc b/src/relay/backend/contrib/verilator/codegen.cc index f1c7f785330e..2f61ae540395 100644 --- a/src/relay/backend/contrib/verilator/codegen.cc +++ b/src/relay/backend/contrib/verilator/codegen.cc @@ -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; diff --git a/src/runtime/contrib/verilator/verilator_runtime.cc b/src/runtime/contrib/verilator/verilator_runtime.cc index ae52d9e1e08d..60f36e494da7 100644 --- a/src/runtime/contrib/verilator/verilator_runtime.cc +++ b/src/runtime/contrib/verilator/verilator_runtime.cc @@ -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}; }; @@ -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);