Skip to content

Commit

Permalink
Don't disable ExprSimplify in shouldUseZero (#3587)
Browse files Browse the repository at this point in the history
Just a minor fix
  • Loading branch information
naoyam authored Dec 13, 2024
1 parent 79a088a commit 230f633
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions csrc/id_model/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ inline bool shouldUseZeroIndex(
// Trivial loop
auto promotion_id =
getLoopPromotion(loop_group->front()->as<IterDomain>(), id_model);

// ExprSimplify should be disabled here as it would fail to
// recognize size-one IterDomain.
DisableOptionsGuard options_guard;
DisableOptionsGuard::getCurOptions().unset(DisableOption::ExprSimplify);

if (promotion_id->isBroadcast() ||
simplifyExpr(promotion_id->extent())->isOneInt()) {
return true;
Expand Down

0 comments on commit 230f633

Please sign in to comment.