[Mlir-commits] [mlir] [mlir][linalg] Add a pattern to drop unit dim of `linalg.broadcast` (PR #106533)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Sep 5 13:21:08 PDT 2024
MaheshRavishankar wrote:
Sorry for the wait. Here are some details. If you look at [`collapseOpIterations`](https://github.com/llvm/llvm-project/blob/3726f9c57537aff05bd6ecf309133ce05bebaf43/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp#L1668) implementation, it is written for a `LinalgOp`. It calls the [`createCollapsedOp`](https://github.com/llvm/llvm-project/blob/3726f9c57537aff05bd6ecf309133ce05bebaf43/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp#L1658) that returns a `LinalgOp` of the same type. I think something similar would work here as well.
https://github.com/llvm/llvm-project/pull/106533
More information about the Mlir-commits
mailing list