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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jan 13 12:14:12 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()))
----------------
GrumpyPigSkin wrote:

After the rewrite by linalg.generic for all the operations arith.addi, linalg.broadcast etc, these functions all return 0 in `PatternApplicator.cpp`. https://github.com/GrumpyPigSkin/llvm-project/blob/981d5a2b81cc9fe0db90410b5071cb8362ebf4c9/mlir/lib/Rewrite/PatternApplicator.cpp#L151C1-L153C48. I guess that just means `--linalg-specialize-generic-ops` doesn't load any of these passes?

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


More information about the Mlir-commits mailing list