[Mlir-commits] [mlir] [mlir][mesh, mpi] Lower allreduce (PR #144060)
Christian Ulmann
llvmlistbot at llvm.org
Mon Jun 16 04:20:29 PDT 2025
================
@@ -529,6 +519,124 @@ struct ConvertShardShapeOp : public OpConversionPattern<ShardShapeOp> {
}
};
+static mpi::MPI_OpClassEnumAttr getMPIReduction(ReductionKindAttr kind) {
+ auto ctx = kind.getContext();
+ switch (kind.getValue()) {
+ case ReductionKind::Sum:
+ return mpi::MPI_OpClassEnumAttr::get(ctx, mpi::MPI_OpClassEnum::MPI_SUM);
----------------
Dinistro wrote:
Nit: Consider to factor the enum conversion into a separate function, do avoid duplicating the attribute construction this often.
https://github.com/llvm/llvm-project/pull/144060
More information about the Mlir-commits
mailing list