Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] Remove planar format forcing for static nodes with reshape user (#37756)

hyunback kim4f2675a5b70f
diff --git a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
index a381d5bc745..15e2055da28 100644
--- a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
+++ b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
@@ -1394,19 +1394,6 @@ format layout_optimizer::get_preferred_format(program_node& node) {
if (allow_new_shape_infer) {
// Let reorder_input pass to check input format instead of output_format in forward investigation, vice versa
auto out_lay_rank = node.get_output_layout(false).get_rank();
- auto has_reshape_user = [&](const program_node& node) -> bool {
- for (const auto& user_node : node.get_users()) {
- if (user_node->is_type<reshape>())
- return true;
- }
- return false;
- };
-
- // Return default format for output layout rank when user node is reshape
- // to add reorder in front of reshape in reorder_input stage instead of handle_reshpae stage.
- // It is only applied for the dynamic shape with static input shape
- if (!node.is_dynamic() && has_reshape_user(node))
- return format::get_default_format(out_lay_rank);
if (node.is_type<shape_of>())
return format::get_default_format(node.get_input_layout(0).get_rank());