llvm-project/mlir/test/Conversion/TosaToLinalg
Ramiro Leal-Cavazos 2d61628c1f [mlir][tosa] Swap reshape at end of reduce op with expand_shape
This commit swaps back the `tosa.reshape` op used at the end of the
lowering for reduce ops with the op `tensor.expand_shape`. This is
needed to properly support dynamically-sized tensors. In such cases,
lowering directly to `tensor.expand_shape` allows us to control which
dimension gets expanded at the end using the knowledge of the
reduction. This would not be possible when using `tosa.reshape`, since
the op does not have a way of knowing that we are only unsqueezing a
single dimension.

Note: this change had previously been performed in
https://reviews.llvm.org/D133877.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D145986
2023-03-14 18:51:39 +00:00
..
tosa-to-linalg-named.mlir [mlir][NFC] Address filecheck_lint findings in tosa-to-linalg-named.mlir. 2023-03-01 01:03:01 +00:00
tosa-to-linalg-resize.mlir [MLIR][TOSA] Switch Tosa_IntArrayAttr[N], Tosa_IntArrayAttrUpto[N] to DenseI64ArrayAttr 2023-01-04 21:58:20 +00:00
tosa-to-linalg.mlir [mlir][tosa] Swap reshape at end of reduce op with expand_shape 2023-03-14 18:51:39 +00:00