[Mlir-commits] [mlir] [Mlir] decompose generic by unfolding projected permutation crash fix (PR #122449)
Adam Siemieniuk
llvmlistbot at llvm.org
Fri Jan 10 06:11:17 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 #")
----------------
adam-smnk wrote:
Could you use `rewriter.notifyMatchFailure` to avoid polluting stderr by default?
https://github.com/llvm/llvm-project/pull/122449
More information about the Mlir-commits
mailing list