diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/mark_shape_of_subgraphs.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/mark_shape_of_subgraphs.cpp index 7108a4870289c2..2d7a6ea8183cd4 100644 --- a/src/plugins/intel_gpu/src/graph/graph_optimizer/mark_shape_of_subgraphs.cpp +++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/mark_shape_of_subgraphs.cpp @@ -27,11 +27,11 @@ void mark_shape_of_subgraphs::look_for_shape_of_subgraph(program_node& node) { if (node.is_type() && dependencies.size() == 2) { if (dependencies[0].first->is_type() && dependencies[1].first->is_type()) return; + } // Check if all dependencies are constant or marked as a part of shape_of subgraph bool can_execute_in_subgraph = true; bool has_shape_of_subgraph_dep = false; - for (auto& dependency : node.get_dependencies()) { if (dependency.first->is_in_shape_of_subgraph()) { has_shape_of_subgraph_dep = true;