Skip to content

Commit 885204a

Browse files
committed
[schedule] Improve ceil_divide in tile/split
1 parent 347e3d9 commit 885204a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/schedule/message_passing.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ void PassDownDomain(const Stage& stage,
5656
arith::Analyzer* actx,
5757
bool allow_missing) {
5858
auto ceil_div = [actx](Expr a, Expr b) {
59+
if (actx->CanProve(a % b == 0)) {
60+
return actx->Simplify(a / b);
61+
}
5962
return actx->Simplify((a + (b - 1)) / b);
6063
};
6164

0 commit comments

Comments
 (0)