Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup] Remove using namespace tvm::runtime from headers #17246

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/contrib/msc/core/ir/graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/relay/backend/vm/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/relay/parser/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ namespace relay {
/*! \brief The meta table maps from type key to a sequence of objects. */
using MetaTable = Map<String, Array<ObjectRef>>;

using tvm::runtime::NDArray;
using tvm::runtime::String2DLDataType;
using tvm::transform::CreateModulePass;
using tvm::transform::PassContext;

Expand Down
2 changes: 0 additions & 2 deletions src/relay/parser/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
namespace tvm {
namespace relay {

using namespace runtime;

enum class TokenType {
kCommentStart,
kCommentEnd,
Expand Down
2 changes: 0 additions & 2 deletions src/relay/parser/tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }));
Expand Down
5 changes: 4 additions & 1 deletion src/runtime/contrib/cblas/gemm_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/runtime/contrib/json/json_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace tvm {
namespace runtime {
namespace json {

using namespace tvm::runtime;
using JSONGraphAttrs = std::unordered_map<std::string, dmlc::any>;

/*!
Expand Down
1 change: 0 additions & 1 deletion src/runtime/contrib/nnpack/nnpack_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

namespace tvm {
namespace contrib {
using namespace runtime;

struct NNPackThreadLocalEntry {
pthreadpool_t threadpool{nullptr};
Expand Down
1 change: 0 additions & 1 deletion src/runtime/contrib/verilator/verilator_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ namespace tvm {
namespace runtime {
namespace contrib {

using namespace tvm::runtime;
using namespace tvm::runtime::contrib;
using namespace tvm::runtime::json;

Expand Down
Loading