Skip to content

Commit 06a6219

Browse files
committed
Why dims has the same size as outer_dims?
1 parent 26b3cec commit 06a6219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/autoschedulers/mullapudi2016/AutoSchedule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3302,8 +3302,8 @@ void Partitioner::generate_group_cpu_schedule(
33023302
}
33033303

33043304
// Find the level at which group members will be computed.
3305-
internal_assert(dims.size() > outer_dims.size());
3306-
const auto tile_inner_index = dims.size() - outer_dims.size() - 1;
3305+
internal_assert(dims.size() >= outer_dims.size());
3306+
const auto tile_inner_index = std::max(int(dims.size() - outer_dims.size()) - 1, 0);
33073307
VarOrRVar tile_inner_var(Var::outermost());
33083308
if (!outer_dims.empty()) {
33093309
string var_name = get_base_name(dims[tile_inner_index].var);

0 commit comments

Comments
 (0)