[Mlir-commits] [mlir] [MLIR] Don't drop attached discardable attributes (PR #111261)
Prashant Kumar
llvmlistbot at llvm.org
Tue Oct 8 04:04:23 PDT 2024
================
@@ -4337,11 +4337,16 @@ LogicalResult PackOp::canonicalize(PackOp packOp, PatternRewriter &rewriter) {
dest =
rewriter.create<tensor::CastOp>(loc, newDestType, packOp.getDest());
}
- Value newOp = rewriter.create<tensor::PackOp>(
- loc, source, dest, packOp.getInnerDimsPos(), packOp.getMixedTiles(),
- packOp.getPaddingValue(), packOp.getOuterDimsPerm());
+ auto clonedPackOp = cast<PackOp>(rewriter.clone(*packOp));
----------------
pashu123 wrote:
The problem was adding `tensor.cast` after the modification. https://github.com/llvm/llvm-project/blob/a649e8ff891e54a279768a8e877b76c8f000a5a7/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp#L4348 I can't replace it with `tensor.pack`.
https://github.com/llvm/llvm-project/pull/111261
More information about the Mlir-commits
mailing list