[Mlir-commits] [mlir] [MLIR] Specify new padOp's output type in DropPadUnitDims (PR #150706)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Jul 29 12:00:12 PDT 2025
================
@@ -686,8 +689,10 @@ struct DropPadUnitDims : public OpRewritePattern<tensor::PadOp> {
collapseValue(rewriter, padOp.getLoc(), padOp.getSource(), newShape,
reassociationMap, options.rankReductionStrategy);
- auto newPadOp = tensor::PadOp::create(
- rewriter, padOp.getLoc(), /*result=*/Type(), collapsedSource, newLowPad,
+ auto resultType = RankedTensorType::get(
+ newResultShape, padOp.getResultType().getElementType());
----------------
banach-space wrote:
[nit]
```suggestion
auto newResultType = RankedTensorType::get(
newResultShape, padOp.getResultType().getElementType());
```
https://github.com/llvm/llvm-project/pull/150706
More information about the Mlir-commits
mailing list