[Mlir-commits] [mlir] [MLIR] Fix VectorEmulateNarrowType constant op mask bug (PR #116064)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Nov 14 08:20:40 PST 2024


================
@@ -129,6 +132,45 @@ static FailureOr<Operation *> getCompressedMaskOp(OpBuilder &rewriter,
       auto denseAttr = DenseElementsAttr::get(newMaskType, newMaskValues);
       newMask = rewriter.create<arith::ConstantOp>(loc, newMaskType, denseAttr);
     }
+  } else if (constantOp) {
+    assert(shape.size() == 1 && "expected 1-D mask");
----------------
banach-space wrote:

> Currently limiting it to only 1 d because the arith.constant op needs different treatment from the other two ops.

Let me rephrase the question :) Is there any _working_ example with n-D masks (n > 1)? From what I can tell, no. So why make `arith.constant` special in this context?

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


More information about the Mlir-commits mailing list