[Mlir-commits] [mlir] [mlir][tensor] Introduce `FoldTensorCastUnPackOp` (PR #121393)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Dec 31 06:36:17 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 998bdae7f5ce8c5aa31b376592c9693fc95f02e3 1dcc023f910c07107e2965cc120f28a652e023ac --extensions cpp -- mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index ee9a4012a0..aeb11186c1 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -4927,7 +4927,7 @@ struct FoldTensorCastUnPackOp : public OpRewritePattern<UnPackOp> {
// to preserve. Implement a better abstraction.
UnPackOp newOp = rewriter.create<UnPackOp>(
op.getLoc(), sourceTensor, newOperands[1], op.getInnerDimsPos(),
- newMixedTileSizes, op.getOuterDimsPerm());
+ newMixedTileSizes, op.getOuterDimsPerm());
newOp->setDiscardableAttrs(op->getDiscardableAttrDictionary());
// Replace op.
@@ -4969,7 +4969,8 @@ struct FoldTensorCastProducerOp
PatternRewriter &rewriter) const override {
// Reject tensor::PackOp - there's dedicated pattern for that instead.
- if (!foldTensorCastPrecondition(op) || isa<tensor::PackOp, tensor::UnPackOp>(*op))
+ if (!foldTensorCastPrecondition(op) ||
+ isa<tensor::PackOp, tensor::UnPackOp>(*op))
return failure();
SmallVector<Type> newResultTypes(op->getResultTypes());
``````````
</details>
https://github.com/llvm/llvm-project/pull/121393
More information about the Mlir-commits
mailing list