Skip to content

Commit

Permalink
[GPU] Prevent Crop optimization with fused prims
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyamin-Roman committed Oct 11, 2024
1 parent 31f5490 commit 0f93f5c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ bool crop_in_place_optimization::match(const program_node& node,
return false;
// if the node is marked as network output, prevent optimizations which would affect a form of its output,
// unless debug flag is set
if (node.is_output() || crop_params.fused_desc.size() > 0 || node.is_in_shape_of_subgraph())
if (node.is_output() || crop_params.has_fused_primitives() || node.is_in_shape_of_subgraph())
return false;

const auto& crop_layout = crop_params.get_output_layout();
Expand Down Expand Up @@ -544,6 +544,9 @@ bool crop_in_place_optimization::optimize(crop_node& node) {
auto input_layout = node.get_input_layout(0);
auto crop_params = node.get_kernel_impl_params();

if (crop_params->has_fused_primitives())
return false;

// Regular crop
// crop input buffer
// |___________data____________|
Expand Down

0 comments on commit 0f93f5c

Please sign in to comment.