Beaver.MLIR.Dialect.MPI (beaver v0.4.7)

Summary

Functions

mpi.allreduce - Equivalent to MPI_Allreduce(sendbuf, recvbuf, op, comm)

mpi.barrier - Equivalent to MPI_Barrier(comm)

mpi.comm_rank - Get the current rank, equivalent to MPI_Comm_rank(comm, &rank)

mpi.comm_size - Get the size of the group associated to the communicator, equivalent to MPI_Comm_size(comm, &size)

mpi.comm_split - Partition the group associated with the given communicator into disjoint subgroups

mpi.comm_world

mpi.error_class - Get the error class from an error code, equivalent to the MPI_Error_class function

mpi.finalize

mpi.init

mpi.irecv - Equivalent to MPI_Irecv(ptr, size, dtype, source, tag, comm, &req)

mpi.isend - Equivalent to MPI_Isend(ptr, size, dtype, dest, tag, comm)

mpi.recv - Equivalent to MPI_Recv(ptr, size, dtype, source, tag, comm, MPI_STATUS_IGNORE)

mpi.retval_check - Check an MPI return value against an error class

mpi.send - Equivalent to MPI_Send(ptr, size, dtype, dest, tag, comm)

mpi.wait - Equivalent to MPI_Wait(req, MPI_STATUS_IGNORE)

Functions

allreduce(ssa)

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 type values
  • recvbuf - Single, AnyMemRef, memref of any type values
  • comm - 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.

barrier(ssa)

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.

comm_rank(ssa)

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.

comm_size(ssa)

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.

comm_split(ssa)

mpi.comm_split - Partition the group associated with the given communicator into disjoint subgroups

Operands

  • comm - Single, MPI_Comm, MPI communicator handler
  • color - Single, I32, 32-bit signless integer
  • key - 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.

comm_world(ssa)

mpi.comm_world

error_class(ssa)

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.

finalize(ssa)

mpi.finalize

init(ssa)

mpi.init

irecv(ssa)

mpi.irecv - Equivalent to MPI_Irecv(ptr, size, dtype, source, tag, comm, &req)

Operands

  • ref - Single, AnyMemRef, memref of any type values
  • tag - Single, I32, 32-bit signless integer
  • source - Single, I32, 32-bit signless integer
  • comm - 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.

isend(ssa)

mpi.isend - Equivalent to MPI_Isend(ptr, size, dtype, dest, tag, comm)

Operands

  • ref - Single, AnyMemRef, memref of any type values
  • tag - Single, I32, 32-bit signless integer
  • dest - Single, I32, 32-bit signless integer
  • comm - 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.

recv(ssa)

mpi.recv - Equivalent to MPI_Recv(ptr, size, dtype, source, tag, comm, MPI_STATUS_IGNORE)

Operands

  • ref - Single, AnyMemRef, memref of any type values
  • tag - Single, I32, 32-bit signless integer
  • source - Single, I32, 32-bit signless integer
  • comm - 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.

retval_check(ssa)

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.

send(ssa)

mpi.send - Equivalent to MPI_Send(ptr, size, dtype, dest, tag, comm)

Operands

  • ref - Single, AnyMemRef, memref of any type values
  • tag - Single, I32, 32-bit signless integer
  • dest - Single, I32, 32-bit signless integer
  • comm - 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.

wait(ssa)

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.