Class DefaultCommunicator

Inheritance Relationships

Base Type

Class Documentation

class DefaultCommunicator : public marian::ICommunicator

Public Functions

DefaultCommunicator(const std::vector<Ptr<ExpressionGraph>> &graphs, Ptr<IMPIWrapper> mpi)
~DefaultCommunicator()
size_t dataSize() const
size_t shardSize() const
std::pair<size_t, size_t> localShardRange(size_t localDeviceIndex) const
template<typename Ret>
Ret foreachAcc(const ForeachFunc<Ret> &func, const AccFunc<Ret> &acc, Ret init, bool parallel = true) const
float foreach(const ForeachFunc<float> &func, AccFunc<float> acc, float init, bool parallel = true) const
bool foreach(const ForeachFunc<bool> &func, bool parallel = true) const
void scatterReduceAndResetGrads() const
void allGatherParams() const
void broadcastParams(bool average = false) const
virtual void broadcastShards(const std::vector<Ptr<OptimizerBase>> &opts, bool average = false) const
void scatterState(const io::Item &data, const OptimizerBase::ScatterStateSetFunc &setFn) const
io::Item gatherState(const OptimizerBase::GatherStateGetFunc &getFn) const