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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 10 08:28:36 PST 2025


================
@@ -159,6 +159,15 @@ 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()))
+      return op->emitError("Expected operand #")
----------------
GrumpyPigSkin wrote:

Cheers, 
I've added that into the other test case, let me know if anything else wants changing :)

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


More information about the Mlir-commits mailing list