Skip to content

Commit

Permalink
Fix out of bounds access in anderson2021_test_apps_autoscheduler (#7771)
Browse files Browse the repository at this point in the history
* Fix out of bounds access in anderson2021_test_apps_autoscheduler

* clang-format
  • Loading branch information
aekul authored Aug 21, 2023
1 parent 36eb0b2 commit f11e80d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/autoschedulers/anderson2021/SearchSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ vector<SearchSpace::ParallelTileOption> SearchSpace::filter_parallel_tile_option
if (c->node == node) {
int64_t total = 1;
int64_t max_available = 1;
for (const auto &l : c->stage->loop) {
for (size_t i = 0; i < c->stage->loop.size(); i++) {
const auto &l = c->stage->loop[i];
if (!l.rvar) {
total *= o.outer_tiling[l.pure_dim];
internal_assert(l.pure_dim < c->size.size()) << "l.pure_dim " << l.pure_dim << " c->size.size() " << c->size.size() << "\n";
max_available *= c->size[l.pure_dim];
max_available *= c->size[i];
}
}
max_total = std::max(max_total, total);
Expand Down

0 comments on commit f11e80d

Please sign in to comment.