Medial Code Documentation
|
core interface of the engine More...
Namespaces | |
namespace | mpi |
namespace that contains stubs to be compatible with MPI | |
Data Structures | |
class | AllreduceBase |
implementation of basic Allreduce engine More... | |
class | AllreduceMock |
class | IEngine |
interface of core Allreduce engine More... | |
class | MPIEngine |
implementation of engine using MPI More... | |
struct | ThreadLocalEntry |
entry to to easily hold returning information More... | |
Typedefs | |
using | Manager = AllreduceBase |
using | EngineThreadLocal = dmlc::ThreadLocalStore< ThreadLocalEntry > |
Functions | |
bool | Init (int argc, char *argv[]) |
initializes the engine module | |
bool | Finalize () |
finalizes the engine module | |
IEngine * | GetEngine () |
singleton method to get engine | |
void | Allgather (void *sendrecvbuf, size_t total_size, size_t slice_begin, size_t slice_end, size_t size_prev_slice) |
Allgather function, each node have a segment of data in the ring of sendrecvbuf, the data provided by current node k is [slice_begin, slice_end), the next node's segment must start with slice_end after the call of Allgather, sendrecvbuf_ contains all the contents including all segments use a ring based algorithm. | |
void | Allreduce_ (void *sendrecvbuf, size_t type_nbytes, size_t count, IEngine::ReduceFunction red, mpi::DataType dtype, mpi::OpType op, IEngine::PreprocFunction prepare_fun=nullptr, void *prepare_arg=nullptr) |
perform in-place Allreduce, on sendrecvbuf this is an internal function used by rabit to be able to compile with MPI do not use this function directly | |
size_t | ParseUnit (const char *name, const char *val) |
MPI::Datatype | GetType (mpi::DataType dtype) |
MPI::Op | GetOp (mpi::OpType otype) |
Variables | |
MPIEngine | manager |
core interface of the engine
void rabit::engine::Allgather | ( | void * | sendrecvbuf, |
size_t | total_size, | ||
size_t | slice_begin, | ||
size_t | slice_end, | ||
size_t | size_prev_slice | ||
) |
Allgather function, each node have a segment of data in the ring of sendrecvbuf, the data provided by current node k is [slice_begin, slice_end), the next node's segment must start with slice_end after the call of Allgather, sendrecvbuf_ contains all the contents including all segments use a ring based algorithm.
sendrecvbuf | buffer for both sending and receiving data, it is a ring conceptually |
total_size | total size of data to be gathered |
slice_begin | beginning of the current slice |
slice_end | end of the current slice |
size_prev_slice | size of the previous slice i.e. slice of node (rank - 1) % world_size |
void rabit::engine::Allreduce_ | ( | void * | sendrecvbuf, |
size_t | type_nbytes, | ||
size_t | count, | ||
IEngine::ReduceFunction | red, | ||
mpi::DataType | dtype, | ||
mpi::OpType | op, | ||
IEngine::PreprocFunction | prepare_fun = nullptr , |
||
void * | prepare_arg = nullptr |
||
) |
perform in-place Allreduce, on sendrecvbuf this is an internal function used by rabit to be able to compile with MPI do not use this function directly
sendrecvbuf | buffer for both sending and receiving data |
type_nbytes | the number of bytes the type has |
count | number of elements to be reduced |
reducer | reduce function |
dtype | the data type |
op | the reduce operator type |
prepare_func | Lazy preprocessing function, lazy prepare_fun(prepare_arg) will be called by the function before performing Allreduce, to initialize the data in sendrecvbuf_. If the result of Allreduce can be recovered directly, then prepare_func will NOT be called |
prepare_arg | argument used to pass into the lazy preprocessing function. |
bool rabit::engine::Finalize | ( | void | ) |
finalizes the engine module
finalize syncrhonization module
bool rabit::engine::Init | ( | int | argc, |
char * | argv[] | ||
) |
initializes the engine module
initialize the synchronization module
intiialize the synchronization module