forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DT] Unify encoding materialization pass into a single pass. (iree-or…
…g#19454) The revision creates a generic materialization pass and uses it for backends that implement data-tiling. After months of development, we identify that the needs of GPU is a superset of the needs of CPU. To be more specific, it has the additional "swizzle" field in terms of layout. It means that the GPU set_encoding/unset_encoding lowering patterns cover the needs of CPU path. The lowering of contraction ops is different. CPU lowers it to mmt4d op, while GPU lowers it to multi_mma op. However, the lowering of contraction is implemented through attribute interface. Thus, we can have a generic pattern to lower contraction ops. To make the review process much easier, the revision is created by 5 commits. 1. It directly creates the MaterializeEncoding pass and copy-paste the GPU patterns: SetEncodingOpLoweringConversion, UnSetEncodingOpLoweringConversion, and MaterializeContractionOp. In the first commit, it also updates the GPU tests to use the new pass. 2. The GPU data-tiling does not support element-wise generic op lowering atm. The second commit moves the pattern to shared pattern set and bail out when swizzle is present. This is an NFC for both pipelines. 3. The third commit replaces the existing materialization pass with the generic pass, and deletes all the legacy passes. 4. The four commit moves the lit tests from `Common/[CPU|GPU]/test` to `Common/test`. 5. Now there are duplicate patterns for set_encoding, unset_encoding, and contraction ops lowering. The last commit deletes the legacy patterns, and move the patterns from MaterializeEncoding.cpp to where the legacy patterns locate. Furthermore, it renames the file as `MaterializeEncodingPatterns.cpp`. The revision retains the MaterializeEncodingIntoNop pass, and add a TODO item. Because it is still used by MaterializeHomogeneousEncoding pass. It can be deleted once we deprecate the early materialization path. --------- Signed-off-by: hanhanW <[email protected]>
- Loading branch information
Showing
33 changed files
with
357 additions
and
672 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
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
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
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
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.