-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for 32B and 64B swizzles to hopper matmul scheduler (#3544)
This PR adds support for 32B and 64B swizzles to StMatrix indexing and to the hopper matmul scheduler. ### Key Index Change The number of distinct swizzle rows is number of bytes for swizzle divided by size of megabank (16B). The number of times a swizzle pattern is repeated to fill core (8, 8) matrix is number of swizzle rows (8) divided by number of distinct rows. ```cpp MmaInputSmemSwizzle swizzle = getSwizzle(out_tv); int64_t swizzle_bytes = getBytesFromSwizzle(swizzle); constexpr int64_t megabank_size_bytes = 16; const int64_t distinct_swizzle_row_size = swizzle_bytes / megabank_size_bytes; int row = ...; int col = ...; constexpr int64_t swizzle_row_size = 8; const int64_t swizzle_row_repetitions = swizzle_row_size / distinct_swizzle_row_size; int64_t row_in_swizzle_pattern = (row % swizzle_row_size) / swizzle_row_repetitions; int64_t swizzle_col = col ^ row_in_swizzle_pattern; ``` ### Testing Changes * Added `mma_macro` as testing value. * Created separate test suite called `Swizzle/HopperMatmulSchedulerTest` to test `32B`, `64B`, `128B` swizzles.
- Loading branch information
Showing
5 changed files
with
144 additions
and
42 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
Oops, something went wrong.