Skip to content

Commit

Permalink
[GPU] Skip reorder opt when its depencency is crop
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-y committed Nov 15, 2024
1 parent 047669b commit 0b5aa18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,6 @@ void prepare_buffer_fusing::run(program& p) {
crop_params->input_offsets[0],
node.get_primitive()->axis,
false);
if (static_cast<bool>(crop_layout.data_padding) && node.get_users().front()->is_type<reorder>())
return;
if (user_info.first) {
node.get_users().front()->set_output_layout(user_info.second);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ 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 (r_node.get_dependency(0).is_type<crop>())
continue;

// Optimize reorder b_fs_yx_fsv16 -> bfyx when spatials are equal to 1. In this case we can reinterpret buffer,
// but pads need to be handled correctly.
if (i_layout.format == format::b_fs_yx_fsv16 && o_layout.format == format::bfyx && !r_node.is_output() &&
Expand Down

0 comments on commit 0b5aa18

Please sign in to comment.