fix import distributed nn

This commit is contained in:
lucasdelimanogueira 2024-05-25 08:57:35 -03:00
parent 5283c1bc06
commit 1e0c408ffb
4 changed files with 6 additions and 4 deletions

View file

@ -63,8 +63,8 @@ void allreduce_mean_tensor(Tensor* tensor) {
// Perform NCCL AllReduce operation to calculate the mean of all tensors across all processes
NCCL_CHECK(ncclAllReduce(tensor->data, tensor->data, tensor->size, ncclFloat, ncclSum, nccl_comm, stream));
tensor_div_scalar(tensor, tensor->data);
tensor_div_scalar_cuda(tensor, world_size, tensor->data);
cudaStreamSynchronize(stream);
cudaStreamDestroy(stream);
}