fix performance

revert-15207-remove_op_handle_lock_and_fix_var
Yancey1989 7 years ago
parent 73edf13767
commit 47740ace28

@ -107,6 +107,7 @@ void AllReduceOpHandle::RunImpl() {
PADDLE_ENFORCE(platform::dynload::ncclAllReduce( PADDLE_ENFORCE(platform::dynload::ncclAllReduce(
buffer, buffer, numel, static_cast<ncclDataType_t>(dtype), buffer, buffer, numel, static_cast<ncclDataType_t>(dtype),
ncclSum, comm, stream)); ncclSum, comm, stream));
if (!nccl_ctxs_->need_group_call_) cudaStreamSynchronize(stream);
}); });
} }

Loading…
Cancel
Save