[Mlir-commits] [mlir] [mlir][mesh] add support in spmdization for incomplete sharding annotations (PR #82442)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 20 16:20:25 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 b1849a2c6bac6337945206a7c3c9f5d5812457cc 90e03b9ad9fe7641a7e5873d13ab62926bede0e0 -- mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp b/mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp
index 287db5dd08..73cae225ea 100644
--- a/mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp
+++ b/mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp
@@ -620,7 +620,7 @@ static SmallVector<MeshShardingAttr> getResultShardings(Operation &op) {
 }
 
 ShardOp getSourceShardOpOrNull(ShardOp targetShardOp) {
-  Operation* srcOp = targetShardOp.getOperand().getDefiningOp();
+  Operation *srcOp = targetShardOp.getOperand().getDefiningOp();
   if (!srcOp) {
     return ShardOp();
   }
@@ -651,7 +651,7 @@ spmdizeOperation(ShardOp shardOp, IRMapping &spmdizationMap,
         spmdizationMap.lookup(srcShardOp.getOperand())
             .cast<TypedValue<ShapedType>>();
     targetSpmdValue = reshard(builder, srcShardOp, shardOp, srcSpmdValue,
-                                    symbolTableCollection);
+                              symbolTableCollection);
   }
 
   assert(!spmdizationMap.contains(shardOp.getResult()));
@@ -665,7 +665,8 @@ spmdizeOperation(Operation &op, IRMapping &spmdizationMap,
                  OpBuilder &builder) {
   ShardOp shardOp = llvm::dyn_cast<ShardOp>(op);
   if (shardOp) {
-    return spmdizeOperation(shardOp, spmdizationMap, symbolTableCollection, builder);
+    return spmdizeOperation(shardOp, spmdizationMap, symbolTableCollection,
+                            builder);
   }
 
   SmallVector<Value> spmdizedOperands;

``````````

</details>


https://github.com/llvm/llvm-project/pull/82442


More information about the Mlir-commits mailing list