[Mlir-commits] [mlir] [Mlir] decompose generic by unfolding projected permutation crash fix (PR #122449)

Adam Siemieniuk llvmlistbot at llvm.org
Mon Jan 13 01:52:59 PST 2025


================
@@ -159,6 +160,16 @@ LogicalResult DecomposeProjectedPermutation::matchAndRewrite(
     auto map = op.getMatchingIndexingMap(&opOperand);
     if (!map.isProjectedPermutation(false))
       return failure();
+
+    // If we have any inputs that aren't memref or ranked tensor types, reject
+    // the pattern.
+    if (!dyn_cast<ShapedType>(opOperand.get().getType()))
----------------
adam-smnk wrote:

It looks like after the initial rewrite into a new `linalg.generic`, the pattern keeps hitting further matches. However, it does not perform any rewrites and the whole pattern fails to converge (essentially a failure).

It might be unrelated to this PR's change but could be worth investigating further.


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


More information about the Mlir-commits mailing list