Skip to content

Commit

Permalink
MergeReorderAndTranspose finalization
Browse files Browse the repository at this point in the history
  • Loading branch information
v-Golubev committed Sep 18, 2023
1 parent b8a3609 commit ceba22a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/plugins/intel_cpu/src/graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2699,13 +2699,9 @@ void GraphOptimizer::MergeReorderAndTranspose(Graph &graph) {
}
}

// TODO: change
auto transposeOrder = updateOrder(transposeNode->getOrder(), reshapeNode);
transposeOrder = {0, 2, 3, 1};
auto descAfterTranspose = transposeNode->getSelectedPrimitiveDescriptor()->getConfig().outConfs[0].getMemDesc();
// TODO: change
auto layoutOrder = updateOrder(descAfterTranspose->as<BlockedMemoryDesc>()->getOrder(), reshapeNode);
layoutOrder = {0, 1, 2, 3};

auto inBlockedDesc = reorderNode->getSelectedPrimitiveDescriptor()->getConfig().inConfs[0].getMemDesc()->as<BlockedMemoryDesc>();
auto outBlockedDesc = reorderNode->getSelectedPrimitiveDescriptor()->getConfig().outConfs[0].getMemDesc()->as<BlockedMemoryDesc>();
Expand Down Expand Up @@ -2824,8 +2820,6 @@ void GraphOptimizer::MergeReorderAndTranspose(Graph &graph) {
}

auto newReorderNode = graph.InsertReorder(edge, reorderlayerName, *reorderInDesc, *reorderOutDesc, isOptimized);

// case 2
if (inPrec != outPrec) {
auto reorderInDesc2 = reorderOutDesc;
auto reorderOutDesc2 = outDesc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void FuseTransposeAndReorderTest2::CreateGraph() {

TEST_P(FuseTransposeAndReorderTest2, CompareWithRefs) {
Run();
CheckTransposeCount(1);
CheckTransposeCount(0);
}

INSTANTIATE_TEST_SUITE_P(smoke_Basic, FuseTransposeAndReorderTest2, fuseTransposeAndReorderCommonParams, FuseTransposeAndReorderTest::getTestCaseName);
Expand Down

0 comments on commit ceba22a

Please sign in to comment.