[Mlir-commits] [mlir] [MLIR][Shape] Support >2 args in `shape.broadcast` folder (PR #126808)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Feb 11 14:12:22 PST 2025
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 16d4453f2f5d9554ce39507fda0f33ce9066007b c4a815d0f65bdbfe2d64043db80aa4c27027fd6f --extensions cpp -- mlir/lib/Dialect/Shape/IR/Shape.cpp mlir/lib/Dialect/Traits.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index daa33ea865..a31060adb6 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -658,7 +658,8 @@ OpFoldResult BroadcastOp::fold(FoldAdaptor adaptor) {
SmallVector<int64_t, 6> resultShape;
resultShape.clear();
- std::copy(firstShape.begin(), firstShape.end(), std::back_inserter(resultShape));
+ std::copy(firstShape.begin(), firstShape.end(),
+ std::back_inserter(resultShape));
for (auto next : adaptor.getShapes().drop_front()) {
if (!next)
@@ -673,7 +674,8 @@ OpFoldResult BroadcastOp::fold(FoldAdaptor adaptor) {
return nullptr;
resultShape.clear();
- std::copy(tmpShape.begin(), tmpShape.end(), std::back_inserter(resultShape));
+ std::copy(tmpShape.begin(), tmpShape.end(),
+ std::back_inserter(resultShape));
}
Builder builder(getContext());
``````````
</details>
https://github.com/llvm/llvm-project/pull/126808
More information about the Mlir-commits
mailing list