Merge pull request #34471 from benbarsdell:fix-nccl-broadcast-bug

PiperOrigin-RevId: 281680112
Change-Id: I48dfd66ffb2fc2babfc2b7625c5d0f62cfd08c80
This commit is contained in:
TensorFlower Gardener 2019-11-20 22:57:07 -08:00
commit 319d6a4eba

View File

@ -703,6 +703,9 @@ void NcclManager::LoopKernelLaunches(NcclStream* nccl_stream) {
if (p->output) {
recvbuff = const_cast<char*>(p->output->tensor_data().data());
num_elements = p->output->NumElements();
} else {
// Operate in-place if no output (for the src node).
recvbuff = const_cast<void*>(sendbuff);
}
if (num_elements < 0) {
p->done_callback(errors::Internal(