[Mlir-commits] [mlir] [mlir][Vectorizer] Added support to Vectorize tensor.unpack (PR #76087)
Balaji V. Iyer.
llvmlistbot at llvm.org
Thu Feb 15 17:50:57 PST 2024
================
@@ -1420,16 +1420,28 @@ static Value createReadOrMaskedRead(OpBuilder &builder, Location loc,
auto sourceShape = dyn_cast<ShapedType>(source.getType()).getShape();
assert(sourceShape.size() == readShape.size());
auto maskType = VectorType::get(readShape, builder.getI1Type());
- auto vectorType = VectorType::get(readShape, padValue.getType());
+ Type vecElemType = padValue != nullptr
+ ? padValue.getType()
+ : cast<ShapedType>(source.getType()).getElementType();
----------------
bviyer wrote:
I am pretty sure you can, however this was how Max implemented it for pack, so I didn't mess with it.
https://github.com/llvm/llvm-project/pull/76087
More information about the Mlir-commits
mailing list