MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / Init

Method Init

src/network/network.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30void Network::Init(Config config) {
31 if (config.num_machines > 1) {
32 linkers_.reset(new Linkers(config));
33 rank_ = linkers_->rank();
34 num_machines_ = linkers_->num_machines();
35 bruck_map_ = linkers_->bruck_map();
36 recursive_halving_map_ = linkers_->recursive_halving_map();
37 block_start_ = std::vector<comm_size_t>(num_machines_);
38 block_len_ = std::vector<comm_size_t>(num_machines_);
39 buffer_size_ = 1024 * 1024;
40 buffer_.resize(buffer_size_);
41 Log::Info("Local rank: %d, total number of machines: %d", rank_, num_machines_);
42 }
43}
44
45void Network::Init(int num_machines, int rank,
46 ReduceScatterFunction reduce_scatter_ext_fun, AllgatherFunction allgather_ext_fun) {

Callers

nothing calls this directly

Calls 4

resetMethod · 0.80
rankMethod · 0.45
num_machinesMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected