[Mlir-commits] [mlir] [mlir][mpi] Lowering Mpi To LLVM (PR #127053)
Christian Ulmann
llvmlistbot at llvm.org
Mon Feb 17 08:53:58 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
----------------
Dinistro wrote:
I'm not sure if this is acceptable, tbh. This should probably be a configuration option of the pass, not something taking from header files. This is especially problematic when building on one machine and then distributing the produced binaries to some other system which might now have these headers.
https://github.com/llvm/llvm-project/pull/127053
More information about the Mlir-commits
mailing list