[mlir][Linalg] Add a transform dialect op to rewrite ops to destination passing style.
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 15 Feb 2023 17:23:52 +0000 (09:23 -0800)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 16 Feb 2023 13:26:33 +0000 (05:26 -0800)
commit96179dff46a9a3981708b06bc9e0f981be4cc1a8
tree0fe9359e941a0391ee358131647c0cb38ffb60d5
parentb58daf91d6775502231dfd7ec7b5935b4ffd7326
[mlir][Linalg] Add a transform dialect op to rewrite ops to destination passing style.

A new transform dialect op is introduced to perform the rewrite.
The test pass option is now obsolete and is removed in favor of the transform.

In the process I realized the tensor.pad nofold attribute was not taken into account
and added support to emit a bufferization.alloc_tensor + linalg.copy.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D143943
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/include/mlir/Dialect/Utils/StaticValueUtils.h
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/lib/Dialect/Linalg/Transforms/ConvertToDestinationStyle.cpp
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
mlir/lib/Dialect/Utils/StaticValueUtils.cpp
mlir/test/Dialect/Linalg/transform-op-rewrite-in-destination-passing-style.mlir [moved from mlir/test/Dialect/Linalg/convert-to-destination-style.mlir with 71% similarity]
mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp