From ef208dca15c2aeadb94d13b07a8be68d789c6d30 Mon Sep 17 00:00:00 2001 From: wilson-seok Date: Thu, 14 Nov 2024 17:27:12 +0000 Subject: [PATCH 1/2] consider the node which is shape_of subgraph and ocl_impl in update_shape() --- src/plugins/intel_gpu/src/graph/primitive_inst.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp index c92c5854a8199e..412ab897654bf9 100644 --- a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp +++ b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp @@ -392,7 +392,7 @@ void primitive_inst::update_shape() { if (i >= _deps.size()) continue; - if (_deps[i].first->get_node().is_in_shape_of_subgraph()) { + if (_deps[i].first->get_node().is_in_shape_of_subgraph() && _deps[i].first->get_node().get_selected_impl()->is_cpu()) { bool can_skip = true; const auto& insts = _deps[i].first->dependant_shape_of_insts; for (auto& inst : insts) { @@ -432,7 +432,8 @@ void primitive_inst::update_shape() { continue; } - if (!get_node().is_type() && !dep->get_node().is_in_shape_of_subgraph()) { + if (!get_node().is_type() && + !(dep->get_node().is_in_shape_of_subgraph() && dep->get_node().get_selected_impl()->is_cpu())) { has_runtime_deps = true; // Events may be not created for in-order queue, so take them for OOO queue only From 2c364add235923e7a19a0e42414dddc01e3f30ca Mon Sep 17 00:00:00 2001 From: wilson-seok Date: Fri, 15 Nov 2024 09:56:54 +0000 Subject: [PATCH 2/2] simplify condition --- src/plugins/intel_gpu/src/graph/primitive_inst.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp index 412ab897654bf9..1ad11f77adc7a0 100644 --- a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp +++ b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp @@ -432,8 +432,7 @@ void primitive_inst::update_shape() { continue; } - if (!get_node().is_type() && - !(dep->get_node().is_in_shape_of_subgraph() && dep->get_node().get_selected_impl()->is_cpu())) { + if (!get_node().is_type() && !dep->get_node().get_selected_impl()->is_cpu()) { has_runtime_deps = true; // Events may be not created for in-order queue, so take them for OOO queue only