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][NFC] Refactor encoding utilities. (1/n) (iree-org#19310)
The revision shuffles the utilities to the Encoding dialect and the Codegen dialect: 1. Move TileMxNxK struct and getEncodingInfoForMatmul method to the Codegen dialect (i.e., `Dialect/Codegen/*`) 2. Move isNarrowNResult to the Encoding dialect because it does not depend on any other dialects other than the Encoding dialect. 3. Move lowerContractionOpWithEncoding to Codegen dialect utils for the preparation. All the materialization logic will be moved to Codegen dialect; they share the utilities during the transition period. To accomplish (3), the revision introduces ResolveEncodingInfoFn function type, which decouple the dependency from MaterializeEncodingTypeConvert. It is a requirement because the type converter uses HAL while we don't want the Codegen dialect depending on HAL. We do not need the dependency once we move all the logic to attribute implementation. Minor cleanups: - Remove the `rank` argument from getEncodingInfoForMatmul. It is not used at all. - Add the `static` keyword to the local `getExpandedType` function. Note that the `lowerSetEncodingOpToPackOp` and `lowerUnsetEncodingToUnpackOp` functions are not moved because it requires more changes. They will be moved in a separate patch. --------- Signed-off-by: hanhanW <hanhan0912@gmail.com>
- Loading branch information
Showing
12 changed files
with
271 additions
and
234 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
Oops, something went wrong.