Skip to content

Commit

Permalink
remove compile warning complained by macos clang-13.0 (#9522)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongtest-intellif authored Nov 22, 2021
1 parent 659631d commit 328d7c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
12 changes: 1 addition & 11 deletions include/tvm/relay/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -228,13 +225,6 @@ class ExecutorRegEntry {
friend class Executor;
};

inline ExecutorRegEntry& ExecutorRegEntry::set_name() {
if (name.empty()) {
name = name;
}
return *this;
}

template <typename ValueType>
inline ExecutorRegEntry& ExecutorRegEntry::add_attr_option(const String& key) {
ICHECK(!key2vtype_.count(key)) << "AttributeError: add_attr_option failed because '" << key
Expand Down Expand Up @@ -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

Expand Down
12 changes: 1 addition & 11 deletions include/tvm/relay/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -220,13 +217,6 @@ class RuntimeRegEntry {
friend class Runtime;
};

inline RuntimeRegEntry& RuntimeRegEntry::set_name() {
if (name.empty()) {
name = name;
}
return *this;
}

template <typename ValueType>
inline RuntimeRegEntry& RuntimeRegEntry::add_attr_option(const String& key) {
ICHECK(!key2vtype_.count(key)) << "AttributeError: add_attr_option failed because '" << key
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 328d7c7

Please sign in to comment.