[Mlir-commits] [mlir] [DRAFT] Generalize expand_shape to take shape as explicit input (PR #69267)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 17 14:42:45 PDT 2023
================
@@ -453,8 +453,15 @@ struct ReshapeRewriter : public OpRewritePattern<ReshapeOp> {
auto rtp = getRankedTensorType(op.getResult());
auto denseTp =
RankedTensorType::get(rtp.getShape(), rtp.getElementType());
- auto reshape = rewriter.create<ReshapeOp>(loc, denseTp, op.getSrc(),
- op.getReassociation());
+ ReshapeOp reshape;
+ if constexpr (std::is_same<ReshapeOp, tensor::ExpandShapeOp>::value) {
----------------
MaheshRavishankar wrote:
Same here. Use `{` `}` for multi-line statements.
https://github.com/llvm/llvm-project/pull/69267
More information about the Mlir-commits
mailing list