Skip to content
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
4 changes: 4 additions & 0 deletions include/tvm/relay/expr_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ class ExprMutator : public ::tvm::relay::ExprFunctor<Expr(const Expr&)> {
*/
class MixedModeVisitor : public ::tvm::relay::ExprVisitor {
public:
using ::tvm::relay::ExprFunctor<void(const Expr& n)>::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.
Expand Down Expand Up @@ -277,6 +279,8 @@ class MixedModeVisitor : public ::tvm::relay::ExprVisitor {
*/
class MixedModeMutator : public ::tvm::relay::ExprMutator {
public:
using ::tvm::relay::ExprFunctor<Expr(const Expr&)>::VisitExpr_;

MixedModeMutator(bool pre = false) : pre_{pre} {};
Expr VisitExpr(const Expr& expr) final;

Expand Down
4 changes: 2 additions & 2 deletions include/tvm/runtime/container/shape_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
4 changes: 4 additions & 0 deletions include/tvm/runtime/packed_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,10 @@ struct Type2Str<DataType> {
static std::string v() { return "DataType"; }
};
template <>
struct Type2Str<DLDataType> {
static std::string v() { return "DLDataType"; }
};
template <>
struct Type2Str<TVMRetValue> {
static std::string v() { return "TVMRetValue"; }
};
Expand Down