[Mlir-commits] [mlir] 309bfec - [mlir][tosa] Call TosaInferShapes pass in addTosaToLinalgPasses

Aviad Cohen llvmlistbot at llvm.org
Fri May 5 00:15:27 PDT 2023


Author: Aviad Cohen
Date: 2023-05-05T10:15:18+03:00
New Revision: 309bfecf7dddb9d6530fa95656bbcdd82423fd44

URL: https://github.com/llvm/llvm-project/commit/309bfecf7dddb9d6530fa95656bbcdd82423fd44
DIFF: https://github.com/llvm/llvm-project/commit/309bfecf7dddb9d6530fa95656bbcdd82423fd44.diff

LOG: [mlir][tosa] Call TosaInferShapes pass in addTosaToLinalgPasses

This pass is useful to legalize rankless and dynamic shapes towards static using operands' shapes & types.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D148998

Added: 
    

Modified: 
    mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
index 820cadbf62b56..c1b6d1c60c73b 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
@@ -81,6 +81,7 @@ void mlir::tosa::addTosaToLinalgPasses(OpPassManager &pm,
     pm.addNestedPass<func::FuncOp>(tosa::createTosaOptionalDecompositions());
   pm.addNestedPass<func::FuncOp>(createCanonicalizerPass());
 
+  pm.addNestedPass<func::FuncOp>(tosa::createTosaInferShapesPass());
   pm.addNestedPass<func::FuncOp>(tosa::createTosaMakeBroadcastablePass());
   pm.addNestedPass<func::FuncOp>(tosa::createTosaToLinalgNamed());
   pm.addNestedPass<func::FuncOp>(createCanonicalizerPass());


        


More information about the Mlir-commits mailing list