[Mlir-commits] [mlir] [MLIR] Fix VectorEmulateNarrowType constant op mask bug (PR #116064)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Nov 14 14:33:20 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");
----------------
lialan wrote:
I honestly don't know if there is any > 1-d masks being generated, but `arith.constant` does allow arbitrary dimension constants being generated in this way. Is there any mechanism guarding it off from any such cases before this pass?
cc @hanhanW @dcaballe
https://github.com/llvm/llvm-project/pull/116064
More information about the Mlir-commits
mailing list