From d64bb965b933c46612e266c34319daacbbcf200d Mon Sep 17 00:00:00 2001 From: Luis Vega Date: Wed, 27 Jan 2021 18:23:59 +0000 Subject: [PATCH 1/3] use lowercase for verilator runtime registry function --- src/relay/backend/contrib/verilator/codegen.cc | 2 +- src/runtime/contrib/verilator/verilator_runtime.cc | 2 +- 2 files changed, 2 insertions(+), 2 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..86a69bf778ef 100644 --- a/src/runtime/contrib/verilator/verilator_runtime.cc +++ b/src/runtime/contrib/verilator/verilator_runtime.cc @@ -154,7 +154,7 @@ runtime::Module VerilatorJSONRuntimeCreate(String lib_name, String symbol_name, return runtime::Module(n); } -TVM_REGISTER_GLOBAL("runtime.VerilatorJSONRuntimeCreate") +TVM_REGISTER_GLOBAL("runtime.verilator_runtime_create") .set_body_typed(VerilatorJSONRuntimeCreate); TVM_REGISTER_GLOBAL("runtime.module.loadbinary_verilator_json") From 385fa4cf2df16b8904d93fef96e5fe37c731b385 Mon Sep 17 00:00:00 2001 From: Luis Vega Date: Wed, 27 Jan 2021 19:48:34 +0000 Subject: [PATCH 2/3] lint fix --- src/runtime/contrib/verilator/verilator_runtime.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/runtime/contrib/verilator/verilator_runtime.cc b/src/runtime/contrib/verilator/verilator_runtime.cc index 86a69bf778ef..58f2120cb48f 100644 --- a/src/runtime/contrib/verilator/verilator_runtime.cc +++ b/src/runtime/contrib/verilator/verilator_runtime.cc @@ -154,8 +154,7 @@ runtime::Module VerilatorJSONRuntimeCreate(String lib_name, String symbol_name, return runtime::Module(n); } -TVM_REGISTER_GLOBAL("runtime.verilator_runtime_create") - .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); From c2977dcc940701ee36412bdeaa2999b3dd7e7a43 Mon Sep 17 00:00:00 2001 From: Luis Vega Date: Thu, 28 Jan 2021 23:36:28 +0000 Subject: [PATCH 3/3] update comment --- src/runtime/contrib/verilator/verilator_runtime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/contrib/verilator/verilator_runtime.cc b/src/runtime/contrib/verilator/verilator_runtime.cc index 58f2120cb48f..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}; };