-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GlobalOpt] Transition SetEncoding to use round_dims_to and stop crea…
…ting tensor.pad (#17931) This PR removes all padding introduced by SetEncoding, and instead places the `round_dims_to` attribute on encodings. The consequences of this PR are: 1. `iree_encoding.upper_bound_tile_size` is no longer necessary, since the information needed for stream buffer allocation is already encoded in `round_dims_to`, and there is no tensor.pad that uses the upper bound size anymore. 2. The `original_type` field in encodings is no longer necessary, since the types of the encoded tensors are no longer padded by the upper bound size. This means the types of the encoded tensors have directly the shape sizes of the `original_type`. 3. With the encoded types no longer having padded shapes, the `matmul_narrow_M` and `matmul_narrow_N` fields can also be removed, since the narrow sizes can be taken from directly from the tensor shapes. 4. Since `iree_encoding.upper_bound_tile_size` is no longer generated, the `CPUMaterializeUpperBoundTileSizePass` is no longer necessary, so we can remove it. This PR simply removes the padding from SetEncoding, and updates tests to reflect the new expected form, but some follow up PRs to remove the above mentioned fields can now be easily done. This also updates the `PadFactor` value for `SetEncoding` to be a command line flag with a default value of `32`. The previous value was `16`, but some microkernels require a tile size of `32`, so the `round_dims_to` needs to support padding up to `32` in those cases. --------- Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
- Loading branch information
Showing
10 changed files
with
836 additions
and
1,731 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.