[Mlir-commits] [mlir] [mlir][mpi] Lowering Mpi To LLVM (PR #127053)

Frank Schlimbach llvmlistbot at llvm.org
Tue Feb 18 03:53:05 PST 2025


fschlimb wrote:

> Instead of linking in the MPI header file that is decided on by the pre-processor, could we make the MPI library a run-time choice? Instead of using a header file, I suggest we hardcode the ABI based on our knowledge. We can use a little python script to extract the ABI we need, but requiring the mpi.h header might not be a good idea. In the end, 90% of this PR already hardcodes the MPI API without relying on the MPI headers. I feel the cost of adding some ABI knowledge is small and the benefit of being independent of headers and in-line with MLIR-style are notable.

Yes, as the "fallback" shows, currently there is not much we need to know. We can do the same for OpenMPI. Of course this raises the same license questions as for MPICH. I am convinced both licenses are sufficiently permissive.

Adding "runtime" option is of course more work. Anyone willing to help here? Or can we do this in a separate PR?


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


More information about the Mlir-commits mailing list