Implement Linalg to loops lowering as a pattern
authorNicolas Vasilache <ntv@google.com>
Wed, 27 Nov 2019 15:31:41 +0000 (07:31 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 27 Nov 2019 15:32:13 +0000 (07:32 -0800)
commit1fa8c8070b813c0ed3cd5e0fb844bd1ffa343529
tree6fdf8a216ad8c766a63b3695f5c29eb26a2fe4a3
parente2232fbcee8a4bf4e2a6ab181f8fabb57633dda6
Implement Linalg to loops lowering as a pattern

This CL rewrites the linalg ops to loops transformations as patterns that can be targeted directly from Tablegen. Reliance on OpFolder is removed and to cope with it we introduce local folding patterns that are applied greedily.

PiperOrigin-RevId: 282765550
mlir/include/mlir/Dialect/Linalg/Passes.h
mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
mlir/lib/Dialect/Linalg/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp [moved from mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp with 64% similarity]
mlir/test/Dialect/Linalg/llvm.mlir
mlir/test/Dialect/Linalg/loops.mlir
mlir/test/Dialect/Linalg/transform-patterns.mlir
mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
mlir/test/mlir-cpu-runner/utils.mlir