Skip to content

Commit a5001be

Browse files
add a detailed comment
1 parent f1fef2e commit a5001be

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/common/transformations/src/transformations/common_optimizations/moc_transformations.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,14 @@ bool ov::pass::MOCTransformations::run_on_model(const std::shared_ptr<ov::Model>
164164
REGISTER_PASS(manager, PushConstantToSubgraph)
165165
REGISTER_PASS(manager, ConstantFolding)
166166
REGISTER_PASS(manager, Validate)
167-
// the order is important
168-
REGISTER_PASS(manager, EinsumDecomposition, true)
167+
168+
// EinsumDecomposition should be called after ConstantFolding
169+
// for better performance and memory usage.
170+
// ConstantFolding creates constant inputs to Einsum operations,
171+
// which EinsumDecomposition can then decompose more efficiently with
172+
// reduced memory consumption.
173+
// REGISTER_PASS(manager, EinsumDecomposition, true)
174+
169175
// FusedFilteringBoxesBySize transformation has the complex pattern
170176
// which can be affected by further transformations. So we have to
171177
// execute it at the beginning of the pipeline. Also, this pass resolves

0 commit comments

Comments
 (0)