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] Internalize transposeNarrowN logic to LayoutAttrInterface I…
…mpl (iree-org#19453) Whether applying transposition from narrow-N to narrow-M is backend implementation details, and we do not need to expose it to the type converter. The encoding itself has enough information, like indexing maps, narrow dimensions, etc., to infer the shapes and encoding info. Instead of updating the RankedTensorType and the attached encoding in type converter, we can just cook the logic in `getEncodingInfo` methods. From the encoding, we know that whether it is narrow-N case, and we can update the MaterializeEncodingInfo correspondingly. The type converter can infer the transposed tensor type from it. Thus, we can simplify the logic in the type conversion. The documentation of `transposeNarrowN` is moved to `[CPU|GPU]EncodingExternalModels.cpp` because all the implementation locates at the files. Signed-off-by: hanhanW <[email protected]>
- Loading branch information
Showing
8 changed files
with
72 additions
and
132 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