зеркало из https://github.com/microsoft/LightGBM.git
This commit is contained in:
Родитель
b52ecb1668
Коммит
e157279490
|
@ -100,9 +100,9 @@ class Network {
|
|||
/*! \brief Free this static class */
|
||||
static void Dispose();
|
||||
/*! \brief Get rank of this machine */
|
||||
static inline int rank();
|
||||
static int rank();
|
||||
/*! \brief Get total number of machines */
|
||||
static inline int num_machines();
|
||||
static int num_machines();
|
||||
|
||||
/*!
|
||||
* \brief Perform all_reduce. if data size is small,
|
||||
|
@ -312,14 +312,6 @@ class Network {
|
|||
static THREAD_LOCAL AllgatherFunction allgather_ext_fun_;
|
||||
};
|
||||
|
||||
inline int Network::rank() {
|
||||
return rank_;
|
||||
}
|
||||
|
||||
inline int Network::num_machines() {
|
||||
return num_machines_;
|
||||
}
|
||||
|
||||
} // namespace LightGBM
|
||||
|
||||
#endif // LightGBM_NETWORK_H_
|
||||
|
|
|
@ -317,4 +317,12 @@ void Network::ReduceScatterRing(char* input, comm_size_t, int type_size,
|
|||
std::memcpy(output, input + block_start[rank_], block_len[rank_]);
|
||||
}
|
||||
|
||||
int Network::rank() {
|
||||
return rank_;
|
||||
}
|
||||
|
||||
int Network::num_machines() {
|
||||
return num_machines_;
|
||||
}
|
||||
|
||||
} // namespace LightGBM
|
||||
|
|
Загрузка…
Ссылка в новой задаче