From 210cf48b4748d5a3127a2174ebffa44f2ae382f2 Mon Sep 17 00:00:00 2001 From: "yuan.xiong" Date: Thu, 28 Nov 2024 13:39:21 +0800 Subject: [PATCH] Skip mark_node in shape flow for reorder node if dependency node is broadcase Signed-off-by: yuan.xiong --- .../src/graph/graph_optimizer/mark_shape_of_subgraphs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 9539117bcf4b18..bb165babb44427 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 @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "broadcast_inst.h" +#include "reorder_inst.h" #include "shape_of_inst.h" #include "read_value_inst.h" #include "reshape_inst.h" @@ -26,6 +28,10 @@ void mark_shape_of_subgraphs::look_for_shape_of_subgraph(program_node& node) { bool has_shape_of_subgraph_dep = false; for (auto& dependency : node.get_dependencies()) { if (dependency.first->is_in_shape_of_subgraph()) { + // skip mark_node for reorder node if dependency node is broadcast + if (dependency.first->is_type() && node.is_type()) { + break; + } has_shape_of_subgraph_dep = true; } else if (!dependency.first->is_constant()) { can_execute_in_subgraph = false;