Skip to content
Open
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: 2 additions & 2 deletions src/arith/const_fold.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ inline ffi::Optional<PrimExpr> TryConstFold<tirx::Min>(PrimExpr a, PrimExpr b) {
TVM_ARITH_CONST_PROPAGATION({
const DataType& rtype = a.dtype();
if (pa && pb) return IntImm(rtype, std::min(pa->value, pb->value));
if (fa && fb) return FloatImm(rtype, std::min(fa->value, fb->value));
if (fa && fb) return FloatImm(rtype, std::fmin(fa->value, fb->value));
Comment on lines 332 to +333
});
if (a.same_as(b)) return a;
return std::nullopt;
Expand All @@ -341,7 +341,7 @@ inline ffi::Optional<PrimExpr> TryConstFold<tirx::Max>(PrimExpr a, PrimExpr b) {
TVM_ARITH_CONST_PROPAGATION({
const DataType& rtype = a.dtype();
if (pa && pb) return IntImm(rtype, std::max(pa->value, pb->value));
if (fa && fb) return FloatImm(rtype, std::max(fa->value, fb->value));
if (fa && fb) return FloatImm(rtype, std::fmax(fa->value, fb->value));
Comment on lines 343 to +344
});
if (a.same_as(b)) return a;
return std::nullopt;
Expand Down