torch_mlu/csrc/distributed/process_group_cncl.cpp
void ProcessGroupCNCL::WorkCNCL::synchronize() {
  auto current_queue = torch_mlu::getCurrentQueue();
  notifier_.wait(current_queue);

  if (blockingWait_) {
    current_queue.synchronize();
  }

  if (!barrier_tensors_.empty()) {
    torch_mlu::mlu::MLUGuard guard(devices_[0]);
    TORCH_CNRT_CHECK(cnrtSyncDevice());
  }

  return;
}
// Waiting on the work's corresponding CNRT events
Waiting on the work's corresponding CNRT events
Waiting on the work ' s corresponding CNRT events
void ProcessGroupCNCL::WorkCNCL::synchronize() {
  auto current_queue = torch_mlu::getCurrentQueue();
  notifier_.wait(current_queue);
  if (blockingWait_) {
    current_queue.synchronize();
  }
  if (!barrier_tensors_.empty()) {
    torch_mlu::mlu::MLUGuard guard(devices_[0]);
    TORCH_CNRT_CHECK(cnrtSyncDevice());
  }
  return;
}
void ProcessGroupCNCL :: WorkCNCL :: synchronize ( ) { auto current_queue = torch_mlu :: getCurrentQueue ( ) ; notifier_ . wait ( current_queue ) ; if ( blockingWait_ ) { current_queue . synchronize ( ) ; } if ( ! barrier_tensors_ . empty ( ) ) { torch_mlu :: mlu :: MLUGuard guard ( devices_ [ 0 ] ) ; TORCH_CNRT_CHECK ( cnrtSyncDevice ( ) ) ; } return ; }
Waiting on the work's corresponding CNRT events
Waiting on the work ' s corresponding CNRT events