diff --git a/src/plugins/intel_cpu/src/graph_optimizer.cpp b/src/plugins/intel_cpu/src/graph_optimizer.cpp index 2382176069e227..c25d59bf7bd897 100644 --- a/src/plugins/intel_cpu/src/graph_optimizer.cpp +++ b/src/plugins/intel_cpu/src/graph_optimizer.cpp @@ -927,7 +927,8 @@ void GraphOptimizer::FuseFCAndConvertOnWeights(Graph& graph) { continue; } const auto convert = fullyConnected->getParentEdgeAt(1)->getParent(); - if (convert->getType() != Type::Convert || convert->getOriginalInputPrecisionAtPort(0) != ov::element::f16 || + if (convert->getType() != Type::Convert || + !one_of(convert->getOriginalInputPrecisionAtPort(0), ov::element::f16, ov::element::bf16) || !one_of(convert->getOriginalOutputPrecisionAtPort(0), ov::element::f32, ov::element::bf16) || !convert->isConstant()) { continue; diff --git a/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/matmul_decompress_convert.cpp b/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/matmul_decompress_convert.cpp index 42b29801674c73..e08dd30624930d 100644 --- a/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/matmul_decompress_convert.cpp +++ b/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/matmul_decompress_convert.cpp @@ -211,7 +211,7 @@ class MatMulDecompressConvertTest : public testing::WithParamInterface(inType, inShapeA)}; std::shared_ptr inputB = ov::test::utils::make_constant(weiConstElemType, inShapeB.get_shape()); - if (weiConstElemType == ElementType::f16) { + if (weiConstElemType == ElementType::f16 || weiConstElemType == ElementType::bf16) { inputB = std::make_shared(inputB, convertOutType); mark_as_decompression(inputB); } @@ -311,15 +311,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_FC_2D_FP32, testParams2D_FP32_smoke, MatMulDecompressConvertTest::getTestCaseName); -const auto testParams2D_FP16_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes2D), - ::testing::ValuesIn(transposeParams), - ::testing::Values(ElementType::f16), - ::testing::Values(emptyConfig), - ::testing::ValuesIn(filter_specific_params(false))); +const auto testParams2D_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes2D), + ::testing::ValuesIn(transposeParams), + ::testing::Values(ElementType::f16, ElementType::bf16), + ::testing::Values(emptyConfig), + ::testing::ValuesIn(filter_specific_params(false))); -INSTANTIATE_TEST_SUITE_P(smoke_FC_2D_FP16, +INSTANTIATE_TEST_SUITE_P(smoke_FC_2D, MatMulDecompressConvertTest, - testParams2D_FP16_smoke, + testParams2D_smoke, MatMulDecompressConvertTest::getTestCaseName); const auto testParams2D_BF16_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes2D), @@ -344,15 +344,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_FC_3D_FP32, testParams3D_FP32_smoke, MatMulDecompressConvertTest::getTestCaseName); -const auto testParams3D_FP16_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes3D), +const auto testParams3D_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes3D), ::testing::ValuesIn(transposeParams), - ::testing::Values(ElementType::f16), + ::testing::Values(ElementType::f16, ElementType::bf16), ::testing::Values(emptyConfig), ::testing::ValuesIn(filter_specific_params(false))); -INSTANTIATE_TEST_SUITE_P(smoke_FC_3D_FP16, +INSTANTIATE_TEST_SUITE_P(smoke_FC_3D, MatMulDecompressConvertTest, - testParams3D_FP16_smoke, + testParams3D_smoke, MatMulDecompressConvertTest::getTestCaseName); const auto testParams3D_BF16_smoke = ::testing::Combine(::testing::ValuesIn(inputShapes3D),