Skip to content

Conversation

@romanlee
Copy link
Collaborator

Previously, MPI commands were lowered directly to LLVM inside Reactant. In this PR, we instead first lower to a set of MPI Ops defined in Enzyme-JAX by calling the generated MLIR bindings, then invoke the lowering passes (also defined in Enzyme-JAX) to lower from the EnzymeXLA Ops to LLVM.

Currently supported MPI commands are

  • MPI_Comm_rank

  • MPI_Comm_size

  • MPI_Barrier

  • MPI_Send

  • MPI_Recv

  • MPI_Isend

  • MPI_Irecv

  • MPI_Wait

  • MPI_Allreduce

Note: Currently only MPI_COMM_WORLD is the only communicator supported

MPI.PROD => MPI_PROD_ENUM,
MPI.REPLACE => MPI_REPLACE_ENUM,
MPI.SUM => MPI_SUM_ENUM,
MPI.NO_OP => MPI_NO_OP_ENUM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
MPI.NO_OP => MPI_NO_OP_ENUM
MPI.NO_OP => MPI_NO_OP_ENUM,

MPI.DOUBLE => MPI_DOUBLE_ENUM,
MPI.C_FLOAT_COMPLEX => MPI_C_FLOAT_COMPLEX_ENUM,
MPI.C_DOUBLE_COMPLEX => MPI_C_DOUBLE_COMPLEX_ENUM,
MPI.C_BOOL => MPI_C_BOOL_ENUM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
MPI.C_BOOL => MPI_C_BOOL_ENUM
MPI.C_BOOL => MPI_C_BOOL_ENUM,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants