Beaver. MLIR. Dialect. MPI
(beaver v0.4.8)
Copy Markdown
Summary
Functions
Return op name mpi.allgather as a bitstring.
mpi.allgather -
Return op name mpi.allreduce as a bitstring.
mpi.allreduce - Equivalent to MPI_Allreduce(sendbuf, recvbuf, op, comm)
Return op name mpi.barrier as a bitstring.
mpi.barrier - Equivalent to MPI_Barrier(comm)
Return op name mpi.comm_rank as a bitstring.
mpi.comm_rank - Get the current rank, equivalent to MPI_Comm_rank(comm, &rank)
Return op name mpi.comm_size as a bitstring.
mpi.comm_size - Get the size of the group associated to the communicator, equivalent to MPI_Comm_size(comm, &size)
Return op name mpi.comm_split as a bitstring.
mpi.comm_split - Partition the group associated with the given communicator into disjoint subgroups
Return op name mpi.comm_world as a bitstring.
mpi.comm_world - Get the World communicator, equivalent to MPI_COMM_WORLD
Return op name mpi.error_class as a bitstring.
mpi.error_class - Get the error class from an error code, equivalent to the MPI_Error_class function
Return op name mpi.finalize as a bitstring.
mpi.finalize - Finalize the MPI library, equivalent to MPI_Finalize()
Return op name mpi.init as a bitstring.
mpi.init - Initialize the MPI library, equivalent to MPI_Init(NULL, NULL)
Return op name mpi.irecv as a bitstring.
mpi.irecv - Equivalent to MPI_Irecv(ptr, size, dtype, source, tag, comm, &req)
Return op name mpi.isend as a bitstring.
mpi.isend - Equivalent to MPI_Isend(ptr, size, dtype, dest, tag, comm)
Return op name mpi.recv as a bitstring.
mpi.recv - Equivalent to MPI_Recv(ptr, size, dtype, source, tag, comm, MPI_STATUS_IGNORE)
Return op name mpi.reduce_scatter_block as a bitstring.
mpi.reduce_scatter_block - Equivalent to MPI_Reduce_scatter_block(sendbuf, recvbuf, recvcount, dtype, op, comm)
Return op name mpi.retval_check as a bitstring.
mpi.retval_check - Check an MPI return value against an error class
Return op name mpi.send as a bitstring.
mpi.send - Equivalent to MPI_Send(ptr, size, dtype, dest, tag, comm)
Return op name mpi.wait as a bitstring.
mpi.wait - Equivalent to MPI_Wait(req, MPI_STATUS_IGNORE)
Functions
Return op name mpi.allgather as a bitstring.
mpi.allgather -
Equivalent to `MPI_Allgather(sendbuf, sendcount, sendtype,
recvbuf, recvcount, recvtype,
comm)`.Operands
sendbuf- Single,AnyMemRef, memref of any non-token type valuesrecvbuf- Single,AnyMemRef, memref of any non-token type valuescomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Allgather collects data from all processes in a given communicator and stores the gathered data in the receive buffer of each process.
Each process contributes the same amount of data defined by sendbuf.
The MPI call specifies the number of elements contributed by each process
via the recvcount parameter. However, this operation, assumes recvbuf
to be sufficiently large to hold the data contributed by all processes.
Therefore, recvcount is implicitly defined as
num_elements(recvbuf) / MPI_Comm_size(comm).
This operation may optionally return an !mpi.retval value, which can be used for error checking.
Return op name mpi.allreduce as a bitstring.
mpi.allreduce - Equivalent to MPI_Allreduce(sendbuf, recvbuf, op, comm)
Attributes
op- Single,MPI_ReductionOpEnum, MPI operation class
Operands
sendbuf- Single,AnyMemRef, memref of any non-token type valuesrecvbuf- Single,AnyMemRef, memref of any non-token type valuescomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Allreduce performs a reduction operation on the values in the sendbuf array and stores the result in the recvbuf array. The operation is performed across all processes in the communicator.
The op attribute specifies the reduction operation to be performed.
Currently only the MPI_Op predefined in the standard (e.g. MPI_SUM) are
supported.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.barrier as a bitstring.
mpi.barrier - Equivalent to MPI_Barrier(comm)
Operands
comm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Barrier blocks execution until all processes in the communicator have reached this routine.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.comm_rank as a bitstring.
mpi.comm_rank - Get the current rank, equivalent to MPI_Comm_rank(comm, &rank)
Operands
comm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)rank- Single,I32, 32-bit signless integer
Description
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.comm_size as a bitstring.
mpi.comm_size - Get the size of the group associated to the communicator, equivalent to MPI_Comm_size(comm, &size)
Operands
comm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)size- Single,I32, 32-bit signless integer
Description
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.comm_split as a bitstring.
mpi.comm_split - Partition the group associated with the given communicator into disjoint subgroups
Operands
comm- Single,MPI_Comm, MPI communicator handlercolor- Single,I32, 32-bit signless integerkey- Single,I32, 32-bit signless integer
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)newcomm- Single,MPI_Comm, MPI communicator handler
Description
This operation splits the communicator into multiple sub-communicators. The color value determines the group of processes that will be part of the new communicator. The key value determines the rank of the calling process in the new communicator.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.comm_world as a bitstring.
mpi.comm_world - Get the World communicator, equivalent to MPI_COMM_WORLD
Results
comm- Single,MPI_Comm, MPI communicator handler
Description
This operation returns the predefined MPI_COMM_WORLD communicator.
Return op name mpi.error_class as a bitstring.
mpi.error_class - Get the error class from an error code, equivalent to the MPI_Error_class function
Operands
val- Single,MPI_Retval, MPI function call return value (!mpi.retval)
Results
errclass- Single,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Error_class maps return values from MPI calls to a set of well-known
MPI error classes.
Return op name mpi.finalize as a bitstring.
mpi.finalize - Finalize the MPI library, equivalent to MPI_Finalize()
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
This function cleans up the MPI state. Afterwards, no MPI methods may be invoked (excpet for MPI_Get_version, MPI_Initialized, and MPI_Finalized). Notably, MPI_Init cannot be called again in the same program.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.init as a bitstring.
mpi.init - Initialize the MPI library, equivalent to MPI_Init(NULL, NULL)
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
This operation must preceed most MPI calls (except for very few exceptions, please consult with the MPI specification on these).
Passing &argc, &argv is not supported currently.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.irecv as a bitstring.
mpi.irecv - Equivalent to MPI_Irecv(ptr, size, dtype, source, tag, comm, &req)
Operands
ref- Single,AnyMemRef, memref of any non-token type valuestag- Single,I32, 32-bit signless integersource- Single,I32, 32-bit signless integercomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)req- Single,MPI_Request, MPI asynchronous request handler
Description
MPI_Irecv begins a non-blocking receive of size elements of type dtype
from rank source. The tag value and communicator enables the library to
determine the matching of multiple sends and receives between the same
ranks.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.isend as a bitstring.
mpi.isend - Equivalent to MPI_Isend(ptr, size, dtype, dest, tag, comm)
Operands
ref- Single,AnyMemRef, memref of any non-token type valuestag- Single,I32, 32-bit signless integerdest- Single,I32, 32-bit signless integercomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)req- Single,MPI_Request, MPI asynchronous request handler
Description
MPI_Isend begins a non-blocking send of size elements of type dtype to
rank dest. The tag value and communicator enables the library to
determine the matching of multiple sends and receives between the same
ranks.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.recv as a bitstring.
mpi.recv - Equivalent to MPI_Recv(ptr, size, dtype, source, tag, comm, MPI_STATUS_IGNORE)
Operands
ref- Single,AnyMemRef, memref of any non-token type valuestag- Single,I32, 32-bit signless integersource- Single,I32, 32-bit signless integercomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Recv performs a blocking receive of size elements of type dtype
from rank source. The tag value and communicator enables the library to
determine the matching of multiple sends and receives between the same
ranks.
The MPI_Status is set to MPI_STATUS_IGNORE, as the status object
is not yet ported to MLIR.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.reduce_scatter_block as a bitstring.
mpi.reduce_scatter_block - Equivalent to MPI_Reduce_scatter_block(sendbuf, recvbuf, recvcount, dtype, op, comm)
Attributes
op- Single,MPI_ReductionOpEnum, MPI operation class
Operands
sendbuf- Single,AnyNon0RankedMemRef, non-0-ranked.memref of any non-token type valuesrecvbuf- Single,AnyNon0RankedMemRef, non-0-ranked.memref of any non-token type valuescomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Reduce_scatter_block first performs an element-wise reduction on the sendbuf across all processes in the communicator, then scatters the result by distributing equal-sized blocks to each process into recvbuf.
The op attribute specifies the reduction operation to be performed.
Currently only the MPI_Op predefined in the standard (e.g. MPI_SUM) are
supported.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.retval_check as a bitstring.
mpi.retval_check - Check an MPI return value against an error class
Attributes
errclass- Single,MPI_ErrorClassAttr, MPI error class name
Operands
val- Single,MPI_Retval, MPI function call return value (!mpi.retval)
Results
res- Single,I1, 1-bit signless integer
Description
This operation compares MPI status codes to known error class
constants such as MPI_SUCCESS, or MPI_ERR_COMM.
Return op name mpi.send as a bitstring.
mpi.send - Equivalent to MPI_Send(ptr, size, dtype, dest, tag, comm)
Operands
ref- Single,AnyMemRef, memref of any non-token type valuestag- Single,I32, 32-bit signless integerdest- Single,I32, 32-bit signless integercomm- Single,MPI_Comm, MPI communicator handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Send performs a blocking send of size elements of type dtype to rank
dest. The tag value and communicator enables the library to determine
the matching of multiple sends and receives between the same ranks.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.
Return op name mpi.wait as a bitstring.
mpi.wait - Equivalent to MPI_Wait(req, MPI_STATUS_IGNORE)
Operands
req- Single,MPI_Request, MPI asynchronous request handler
Results
retval- Optional,MPI_Retval, MPI function call return value (!mpi.retval)
Description
MPI_Wait blocks execution until the request has completed.
The MPI_Status is set to MPI_STATUS_IGNORE, as the status object
is not yet ported to MLIR.
This operation can optionally return an !mpi.retval value that can be used
to check for errors.