diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp index 76151622f97da0..426d220116b7ad 100644 --- a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp +++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp @@ -980,7 +980,7 @@ void reorder_inputs::run(program& p, reorder_factory& rf) { // correctly and we need to do it manually #ifdef ENABLE_ONEDNN_FOR_GPU for (auto& node : p.get_processing_order()) { - if (node->is_type() && node->get_preferred_impl_type() == impl_types::onednn) { + if ((node->is_type() || node->is_type()) && node->get_preferred_impl_type() == impl_types::onednn) { for (const auto& fused_prim : node->get_fused_primitives()) { if (fused_prim.is_type() && one_of(fused_prim.typed_desc()->mode, {eltwise_mode::sum, eltwise_mode::sub, eltwise_mode::prod})) { diff --git a/src/plugins/intel_gpu/src/graph/program_node.cpp b/src/plugins/intel_gpu/src/graph/program_node.cpp index 202e1476d71a4c..56ff37a29a9915 100644 --- a/src/plugins/intel_gpu/src/graph/program_node.cpp +++ b/src/plugins/intel_gpu/src/graph/program_node.cpp @@ -1549,14 +1549,15 @@ void program_node::create_onednn_primitive_attributes( if (prim->input_size == in_pshape.size()) { ones_to_add = std::max(out_pshape.size(), static_cast(rank)) - in_pshape.size(); } else { - if (in_pshape.size() > prim->input_size) - ones_to_add = in_pshape.size() - prim->input_size; + if (prim->input_size == 3) + cldnn::onednn::combine_bf_with_first_spatial_dim(in); + ones_to_add = std::max(in_pshape.size(), prim->input_size) - std::min(in_pshape.size(), prim->input_size); } if (ones_to_add > 0) { layout new_layout = in; ov::PartialShape new_input_pshape; auto last = in_pshape.begin() + in_pshape.size(); - if (prim->input_size != in_pshape.size()) + if (in_pshape.size() > prim->input_size) last -= ones_to_add; std::vector dims(in_pshape.begin(), last); new_input_pshape = ov::PartialShape(dims); diff --git a/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp b/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp index 5e9b5134fb3802..dbc2f9786518ff 100644 --- a/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp @@ -161,13 +161,13 @@ class FullyConnectedFusingTestOneDNN : public BaseFusingTest