[Mlir-commits] [mlir] [mlir][mesh] Add resharding spmdization on a 1D device mesh (PR #76179)
Chengji Yao
llvmlistbot at llvm.org
Tue Jan 2 11:27:23 PST 2024
================
@@ -186,6 +209,29 @@ def Mesh_ShardOp : Mesh_Op<"shard", [Pure, SameOperandsAndResultType]> {
}];
}
+def Mesh_ProcessIndexOp : Mesh_Op<"process_index", [Pure, DeclareOpInterfaceMethods<SymbolUserOpInterface>]> {
----------------
yaochengji wrote:
Yeah, a flat index is what I mean. I think both an explicit IR and implementation during lowering is fine.
But we'd better clearly wrote the doc clearly how the multi-index is converted to flat index.
E.g. a mesh cluster of 2x2, (1, 0) represents device id 1 or 2 might need to be defined.
We can leave this doc to the next PR.
https://github.com/llvm/llvm-project/pull/76179
More information about the Mlir-commits
mailing list