Skip to content

Conversation

@vchuravy
Copy link
Member

@vchuravy vchuravy commented Nov 6, 2025

Adding support for MPI_Send_init, MPI_Recv_init and MPI_Start

// Adjoint of MPI_Send is to place a MPI_send at the corresponding
// location in the reverse.
if (func == "MPI_Send" || func == "PMPI_Send") {
if (Mode == DerivativeMode::ReverseModeGradient ||
Copy link
Member

Choose a reason for hiding this comment

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

did we miss this from earlier??

if so we should add a test

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry this was a brain fart on my side this ought to be MPI_Start not MPI_Send

auto callval = call.getCalledOperand();
Value *args[] = {
lookup(gutils->getNewFromOriginal(call.getOperand(0)), Builder2)};
Builder2.CreateCall(call.getFunctionType(), callval, args);
Copy link
Member

Choose a reason for hiding this comment

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

doesn't cover fwd mode, so we shouldn't return in that case

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.

3 participants