diff --git a/include/tvm/expr.h b/include/tvm/expr.h index e7b36487eea0..c28a9183eda6 100644 --- a/include/tvm/expr.h +++ b/include/tvm/expr.h @@ -102,9 +102,13 @@ class Integer : public Expr { */ Integer(int value) : Expr(value) {} // NOLINT(*) /*! - /* \brief Construct integer from int64 value, clamp to INT32_MAX/MIN. - */ + * \brief Construct integer from int64_t value, clamp to INT32_MAX/MIN. + */ Integer(int64_t value) : Integer(int(value > INT32_MAX ? INT32_MAX : (value < INT32_MIN ? INT32_MIN : value))) {} // NOLINT(*) + /*! + * \brief Construct integer from uint64_t value, clamp to INT32_MAX. + */ + Integer(uint64_t value) : Integer(int(value > INT32_MAX ? INT32_MAX : value)) {} // NOLINT(*) /*! * \brief Assign an expression to integer. * \param other another expression.