diff options
author | seongwon bang <makesource@gmail.com> | 2021-11-25 21:23:48 +0900 |
---|---|---|
committer | Juneyoung Lee <aqjune@gmail.com> | 2021-11-25 21:24:10 +0900 |
commit | 35c1e6ac1af0f3c61c756cb30a2c99d8775da4c6 (patch) | |
tree | ef472525ad639582316d9ea1e0bf769031fbbd6f /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | |
parent | 7f7dac712694ed661b2e774573b9ee1f99208882 (diff) | |
download | llvm-35c1e6ac1af0f3c61c756cb30a2c99d8775da4c6.zip llvm-35c1e6ac1af0f3c61c756cb30a2c99d8775da4c6.tar.gz llvm-35c1e6ac1af0f3c61c756cb30a2c99d8775da4c6.tar.bz2 |
[MLIR] [docs] Fix misguided examples in memref.subview operation.
The examples in `memref.subview` operation are misguided in that subview's strides operands mean "memref-rank number of strides that compose multiplicatively with the base memref strides in each dimension.".
So the below examples should be changed from `Strides: [64, 4, 1]` to `Strides: [1, 1, 1]`
Before changes
```
// Subview with constant offsets, sizes and strides.
%1 = memref.subview %0[0, 2, 0][4, 4, 4][64, 4, 1]
: memref<8x16x4xf32, (d0, d1, d2) -> (d0 * 64 + d1 * 4 + d2)> to
memref<4x4x4xf32, (d0, d1, d2) -> (d0 * 64 + d1 * 4 + d2 + 8)>
```
After changes
```
// Subview with constant offsets, sizes and strides.
%1 = memref.subview %0[0, 2, 0][4, 4, 4][1, 1, 1]
: memref<8x16x4xf32, (d0, d1, d2) -> (d0 * 64 + d1 * 4 + d2)> to
memref<4x4x4xf32, (d0, d1, d2) -> (d0 * 64 + d1 * 4 + d2 + 8)>
```
Also I fixed some syntax issues in docs related with memref layout map and added detailed explanation in subview rank reducing case.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D114500
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions