[llvm] [mlir] [MLIR] Generalize expand_shape to take shape as explicit input (PR #69267)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 16:36:55 PDT 2024
================
@@ -2237,6 +2237,17 @@ FailureOr<MemRefType> ExpandShapeOp::computeExpandedType(
srcType.getMemorySpace());
}
+LogicalResult ExpandShapeOp::inferOutputShape(
+ OpBuilder &b, Location loc, MemRefType expandedType,
+ ArrayRef<ReassociationIndices> reassociation,
+ ArrayRef<OpFoldResult> inputShape,
+ std::pair<SmallVector<int64_t>, SmallVector<Value>> &outputShape) {
+ auto expandedTensorType =
----------------
MaheshRavishankar wrote:
Note: This triggered the suggestion of using `ShapedType` in `inferExpandShapeOutputShape` to avoid having to do this.
https://github.com/llvm/llvm-project/pull/69267
More information about the llvm-commits
mailing list