-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinalgExt ops don't support fusion #17392
Comments
Thanks @IanWood1 for capturing this. Just to amend your long term solution. We will probably end up adding this to |
IanWood1
added a commit
that referenced
this issue
May 28, 2024
…ed `scatter` and `reverse`) (#17428) `LinalgFusionOpInterface` allows for fusion of both `Linalg` and `LinalgExt` operations. The new interface provides access to methods essential for performing fusion, allowing existing fusion logic to be used with `LinalgExt` operations. As noted in #17392, it probably makes sense to move this into the `TilingInterface` + probably make it a bit more abstracted #### Changes - **`LinalgFusionOpInterface`**: Interface for fusion operations for both `Linalg` and `LinalgExt` ops. - Implements methods to access indexing maps (or null - **Implementation for Linalg Ops**: The interface is implemented for standard Linalg operations by forwarding to preexisting methods (e.g `getIndexingMaps()`). No changes to the ops themselves. - **Implementation for LinalgExt Ops**: The interface currently only implemented for `iree_linalg_ext.scatter/reverse`. --------- Signed-off-by: Ian Wood <[email protected]>
gglangg
pushed a commit
to gglangg/iree
that referenced
this issue
Jun 4, 2024
…ed `scatter` and `reverse`) (iree-org#17428) `LinalgFusionOpInterface` allows for fusion of both `Linalg` and `LinalgExt` operations. The new interface provides access to methods essential for performing fusion, allowing existing fusion logic to be used with `LinalgExt` operations. As noted in iree-org#17392, it probably makes sense to move this into the `TilingInterface` + probably make it a bit more abstracted #### Changes - **`LinalgFusionOpInterface`**: Interface for fusion operations for both `Linalg` and `LinalgExt` ops. - Implements methods to access indexing maps (or null - **Implementation for Linalg Ops**: The interface is implemented for standard Linalg operations by forwarding to preexisting methods (e.g `getIndexingMaps()`). No changes to the ops themselves. - **Implementation for LinalgExt Ops**: The interface currently only implemented for `iree_linalg_ext.scatter/reverse`. --------- Signed-off-by: Ian Wood <[email protected]>
gglangg
pushed a commit
to gglangg/iree
that referenced
this issue
Jun 4, 2024
…ed `scatter` and `reverse`) (iree-org#17428) `LinalgFusionOpInterface` allows for fusion of both `Linalg` and `LinalgExt` operations. The new interface provides access to methods essential for performing fusion, allowing existing fusion logic to be used with `LinalgExt` operations. As noted in iree-org#17392, it probably makes sense to move this into the `TilingInterface` + probably make it a bit more abstracted #### Changes - **`LinalgFusionOpInterface`**: Interface for fusion operations for both `Linalg` and `LinalgExt` ops. - Implements methods to access indexing maps (or null - **Implementation for Linalg Ops**: The interface is implemented for standard Linalg operations by forwarding to preexisting methods (e.g `getIndexingMaps()`). No changes to the ops themselves. - **Implementation for LinalgExt Ops**: The interface currently only implemented for `iree_linalg_ext.scatter/reverse`. --------- Signed-off-by: Ian Wood <[email protected]>
bangtianliu
pushed a commit
to bangtianliu/iree
that referenced
this issue
Jun 5, 2024
…ed `scatter` and `reverse`) (iree-org#17428) `LinalgFusionOpInterface` allows for fusion of both `Linalg` and `LinalgExt` operations. The new interface provides access to methods essential for performing fusion, allowing existing fusion logic to be used with `LinalgExt` operations. As noted in iree-org#17392, it probably makes sense to move this into the `TilingInterface` + probably make it a bit more abstracted #### Changes - **`LinalgFusionOpInterface`**: Interface for fusion operations for both `Linalg` and `LinalgExt` ops. - Implements methods to access indexing maps (or null - **Implementation for Linalg Ops**: The interface is implemented for standard Linalg operations by forwarding to preexisting methods (e.g `getIndexingMaps()`). No changes to the ops themselves. - **Implementation for LinalgExt Ops**: The interface currently only implemented for `iree_linalg_ext.scatter/reverse`. --------- Signed-off-by: Ian Wood <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Implement. Add toLinalgInterfaces
for LinalgExt opsTilingInterface
include "mlir/Interfaces/DestinationStyleOpInterface.td"
iree/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp
Line 608 in a78cee1
Linalg TilingInterfaceImpl
LinalgExt TilingInterfaceImpl
The text was updated successfully, but these errors were encountered: