[Mlir-commits] [mlir] [DRAFT] Generalize expand_shape to take shape as explicit input (PR #69267)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 26 13:06:56 PDT 2023


================
@@ -550,9 +549,20 @@ static Value expandRank(PatternRewriter &rewriter, Location loc, Value tensor,
   auto resultType =
       RankedTensorType::get(resultShape, shapedType.getElementType());
 
+  SmallVector<OpFoldResult> inputShape =
+      tensor::getMixedSizes(rewriter, loc, tensor);
+  SmallVector<OpFoldResult> outputShape;
+  if (failed(tensor::ExpandShapeOp::inferOutputShape(
----------------
MaheshRavishankar wrote:

With the new build method you should be able to fold this into the `create` method? Here and everywhere else?

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


More information about the Mlir-commits mailing list