[mlir] Prevent assertion failure in DropUnitDims
authorTres Popp <tpopp@google.com>
Tue, 17 Aug 2021 13:28:26 +0000 (15:28 +0200)
committerTres Popp <tpopp@google.com>
Tue, 31 Aug 2021 10:15:13 +0000 (12:15 +0200)
commit44485fcd97490db57df49796d0566a3ce5e23f4c
treeb4c5e0054d3e98c3e57c8055f367d9b905e4c40b
parent0080d2aa5542dc59c79c93b031ab58e1dd7306de
[mlir] Prevent assertion failure in DropUnitDims

Don't assert fail on strided memrefs when dropping unit dims.
Instead just leave them unchanged.

Differential Revision: https://reviews.llvm.org/D108205
mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir