Skip to content

Commit

Permalink
[schedule] Improve ceil_divide in tile/split
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhliu committed Aug 27, 2019
1 parent 347e3d9 commit 885204a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/schedule/message_passing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void PassDownDomain(const Stage& stage,
arith::Analyzer* actx,
bool allow_missing) {
auto ceil_div = [actx](Expr a, Expr b) {
if (actx->CanProve(a % b == 0)) {
return actx->Simplify(a / b);
}
return actx->Simplify((a + (b - 1)) / b);
};

Expand Down

0 comments on commit 885204a

Please sign in to comment.