[Mlir-commits] [llvm] [mlir] [NFC][mlir][mesh, shard] Fixing misnomers in mesh dialect, renaming 'mesh' dialect to 'shard' (PR #150177)

Frank Schlimbach llvmlistbot at llvm.org
Fri Jul 25 00:56:57 PDT 2025


fschlimb wrote:

> We should take this opportunity to improve the documentation as much as possible, in particular with reference to existing concepts. In particular since this is claiming that the original was a "misnomer", we should be able to anchor this in existing work out there.

Thank you @joker-eph for your suggestion regarding improved documentation—that's a good idea. 

The motivation for renaming the dialect is stated above: the dialect is not fundamentally about "meshes." In computer science, "mesh" typically refers to either [mesh data structures](https://en.wikipedia.org/wiki/Types_of_mesh) or [mesh networks](https://en.wikipedia.org/wiki/Mesh_networking). 

To my knowledge, the dialect was inspired by GSPMD, which also talks about "sharding annotations", so it may be appropriate to mention the relevant paper in the dialect documentation. I will add a reference accordingly.

As far as I'm aware, the term "spmdization" is only used in OpenMP, and even there it refers to a related but distinct concept. Furthermore, searching for "spmdize" yields no results outside of MLIR. The more widely adopted term for this concept is partitioning—as seen in GSPMD and Shardy. Therefore, citing GSPMD may be sufficient to get the suggested anchor.

The term mesh is indeed used in various contexts to describe device networks. For example, [PyTorch uses it to refer to device groups](https://docs.pytorch.org/tutorials/recipes/distributed_device_mesh.html). However, in those cases as well, the devices form a rectangular grid. The same reasoning we used to justify renaming operations and symbol names applies here.

That said, I wouldn’t object if there were broader consensus around retaining the term mesh to refer specifically to the device network within the shard dialect.


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


More information about the Mlir-commits mailing list