[Mlir-commits] [mlir] mlir::mesh::shardingOp adding shard-size control (PR #98145)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Jul 12 12:33:45 PDT 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 3670e7f86cc69692432e57828a0acf1a5abd3156 7e59de1098a26267fd71ad7b003601658c10b1dc --extensions h,cpp -- mlir/include/mlir/Dialect/Tensor/IR/ShardingInterfaceImpl.h mlir/lib/Dialect/Tensor/IR/ShardingInterfaceImpl.cpp mlir/include/mlir/Dialect/Mesh/IR/MeshOps.h mlir/include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.h mlir/include/mlir/Dialect/Mesh/Interfaces/ShardingInterfaceImpl.h mlir/include/mlir/InitAllDialects.h mlir/include/mlir/Interfaces/InferTypeOpInterface.h mlir/lib/Dialect/Linalg/Transforms/MeshShardingInterfaceImpl.cpp mlir/lib/Dialect/Mesh/IR/MeshOps.cpp mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp mlir/test/lib/Dialect/Mesh/TestReshardingSpmdization.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
index 892de3d603..30ce053253 100644
--- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
+++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
@@ -175,8 +175,8 @@ static void shardShape(const InShape &inShape, const MeshShape &meshShape,
// sizes in sharded_dims_sizes.
auto sz = shardedDimsSizes[tensorAxis];
bool same = true;
- for (size_t i = tensorAxis + inShape.size(); i < shardedDimsSizes.size();
- i += inShape.size()) {
+ for (size_t i = tensorAxis + inShape.size();
+ i < shardedDimsSizes.size(); i += inShape.size()) {
if (shardedDimsSizes[i] != sz) {
same = false;
break;
``````````
</details>
https://github.com/llvm/llvm-project/pull/98145
More information about the Mlir-commits
mailing list