diff --git a/src/contrib/msc/core/ir/graph_builder.h b/src/contrib/msc/core/ir/graph_builder.h index 4b042c5617e4..d514a793475d 100644 --- a/src/contrib/msc/core/ir/graph_builder.h +++ b/src/contrib/msc/core/ir/graph_builder.h @@ -51,7 +51,8 @@ namespace msc { using Expr = tvm::RelayExpr; using RelaxExprVisitor = tvm::relax::ExprVisitor; using RelayExprVisitor = tvm::relay::ExprVisitor; -using namespace tvm::runtime; + +using tvm::runtime::NDArray; /*! * \brief Config for building MSCGraph. diff --git a/src/relay/backend/vm/compiler.h b/src/relay/backend/vm/compiler.h index acb4d2d1d258..d22fb3d4d5ca 100644 --- a/src/relay/backend/vm/compiler.h +++ b/src/relay/backend/vm/compiler.h @@ -51,7 +51,8 @@ namespace tvm { namespace relay { namespace vm { -using namespace tvm::runtime; +using tvm::runtime::ModulePropertyMask; +using tvm::runtime::NDArray; using namespace tvm::runtime::vm; using namespace relay::transform; diff --git a/src/relay/parser/parser.cc b/src/relay/parser/parser.cc index b519a1778ce0..233455bf89ba 100644 --- a/src/relay/parser/parser.cc +++ b/src/relay/parser/parser.cc @@ -48,6 +48,8 @@ namespace relay { /*! \brief The meta table maps from type key to a sequence of objects. */ using MetaTable = Map>; +using tvm::runtime::NDArray; +using tvm::runtime::String2DLDataType; using tvm::transform::CreateModulePass; using tvm::transform::PassContext; diff --git a/src/relay/parser/token.h b/src/relay/parser/token.h index 7b11e701cf6e..13875cb09391 100644 --- a/src/relay/parser/token.h +++ b/src/relay/parser/token.h @@ -36,8 +36,6 @@ namespace tvm { namespace relay { -using namespace runtime; - enum class TokenType { kCommentStart, kCommentEnd, diff --git a/src/relay/parser/tokenizer.h b/src/relay/parser/tokenizer.h index 04dcd3263e99..2b7ad4e5593e 100644 --- a/src/relay/parser/tokenizer.h +++ b/src/relay/parser/tokenizer.h @@ -41,8 +41,6 @@ namespace tvm { namespace relay { -using namespace runtime; - // trim from start (in place) static inline void ltrim(std::string& s) { // NOLINT(*) s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); })); diff --git a/src/runtime/contrib/cblas/gemm_common.h b/src/runtime/contrib/cblas/gemm_common.h index af073da9ba1a..91341976bd02 100644 --- a/src/runtime/contrib/cblas/gemm_common.h +++ b/src/runtime/contrib/cblas/gemm_common.h @@ -34,7 +34,10 @@ namespace tvm { namespace contrib { -using namespace runtime; +using runtime::TVMArgs; +using runtime::TVMRetValue; +using runtime::TypeMatch; + inline int ColumnStride(const DLTensor* tensor) { // If the tensor itself is transposed then it will have strides // backward from what we expect. Regardless, the max of the strides diff --git a/src/runtime/contrib/json/json_node.h b/src/runtime/contrib/json/json_node.h index bafe6cfbec18..dd16c606815a 100644 --- a/src/runtime/contrib/json/json_node.h +++ b/src/runtime/contrib/json/json_node.h @@ -42,7 +42,6 @@ namespace tvm { namespace runtime { namespace json { -using namespace tvm::runtime; using JSONGraphAttrs = std::unordered_map; /*! diff --git a/src/runtime/contrib/nnpack/nnpack_utils.h b/src/runtime/contrib/nnpack/nnpack_utils.h index 4396ea0bcde6..ed0312dac476 100644 --- a/src/runtime/contrib/nnpack/nnpack_utils.h +++ b/src/runtime/contrib/nnpack/nnpack_utils.h @@ -30,7 +30,6 @@ namespace tvm { namespace contrib { -using namespace runtime; struct NNPackThreadLocalEntry { pthreadpool_t threadpool{nullptr}; diff --git a/src/runtime/contrib/verilator/verilator_runtime.h b/src/runtime/contrib/verilator/verilator_runtime.h index 9ef17d7481ab..14bf0bcdfc9b 100644 --- a/src/runtime/contrib/verilator/verilator_runtime.h +++ b/src/runtime/contrib/verilator/verilator_runtime.h @@ -43,7 +43,6 @@ namespace tvm { namespace runtime { namespace contrib { -using namespace tvm::runtime; using namespace tvm::runtime::contrib; using namespace tvm::runtime::json;