[Mlir-commits] [mlir] [DRAFT] Generalize expand_shape to take shape as explicit input (PR #69267)

Ramiro Leal-Cavazos llvmlistbot at llvm.org
Thu Oct 26 11:59:25 PDT 2023


================
@@ -167,9 +190,11 @@ static LogicalResult verifyReshapeLikeShapes(OpTy op, ShapedType collapsedType,
 /// Returns true iff the type is a MemRefType and has a non-identity layout.
 bool hasNonIdentityLayout(Type type);
 
+enum class ReshapeOpKind { kExpand, kCollapse };
+
 /// Pattern to collapse producer/consumer reshape ops that are both collapsing
 /// dimensions or are both expanding dimensions.
-template <typename ReshapeOpTy>
+template <typename ReshapeOpTy, ReshapeOpKind opKind>
----------------
ramiro050 wrote:

See: https://reviews.llvm.org/D140821#inline-1369788

https://github.com/llvm/llvm-project/pull/69267


More information about the Mlir-commits mailing list