diff --git a/include/tvm/relay/executor.h b/include/tvm/relay/executor.h index 4c3b1d3d8a..6d1bd2de7f 100644 --- a/include/tvm/relay/executor.h +++ b/include/tvm/relay/executor.h @@ -169,9 +169,6 @@ class Executor : public ObjectRef { */ class ExecutorRegEntry { public: - /*! \brief Set name of the Executor to be the same as registry if it is empty */ - inline ExecutorRegEntry& set_name(); - /*! * \brief Register a valid configuration option and its ValueType for validation * \param key The configuration key @@ -228,13 +225,6 @@ class ExecutorRegEntry { friend class Executor; }; -inline ExecutorRegEntry& ExecutorRegEntry::set_name() { - if (name.empty()) { - name = name; - } - return *this; -} - template inline ExecutorRegEntry& ExecutorRegEntry::add_attr_option(const String& key) { ICHECK(!key2vtype_.count(key)) << "AttributeError: add_attr_option failed because '" << key @@ -279,7 +269,7 @@ inline ExecutorRegEntry& ExecutorRegEntry::add_attr_option(const String& key, */ #define TVM_REGISTER_EXECUTOR(ExecutorName) \ TVM_STR_CONCAT(TVM_EXECUTOR_REGISTER_VAR_DEF, __COUNTER__) = \ - ::tvm::relay::ExecutorRegEntry::RegisterOrGet(ExecutorName).set_name() + ::tvm::relay::ExecutorRegEntry::RegisterOrGet(ExecutorName) } // namespace relay } // namespace tvm diff --git a/include/tvm/relay/runtime.h b/include/tvm/relay/runtime.h index 38b87c5c9c..c4cabf5a55 100644 --- a/include/tvm/relay/runtime.h +++ b/include/tvm/relay/runtime.h @@ -161,9 +161,6 @@ class Runtime : public ObjectRef { */ class RuntimeRegEntry { public: - /*! \brief Set name of the Runtime to be the same as registry if it is empty */ - inline RuntimeRegEntry& set_name(); - /*! * \brief Register a valid configuration option and its ValueType for validation * \param key The configuration key @@ -220,13 +217,6 @@ class RuntimeRegEntry { friend class Runtime; }; -inline RuntimeRegEntry& RuntimeRegEntry::set_name() { - if (name.empty()) { - name = name; - } - return *this; -} - template inline RuntimeRegEntry& RuntimeRegEntry::add_attr_option(const String& key) { ICHECK(!key2vtype_.count(key)) << "AttributeError: add_attr_option failed because '" << key @@ -271,7 +261,7 @@ inline RuntimeRegEntry& RuntimeRegEntry::add_attr_option(const String& key, */ #define TVM_REGISTER_RUNTIME(RuntimeName) \ TVM_STR_CONCAT(TVM_RUNTIME_REGISTER_VAR_DEF, __COUNTER__) = \ - ::tvm::relay::RuntimeRegEntry::RegisterOrGet(RuntimeName).set_name() + ::tvm::relay::RuntimeRegEntry::RegisterOrGet(RuntimeName) } // namespace relay } // namespace tvm diff --git a/src/relay/backend/contrib/example_target_hooks/tir_to_runtime.cc b/src/relay/backend/contrib/example_target_hooks/tir_to_runtime.cc index 36d801d349..c90c765d3d 100644 --- a/src/relay/backend/contrib/example_target_hooks/tir_to_runtime.cc +++ b/src/relay/backend/contrib/example_target_hooks/tir_to_runtime.cc @@ -30,6 +30,8 @@ using namespace tir; class CodeGenExampleTargetHook : public codegen::CodeGenCHost { public: + using codegen::CodeGenCHost::VisitExpr_; + /*! * \brief Emit code that changes adds to multiplies for testing */