Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/plugins/intel_cpu/src/graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void GraphOptimizer::ApplyCommonGraphOptimizations(Graph& graph) {
graph.RemoveDroppedNodes();

OV_ITT_SCOPE_NEXT(FIRST_INFERENCE, taskChain, "FuseFCAndConvertOnWeights");
FuseFCAndConvertOnWeights(graph);
FuseConvDeconvFCAndConvertOnWeights(graph);
graph.RemoveDroppedNodes();

OV_ITT_SCOPE_NEXT(FIRST_INFERENCE, taskChain, "FuseFCAndTransposeOnWeights");
Expand Down Expand Up @@ -832,7 +832,7 @@ void GraphOptimizer::MergeConvertAndEltwise(Graph& graph) {
}
}

void GraphOptimizer::FuseFCAndConvertOnWeights(Graph& graph) {
void GraphOptimizer::FuseConvDeconvFCAndConvertOnWeights(Graph& graph) {
#if defined(OV_CPU_WITH_SHL)
return;
#endif
Expand All @@ -851,7 +851,7 @@ void GraphOptimizer::FuseFCAndConvertOnWeights(Graph& graph) {

const auto& graphNodes = graph.GetNodes();
for (const auto& fullyConnected : graphNodes) {
if (fullyConnected->getType() != Type::FullyConnected) {
if (none_of(fullyConnected->getType(), Type::FullyConnected, Type::Convolution, Type::Deconvolution)) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/graph_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GraphOptimizer {
static void FuseMultiplyAndAdd(Graph& graph);
static void MergeEltwiseAndConvert(Graph& graph);
static void MergeConvertAndEltwise(Graph& graph);
static void FuseFCAndConvertOnWeights(Graph& graph);
static void FuseConvDeconvFCAndConvertOnWeights(Graph& graph);
static void FuseFCAndTransposeOnWeights(Graph& graph);
static void FuseFullyConnectedAndSimpleOperation(Graph& graph);
static void FuseMatMulAndSimpleOperation(Graph& graph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@ void Transformations::PreLpt(const std::vector<ov::element::Type>& defaultPrecis
[](const_node_ptr& node) -> bool {
const auto consumers = node->get_output_target_inputs(0);
return std::all_of(consumers.begin(), consumers.end(), [](const ov::Input<ov::Node>& consumer) {
return !ov::is_type<ov::op::v0::MatMul>(consumer.get_node());
// @todo cover RNN type of ops as well
return !is_type_any_of<ov::op::v0::MatMul,
ov::op::v1::Convolution,
ov::op::v1::ConvolutionBackpropData>(consumer.get_node());
});
},
ov::pass::KeepConstAndDecompression);
Expand Down
Loading