[all-commits] [llvm/llvm-project] 2d6162: [mlir][tosa] Swap reshape at end of reduce op with...
Ramiro Leal-Cavazos via All-commits
all-commits at lists.llvm.org
Tue Mar 14 11:54:25 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2d61628c1f49963921b9ac1995218191dc5e3091
https://github.com/llvm/llvm-project/commit/2d61628c1f49963921b9ac1995218191dc5e3091
Author: Ramiro Leal-Cavazos <ramiroleal050 at gmail.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
Log Message:
-----------
[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
More information about the All-commits
mailing list