Skip to content

Commit

Permalink
reverted old behavior with pdim_consistent check due to perf problems
Browse files Browse the repository at this point in the history
  • Loading branch information
antonvor authored and dmitry-gorokhov committed Feb 20, 2022
1 parent 49d6a78 commit 994f9c5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/cpu/x64/jit_uni_reorder_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,19 @@ status_t prb_init(prb_t &p, const memory_desc_t &imd, const memory_desc_t &omd,
if (utils::rnd_up(dim, cblock) != pdim) return unimplemented;
}

// todo: [AV] reverted old behavior with pdim_consistent check due to perf problems
// (reference implementation (simple reorder) is faster than jit)
for (int d = 0; d < im_d.ndims(); ++d) {
const int ip_tmp_dim = im_d.padded_dims()[d];
const int op_tmp_dim = om_d.padded_dims()[d];
const int ip_tmp_tail = ip_tmp_dim % oblocks[d];
const int op_tmp_tail = op_tmp_dim % iblocks[d];

const bool pdim_consistent = ip_tmp_dim == op_tmp_dim
&& ip_tmp_tail == 0 && op_tmp_tail == 0;
if (!pdim_consistent) return status::unimplemented;
}

utils::array_set(i_tails, 0, im_d.ndims());
utils::array_set(o_tails, 0, om_d.ndims());
utils::array_set(i_paddings, 0, im_d.ndims());
Expand Down

0 comments on commit 994f9c5

Please sign in to comment.