[Mlir-commits] [mlir] [mlir][mpi] Lowering Mpi To LLVM (PR #127053)
Frank Schlimbach
llvmlistbot at llvm.org
Mon Feb 17 12:06:02 PST 2025
================
@@ -0,0 +1,157 @@
+#define MPICH_SKIP_MPICXX 1
+#define OMPI_SKIP_MPICXX 1
+#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
+#include "mlir/Dialect/MPI/IR/MPI.h"
+#include "mlir/Transforms/DialectConversion.h"
+
+// skip if no MPI C header was found
+#ifdef FOUND_MPI_C_HEADER
+#include <mpi.h>
+#else // not FOUND_MPI_C_HEADER
+#include "mpi_fallback.h"
+#endif // FOUND_MPI_C_HEADER
----------------
fschlimb wrote:
Are you suggesting to make this "runtime" options, e.g. chose the right values/configuration when the compiler is running?
I agree, that would of course be ideal. I suspect that that it would overcomplicate things in the current state of affairs. At this point, the MPI support is very nascent, and MLIR is rarely (if ever) distributed in binary form.
We can always improve in future PRs, in particular if the new ABI turns out to be insufficient or is taking too long to materialize.
https://github.com/llvm/llvm-project/pull/127053
More information about the Mlir-commits
mailing list