Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir] translate memref.reshape with static shapes but dynamic dims
Prior to this patch, the lowering of memref.reshape operations to the LLVM dialect failed if the shape argument had a static shape with dynamic dimensions. This patch adds the necessary support so that when the shape argument has dynamic values, the lowering probes the dimension at runtime to set the size in the `MemRefDescriptor` type. This patch also computes the stride for dynamic dimensions by deriving it from the sizes of the inner dimensions. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D126604
- Loading branch information
Showing
2 changed files
with
99 additions
and
16 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