[Mlir-commits] [mlir] [mlir][mesh, mpi] Lower allreduce (PR #144060)
Christian Ulmann
llvmlistbot at llvm.org
Mon Jun 16 04:20:32 PDT 2025
================
@@ -832,9 +924,10 @@ struct ConvertMeshToMPIPass
patterns.add<ConvertUpdateHaloOp, ConvertNeighborsLinearIndicesOp,
ConvertProcessMultiIndexOp, ConvertGetShardingOp,
- ConvertShardingOp, ConvertShardShapeOp>(typeConverter, ctxt);
- // ConvertProcessLinearIndexOp accepts an optional worldRank
- patterns.add<ConvertProcessLinearIndexOp>(typeConverter, ctxt, worldRank);
+ ConvertShardingOp, ConvertShardShapeOp, ConvertAllReduceOp,
+ ConvertProcessLinearIndexOp>(typeConverter, ctxt);
+ SymbolTableCollection symbolTableCollection;
+ mlir::mesh::populateFoldingPatterns(patterns, symbolTableCollection);
----------------
Dinistro wrote:
Reusing non-conversion patterns in a conversion is generally incorrect. The conversion patterns need to access potentially changed values through the adaptor, which you don't have access to from the folding patterns.
Are these foldings really required for the conversion to succeed? If not, this should be kept as a separate pass that runs either before or after.
https://github.com/llvm/llvm-project/pull/144060
More information about the Mlir-commits
mailing list