[mlir][linalg] Expose pattern to collapse generic op dimensions
authorThomas Raoux <thomasraoux@google.com>
Fri, 7 Oct 2022 23:59:06 +0000 (23:59 +0000)
committerThomas Raoux <thomasraoux@google.com>
Mon, 10 Oct 2022 16:44:01 +0000 (16:44 +0000)
commit83c65fbc2842909444bfe0a74ed083d164381078
tree3e43fac1a59d3b01684b37055b7c6121c6ae9846
parentfd91e8f5016626328093aedc8419f12af20ff554
[mlir][linalg] Expose pattern to collapse generic op dimensions

Add a pattern to be able to collapse dimensions in a linalg generic op.

Differential Revision: https://reviews.llvm.org/D135503
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
mlir/test/Dialect/Linalg/collapse-dim.mlir [new file with mode: 0644]
mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp