[Mlir-commits] [mlir] [mlir][mesh] Shardingcontrol (PR #102598)

Boian Petkantchin llvmlistbot at llvm.org
Sun Aug 11 21:52:21 PDT 2024


sogartar wrote:

> * The implementation of `Shardinginterface` for tensor operation (`tensor.empty` for now) moved from the tensor library to the mesh interface library. `spmdize` uses features from `mesh` dialect. @rengolin agreed that `tensor` should not depend on `mesh` so this functionality cannot live in a `tensor`s lib.

The cleanest structure is probably at the [Func dilaect extensions](https://github.com/llvm/llvm-project/blob/4399f2a5ef38df381c2b65052621131890194d59/mlir/lib/Dialect/Func/Extensions/CMakeLists.txt#L20C1-L30C4).
The point is that whatever op needs to interact with the Mesh dialect needs only to know about the [MLIRShardingInterface library](https://github.com/llvm/llvm-project/blob/4399f2a5ef38df381c2b65052621131890194d59/mlir/lib/Dialect/Mesh/Interfaces/CMakeLists.txt#L1).

It is not critical to make it like that now as everything in Mesh already depends on the Tensor dialect. But in general the mesh dialect itself and the general transforms like sharding propagation and spmdization should also only depend on `MLIRShardingInterface`.

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


More information about the Mlir-commits mailing list