[Mlir-commits] [mlir] [Mlir] decompose generic by unfolding projected permutation crash fix (PR #122449)
Adam Siemieniuk
llvmlistbot at llvm.org
Fri Jan 10 09:17:19 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:
On more thought, what about 0D shape?
Can is handle input like `%b = arith.constant dense<42> : tensor<i32>`?
https://github.com/llvm/llvm-project/pull/122449
More information about the Mlir-commits
mailing list