[Mlir-commits] [mlir] [mlir][Linalg] Allow more control in drop unit dims (PR #171796)
Lukas Sommer
llvmlistbot at llvm.org
Fri Dec 12 09:07:30 PST 2025
================
@@ -244,16 +245,19 @@ replaceUnitDimIndexOps(GenericOp genericOp,
}
}
-/// Expand the given `value` so that the type matches the type of `origDest`.
-/// The `reassociation` is used when `rankReductionStrategy` is set to
-/// `RankReductionStrategy::ReassociativeReshape`.
-static Value
-expandValue(RewriterBase &rewriter, Location loc, Value result, Value origDest,
- ArrayRef<ReassociationIndices> reassociation,
- ControlDropUnitDims::RankReductionStrategy rankReductionStrategy) {
+FailureOr<Value>
+linalg::expandValue(RewriterBase &rewriter, Location loc, Value result,
+ Value origDest,
+ ArrayRef<ReassociationIndices> reassociation,
+ const ControlDropUnitDims &control) {
// There are no results for memref outputs.
auto origResultType = cast<RankedTensorType>(origDest.getType());
- if (rankReductionStrategy ==
+ origResultType.dump();
----------------
sommerlukas wrote:
Thanks for catching that!
https://github.com/llvm/llvm-project/pull/171796
More information about the Mlir-commits
mailing list