[Mlir-commits] [mlir] mlir::mesh::shardingOp adding shard-size control (PR #98145)

Frank Schlimbach llvmlistbot at llvm.org
Wed Jul 10 01:17:17 PDT 2024


================
@@ -129,15 +328,28 @@ def Mesh_ShardOp : Mesh_Op<"shard", [
     as an operand in subsequent operations. If not, the sharding applies to the
     operation that defines the tensor value.
 
+    4. `force`: A unit attribute requesting an explicit sharding of the data,
+    therefore not allowing to be optimizied away. This is useful in the presence
+    of halos and inplace semantics.
----------------
fschlimb wrote:

That's a possible use. I was primarily focused on inplace semantics like a mutating `insert_slice` which requires a halo-update after the write. I know this goes beyond the current tensor semantics, but we are looking into arrays which do have mutable semantics. An alternative for this case would be an extension of the `ShardingInterface` to indicate which operand a given operation it mutates.

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


More information about the Mlir-commits mailing list