[mlir] Transform op for multitile size generation
authorAlex Zinenko <zinenko@google.com>
Thu, 7 Jul 2022 13:56:06 +0000 (15:56 +0200)
committerAlex Zinenko <zinenko@google.com>
Tue, 12 Jul 2022 12:36:28 +0000 (12:36 +0000)
commit3963b4d0dc5bf2bb92eedbab91e2c11653cd8f4e
tree68c87c71b2d30c659d546d2edccfb08babdc768e
parentcc309721d20c8e544ae7a10a66735ccf4981a11c
[mlir] Transform op for multitile size generation

Introduce a structured transform op that emits IR computing the multi-tile
sizes with requested parameters (target size and divisor) for the given
structured op. The sizes may fold to arithmetic constant operations when the
shape is constant. These operations may then be used to call the existing
tiling transformation with a single non-zero dynamic size (i.e. perform
strip-mining) for each of the dimensions separately, thus achieving multi-size
tiling with optional loop interchange. A separate test exercises the entire
script.

Depends On D129217

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129287
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/lib/Dialect/Linalg/TransformOps/CMakeLists.txt
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
mlir/python/mlir/dialects/_structured_transform_ops_ext.py
mlir/test/Dialect/Linalg/multisize-tiling-full.mlir [new file with mode: 0644]
mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir [new file with mode: 0644]
mlir/test/python/dialects/transform_structured_ext.py
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel