Skip to content

Commit

Permalink
[GPU] Confine reorder skipping opt condition to different i/o rank
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-y committed Dec 21, 2024
1 parent a097204 commit ba177e8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ void remove_redundant_reorders::run(program& p) {
auto o_layout = r_node.get_output_layout();
const auto& i_layout = r_node.get_input_layout(0);

if ((!update_implementations && r_node.get_dependency(0).is_type<crop>()) ||
(r_node.get_dependency(0).is_type<crop>() && r_node.get_dependency(0).can_be_optimized()))
auto is_r_node_rank_changed = r_node.get_output_layout().get_rank() != r_node.get_dependency(0).get_output_layout().get_rank();
if (is_r_node_rank_changed &&
((!update_implementations && r_node.get_dependency(0).is_type<crop>()) ||
(r_node.get_dependency(0).is_type<crop>() && r_node.get_dependency(0).can_be_optimized())))
continue;

// Optimize reorder b_fs_yx_fsv16 -> bfyx when spatials are equal to 1. In this case we can reinterpret buffer,
Expand Down

0 comments on commit ba177e8

Please sign in to comment.