Skip to content

Commit

Permalink
compilation error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
v-Golubev committed Sep 18, 2023
1 parent ceba22a commit add7ba0
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/plugins/intel_cpu/src/graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2611,24 +2611,7 @@ void GraphOptimizer::MergeReorderAndTranspose(Graph &graph) {
&& !node->isDynamicNode();
};

auto checkReshapeShapes = [](const Shape& biggerShape, const Shape& smallerShape) {
if (biggerShape.getRank() - smallerShape.getRank() > 1)
return false;

const auto biggerPShape = biggerShape.toPartialShape();
const auto smallerPShape = smallerShape.toPartialShape();
size_t mismatchCount = 0;
for (size_t i = 0; i < smallerPShape.size(); ++i) {
if (smallerPShape[i] != biggerPShape[i + mismatchCount]) {
mismatchCount++;
if (mismatchCount > 1)
return false;
}
}
return true;
};

auto isSuitableReshape = [&checkReshapeShapes](NodePtr node) {
auto isSuitableReshape = [](NodePtr node) {
if (node->getChildEdges().size() != 1)
return false;
// Reshape supported only in one case: if two consecutive input dims are merged into 1
Expand Down

0 comments on commit add7ba0

Please sign in to comment.