forked from mindspore-Ecosystem/mindspore
code refine: reduce broadcast unique id frequence
This commit is contained in:
parent
f6524ca97b
commit
ff176d597f
|
@ -213,6 +213,11 @@ bool CollectiveManager::CreateCommunicationGroup(const std::string &group_name,
|
||||||
// newly generated one.
|
// newly generated one.
|
||||||
if (RecoveryContext::GetInstance()->enable_recovery()) {
|
if (RecoveryContext::GetInstance()->enable_recovery()) {
|
||||||
ret = CheckUniqueIDLatest(group_name, root_info_size, root_info);
|
ret = CheckUniqueIDLatest(group_name, root_info_size, root_info);
|
||||||
|
if (!ret) {
|
||||||
|
// The time interval for querying latest unique id from scheduler: 3 second.
|
||||||
|
constexpr uint32_t kWaitDuration = 3;
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(kWaitDuration));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue