[Mlir-commits] [mlir] [MLIR] Enable pattern only for scf.forall op (PR #110230)
Matthias Springer
llvmlistbot at llvm.org
Sat Sep 28 01:23:46 PDT 2024
================
@@ -131,11 +132,25 @@ struct IterArgsToInitArgs : public OpRewritePattern<tensor::DimOp> {
auto blockArg = dyn_cast<BlockArgument>(dimOp.getSource());
if (!blockArg)
return failure();
- auto loopLikeOp =
- dyn_cast<LoopLikeOpInterface>(blockArg.getParentBlock()->getParentOp());
- if (!loopLikeOp)
+ // TODO: Enable this for loopLikeInterface. Restricting for scf.for
----------------
matthias-springer wrote:
This pattern has an additional `isShapePreserving` check that makes it safe. Btw, that check is quite conservative, it could be improved by checking for `DestinationStyleOpInterface` instead of hard-coding a few ops in the analysis.
https://github.com/llvm/llvm-project/pull/110230
More information about the Mlir-commits
mailing list