Skip to content

Commit

Permalink
Revert "[GPU] Avoid crop buffer fusing when dynamic shape and squeeze…
Browse files Browse the repository at this point in the history
…/unsqueeze reshape mode" (openvinotoolkit#25895)

### Details:
 - This revert openvinotoolkit#25700
- As support for Crop->Reshape(Squeeze/Unsqueeze modes) buffer
optimization was added by
openvinotoolkit#25836

### Tickets:
 - 146626
  • Loading branch information
andrew-k-park authored Aug 5, 2024
1 parent 5264c99 commit f8d0e8c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,10 @@ bool crop_in_place_optimization::match(const program_node& node,
if (node.is_dynamic() && (user->is_type<convolution>() || user->is_type<gemm>()))
return false;
if (user->is_type<reshape>()) {
auto& reshape_node = user->as<reshape>();
// runtime buffer fusing is only handled when there is only one reshape user and reshape mode is base
if (node.is_dynamic() && (node.get_users().size() != 1 || reshape_node.get_primitive()->mode != reshape::reshape_mode::base))
// runtime buffer fusing is only handled when there is only one reshape user
if (node.is_dynamic() && node.get_users().size() != 1)
return false;
auto& reshape_node = user->as<reshape>();
if (can_reshape_be_optimized(reshape_node) &&
(!node.is_dynamic() || !reshape_node.is_runtime_propagatable_padding()))
return false;
Expand Down

0 comments on commit f8d0e8c

Please sign in to comment.