diff --git a/include/tvm/relay/expr_functor.h b/include/tvm/relay/expr_functor.h index fab579d0edd9..d8f575dfdf48 100644 --- a/include/tvm/relay/expr_functor.h +++ b/include/tvm/relay/expr_functor.h @@ -232,6 +232,8 @@ class ExprMutator : public ::tvm::relay::ExprFunctor { */ class MixedModeVisitor : public ::tvm::relay::ExprVisitor { public: + using ::tvm::relay::ExprFunctor::VisitExpr_; + /*! \brief The constructor of MixedModeVisitor * \param visit_limit The number of times to allow visitation to a node. Usually 1, ocassionally * higher (i.e., 2 for dead code elimiation), limited to 10 as a sanity check. @@ -277,6 +279,8 @@ class MixedModeVisitor : public ::tvm::relay::ExprVisitor { */ class MixedModeMutator : public ::tvm::relay::ExprMutator { public: + using ::tvm::relay::ExprFunctor::VisitExpr_; + MixedModeMutator(bool pre = false) : pre_{pre} {}; Expr VisitExpr(const Expr& expr) final; diff --git a/include/tvm/runtime/container/shape_tuple.h b/include/tvm/runtime/container/shape_tuple.h index 774077fc3d5e..3a6f1843d4ab 100644 --- a/include/tvm/runtime/container/shape_tuple.h +++ b/include/tvm/runtime/container/shape_tuple.h @@ -133,8 +133,8 @@ class ShapeTuple : public ObjectRef { * \return the i-th element. */ index_type operator[](size_t idx) const { - ICHECK(0 <= idx && idx < this->size()) - << "IndexError: indexing " << idx << " on an array of size " << this->size(); + ICHECK(idx < this->size()) << "IndexError: indexing " << idx << " on an array of size " + << this->size(); return this->data()[idx]; } diff --git a/include/tvm/runtime/packed_func.h b/include/tvm/runtime/packed_func.h index 232ccd11f3c3..326f9661dfde 100644 --- a/include/tvm/runtime/packed_func.h +++ b/include/tvm/runtime/packed_func.h @@ -1448,6 +1448,10 @@ struct Type2Str { static std::string v() { return "DataType"; } }; template <> +struct Type2Str { + static std::string v() { return "DLDataType"; } +}; +template <> struct Type2Str { static std::string v() { return "TVMRetValue"; } };