Skip to content

Commit

Permalink
xe: ir: walk order: merge consecutive blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
echeresh committed Oct 18, 2024
1 parent 1794c34 commit 7e1663f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gpu/intel/jit/ir/walk_order.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ class walk_order_t {
}

void add(const prb_dim_t &dim, int block_size, int grid_id) {
if (!blocks_.empty()) {
auto &last = blocks_.back();
if (last.dim == dim && last.grid_id == grid_id) {
last.size *= block_size;
return;
}
}
blocks_.emplace_back(dim, block_size, grid_id);
}

Expand Down

0 comments on commit 7e1663f

Please sign in to comment.