An interface to allow for tiling of operations is introduced
here. Using this interface a tiling algorithm is implemented that
tiles an operation that implements that interface.
The current tiling algorithm uses the same options as Linalg ops and
uses a similar control mechanism. To not leak these options outside of
Linalg, the developed tiling algorithm is currently places within
Linalg Dialect.
The test ops defined to check the tiling algorithm implement the
interface as an ExternalModel. Also implemented is the tiling of
tensor.extract_slice using a similar approach.
This looks quite similar to https://sourcegraph.com/github.com/llvm/llvm-project@dcc6b7b1d5e5a0f9537ce1bf919ac2338bd7ad7b/-/blob/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h?L532.
I am wary of adding a parallel tiling implementation that has not yet proven to compose with the other transformations we want (e.g. fusion, padding, distribution).
I would be much more supportive of seeing the tiling interface integrated into the existing flow.
In other words, there isn't room for multiple implementations of the same thing: either we replace the existing one completely in a single shot or we incrementally refactor it to use the interface.