[Mlir-commits] [mlir] [mlir][mesh] Fix empty `split_axes` sharding annotation (PR #108236)
Matteo Franciolini
llvmlistbot at llvm.org
Thu Sep 19 07:55:08 PDT 2024
mfrancio wrote:
> This change is consistent with the [doc](https://github.com/llvm/llvm-project/blob/9886788a8a500a1b429a6db64397c849b112251c/mlir/include/mlir/Dialect/Mesh/IR/MeshOps.td#L216-L219). I can see why it is annoying and error prone that every usage of the attribute must check first if there are any subarrays in the array, but requiring the existence of the single empty subarray looks like a quirk.
Thanks for the review. I think it is logically sound (if you expect ArrayAttr of Attr, then you must have an attribute as part of your array), and at the same time counter intuitive, since the semantic of the spec is "absence of attribute means replication". I'd like to try proposing something to make this more ergonomic whenever i have some cycles, but this patch makes this usable at least.
I'll wait a couple of days for @joker-eph to give feedback as well before merging.
https://github.com/llvm/llvm-project/pull/108236
More information about the Mlir-commits
mailing list