in src/torch_ucc.cpp [471:487]
void CommPG::ucc_destroy_team(ucc_team_h& team) {
std::unique_lock<std::mutex> lock(mutex);
queue_consume_cv.wait(
lock, [&] { return progress_queue.empty() && !collective_inprogress; });
ucc_status_t status;
while (UCC_INPROGRESS == (status = ucc_team_destroy(team))) {
if (UCC_OK != status) {
TORCH_UCC_LOG_ERROR(
TORCH_UCC_FINALIZE,
c10::str("ucc team destroy error: ", ucc_status_string(status)));
break;
}
}
lock.unlock();
}