From c202882011202b4731b0bb7254c18cececc071ba Mon Sep 17 00:00:00 2001 From: Roman Lyamin Date: Thu, 24 Oct 2024 10:49:35 +0400 Subject: [PATCH] [GPU] Enable fusing dynamic eltwise with gemm in onednn case (#27193) --- .../src/graph/graph_optimizer/prepare_primitive_fusing.cpp | 3 ++- src/plugins/intel_gpu/tests/unit/fusions/gemm_fusion_test.cpp | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp index c38fa70e86ccef..39cbc1aa89b4e2 100644 --- a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp +++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp @@ -1071,7 +1071,8 @@ void prepare_primitive_fusing::fuse_simple_primitives(program &p) { auto eltw_in_size = peer_node->get_output_layout(); if (eltw_in_size.is_dynamic() // this whitelist condition is temporarily and to be relaxed soon. - && !fused_node->is_type()) + && !fused_node->is_type() + && !fused_node->is_type()) return; } if (parent1.first->is_type() && !conv_supports_fusings(parent1.first->as())) diff --git a/src/plugins/intel_gpu/tests/unit/fusions/gemm_fusion_test.cpp b/src/plugins/intel_gpu/tests/unit/fusions/gemm_fusion_test.cpp index 631b6879acdf2c..baed5400181130 100644 --- a/src/plugins/intel_gpu/tests/unit/fusions/gemm_fusion_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/fusions/gemm_fusion_test.cpp @@ -419,9 +419,6 @@ class gemm_2in_dynamic_add : public gemm_2in_add {}; TEST_P(gemm_2in_dynamic_add, add) { auto p = GetParam(); - if (engine.get_device_info().supports_immad) - p.expected_fused_primitives++; - cfg_fused.set_property(ov::intel_gpu::allow_new_shape_infer(true)); cfg_not_fused.set_property(ov::intel_gpu::allow_new_shape_infer(true));