[Mlir-commits] [mlir] [mlir][tensor] Improve `FoldTensorCastProducerOp` (dynamic shapes) (PR #114559)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Nov 1 17:14:51 PDT 2024
================
@@ -4756,8 +4756,50 @@ struct FoldTensorCastProducerOp
newResultTypes[dpsInitIdx++] = newOperands.back().getType();
}
- // Clone op.
- Operation *newOp = clone(rewriter, op, newResultTypes, newOperands);
+ // For ops that have sizes-like attribute, update these accordingly.
+ // For now, only `tensor.pack` is supported.
+ // TODO: Generalize to make it work with other ops as well (e.g.
+ // `tensor.unpack`)
+ SmallVector<OpFoldResult> newMixedTileSizes;
----------------
MaheshRavishankar wrote:
I read your discourse thread on that. I agree that we need to do this for all ops, but the way the "size" operands map to result types for operands varies on an operand. I dont think we can "combine them all" into a single pattern. Lets just split the pattern. If you find a way to combine it then thats great, but I dont see a way.
https://github.com/llvm/llvm-project/pull/114559
More information about the Mlir-commits
mailing list