[Mlir-commits] [mlir] [mlir][vector] add tensor.concat, bitcast, expand_shape, collapse_shape vectorization support (PR #97297)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Tue Jul 9 02:11:44 PDT 2024
================
@@ -1931,6 +2134,108 @@ vectorizePadOpPrecondition(tensor::PadOp padOp,
return success();
}
+static LogicalResult
+lowerExpandOpPrecondition(tensor::ExpandShapeOp expandOp,
+ ArrayRef<int64_t> inputVectorSizes) {
+ auto resultType = expandOp->getResultTypes()[0];
+ auto resultShape = mlir::dyn_cast<ShapedType>(resultType);
+ // check reassociation
+ llvm::SmallVector<int64_t> associateIndices;
+ for (auto &attr : expandOp.getReassociation()) {
----------------
ftynse wrote:
If `auto` had been expanded, it would have been clear that a reference is not necessary here.
https://github.com/llvm/llvm-project/pull/97297
More information about the Mlir-commits
mailing list