[Mlir-commits] [mlir] [Linalg] Fix SoftmaxOp's reify result shape calculation (PR #67790)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Sep 29 10:55:00 PDT 2023
================
@@ -2387,8 +2387,23 @@ LogicalResult SoftmaxOp::fold(FoldAdaptor, SmallVectorImpl<OpFoldResult> &) {
LogicalResult
SoftmaxOp::reifyResultShapes(OpBuilder &b,
ReifiedRankedShapedTypeDims &reifiedReturnShapes) {
- return cast<LinalgOp>(getOperation())
- .reifyResultShapes(b, reifiedReturnShapes);
+ SmallVector<OpFoldResult> shapes;
+ Location loc = getOperation()->getLoc();
+ IRRewriter rewriter(b);
+ auto inputShapedType = llvm::cast<ShapedType>(getInputOperandType());
+ auto outputShapedType = llvm::cast<ShapedType>(getOutputOperandType());
+ for (int64_t dim : llvm::seq<int64_t>(0, getOutputOperandRank())) {
----------------
MaheshRavishankar wrote:
Sounds good.
https://github.com/llvm/llvm-project/pull/67790
More information about the Mlir-commits
mailing list