IREE currently lacks support for fusing LinalgExt operations with either other LinalgExt operations or standard Linalg operations..The current fusion implementation relies on indexing maps to determine which operations can be successfully fused. See the example below:
Adding functionality to FormDispatchRegions to get indexing maps for specific LinalgExt ops. This would be a quick and easy way to get indexing maps for specificLinalgExt ops. Also, it would lay the groundwork for a long-term solution.
Long term solution
~Implement LinalgInterfaces for LinalgExt ops~. Add to TilingInterface
Thanks @IanWood1 for capturing this. Just to amend your long term solution. We will probably end up adding this to TilingInterface which already has the notion of the iteration spaces. TBD though.
IREE currently lacks support for fusing
LinalgExt
operations with either otherLinalgExt
operations or standardLinalg
operations..The current fusion implementation relies on indexing maps to determine which operations can be successfully fused. See the example below:This results in the following dispatch formation (note no fusion):
Immediate solution
Adding functionality to FormDispatchRegions to get indexing maps for specific
LinalgExt
ops. This would be a quick and easy way to get indexing maps for specificLinalgExt
ops. Also, it would lay the groundwork for a long-term solution.Long term solution
LinalgInterfaces
for LinalgExt ops~. Add toTilingInterface
include "mlir/Interfaces/DestinationStyleOpInterface.td" https://github.com/iree-org/iree/blob/a78cee1f0e84e99eaca8b0ae46e2da609916c6fb/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp#L608 Linalg TilingInterfaceImpl LinalgExt TilingInterfaceImpl