-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DispatchCreation] Collapse
iree_linalg_ext.attention
(#19012)
This change adds support for attention in `CollapseDimensionsPass` so that the attention op will be collapsed as much as possible. This is motivated by reducing the different variants of attention that the sdxl attention spec has to handle. Changes to LinalgExt/Transforms/ReshapeFusion.cpp are mostly taken directly from https://github.com/llvm/llvm-project/blob/002a0a27bc4702d6f34434c1838cb1698a0b0098/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp (attributed at the top of the file). I attempted to keep not modify the original logic as much as possible to keep it general in case it needs to be reused for other `LinalgExt` ops. --------- Signed-off-by: Ian Wood <[email protected]>
- Loading branch information
Showing
5 changed files
with
512 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.