diff options
author | Han-Chung Wang <hanhan0912@gmail.com> | 2023-11-10 09:27:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 09:27:59 -0800 |
commit | 2bac7201018dcab549895c30c0eb26bee45d842f (patch) | |
tree | adc6a3862da66a988eef677e2c4e04de84e76f3c /llvm/lib/Support/CommandLine.cpp | |
parent | b88308b1b4813e55ce8f54ceff6e57736328fb58 (diff) | |
download | llvm-2bac7201018dcab549895c30c0eb26bee45d842f.zip llvm-2bac7201018dcab549895c30c0eb26bee45d842f.tar.gz llvm-2bac7201018dcab549895c30c0eb26bee45d842f.tar.bz2 |
[mlir][vector] Take dim sizes into account in DropInnerMostUnitDims. (#71752)
The `stride == 1` does not imply that we can drop it. Because it could
load more than 1 elements. We should also take source sizes and vector
sizes into account. Otherwise it generates invalid IRs. E.g.,
```mlir
func.func @foo(%arg0: memref<1x1xf32>) -> vector<4x8xf32> {
%c0 = arith.constant 0 : index
%cst = arith.constant 0.000000e+00 : f32
%0 = vector.transfer_read %arg0[%c0, %c0], %cst : memref<1x1xf32>, vector<4x8xf32>
return %0 : vector<4x8xf32>
}
```
Fixes https://github.com/openxla/iree/issues/15493
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions