ganler commented on code in PR #12515:
URL: https://github.com/apache/tvm/pull/12515#discussion_r950715982
##########
include/tvm/tir/op.h:
##########
@@ -911,7 +911,9 @@ inline PrimExpr MakeConstScalar(DataType t, ValueType
value, Span span = Span())
if (t.is_uint()) {
// Use IntImm if it is a small integer
uint64_t uval = static_cast<uint64_t>(value);
- if (uval <= static_cast<uint64_t>(std::numeric_limits<int64_t>::max())) {
+ if (static_cast<int64_t>(value) < 0) {
Review Comment:
Maybe here we should do `value < static_cast<ValueType>(0)`. Because if
`value` is of `uint64_t`, it will be regarded as a negative number if it is
greater than `numeric_limits<int64_t>::max()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]