[mlir][linalg] Fix tiling interface implementation offset calculation
authorThomas Raoux <thomasraoux@google.com>
Thu, 18 Aug 2022 22:39:29 +0000 (22:39 +0000)
committerThomas Raoux <thomasraoux@google.com>
Fri, 19 Aug 2022 00:16:33 +0000 (00:16 +0000)
commit06c02d5dbb13f6d2a10eaa75c236f3c61cdf5b91
tree2d7e0ada27a7ccc80e3d1a4bc2f9b7fcb778c937
parent89167e3c5b008b44f1fa8a222652e7bdc62cfa8a
[mlir][linalg] Fix tiling interface implementation offset calculation

The tiling interface implementation was making assumption on the code
generated by makeTiledShape which were wrong. The ExtractSliceOp create
may be combined with other ExtractSliceOp. To solve that we compute
directly the offset using the new utilities.

Differential Revision: https://reviews.llvm.org/D132182
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp
mlir/test/Dialect/Linalg/multisize-tiling-full.mlir
mlir/test/Dialect/Linalg/tile-to-foreach-thread.mlir