[mlir][linalg] update drop unit dims to support linalg index operations.
authorTobias Gysi <gysit@google.com>
Tue, 20 Apr 2021 04:50:43 +0000 (04:50 +0000)
committerTobias Gysi <gysit@google.com>
Tue, 20 Apr 2021 04:54:00 +0000 (04:54 +0000)
commitd0774f7f0a147411bf2b0e3a692b22853f3fd3de
tree1582388c11ea5e7616882d56a232f3eb8a7f66c7
parentbcde9f1b6c8fe17dc055218aafe320177595cbb2
[mlir][linalg] update drop unit dims to support linalg index operations.

Update the dimensions of the index operations to account for dropped dimensions and replace the index operations of dropped dimensions by zero.

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