| 444 | } |
| 445 | |
| 446 | void NcclManager::SignalMultiNodeReady(const string& collective_key) { |
| 447 | Collective* to_run = nullptr; |
| 448 | { |
| 449 | mutex_lock l(mu_); |
| 450 | auto collective_it = collectives_.find(collective_key); |
| 451 | if (collective_it != collectives_.end()) { |
| 452 | Collective* collective = collective_it->second; |
| 453 | collective->multi_node_ready = true; |
| 454 | if (CheckReady(collective_key, collective)) { |
| 455 | to_run = collective; |
| 456 | } |
| 457 | VLOG(2) << "SignalMultiNodeReady collective " << collective_key |
| 458 | << " to_run " << to_run; |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | if (to_run != nullptr) RunCollective(to_run); |
| 463 | } |
| 464 | |
| 465 | void NcclManager::AddParticipant(std::unique_ptr<Participant> participant, |
| 466 | const Context& context, |