[mlir][tosa] Update default tosa-to-linalg passes

Adding the optional decompositions have been verified to improve memory
usage on common models. Added the decomposition to the default tosa to linalg
passes.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D117175
This commit is contained in:
Rob Suderman 2022-01-13 09:54:42 -08:00
parent b77d4d54f9
commit 173fce4205
1 changed files with 7 additions and 4 deletions

View File

@ -68,10 +68,13 @@ std::unique_ptr<Pass> mlir::tosa::createTosaToLinalg() {
}
void mlir::tosa::addTosaToLinalgPasses(OpPassManager &pm) {
// Optional decompositions are designed to benefit linalg.
pm.addNestedPass<FuncOp>(mlir::tosa::createTosaOptionalDecompositions());
pm.addNestedPass<FuncOp>(createTosaMakeBroadcastablePass());
pm.addNestedPass<FuncOp>(createTosaToLinalgNamed());
pm.addNestedPass<FuncOp>(mlir::createCanonicalizerPass());
pm.addNestedPass<FuncOp>(createTosaMakeBroadcastablePass());
pm.addNestedPass<FuncOp>(createTosaToLinalg());
pm.addNestedPass<FuncOp>(tosa::createTosaMakeBroadcastablePass());
pm.addNestedPass<FuncOp>(tosa::createTosaToLinalgNamed());
pm.addNestedPass<FuncOp>(mlir::createCanonicalizerPass());
pm.addNestedPass<FuncOp>(tosa::createTosaMakeBroadcastablePass());
pm.addNestedPass<FuncOp>(tosa::createTosaToLinalg());
}