All Reduce算法汇总

1、朴素All Reduce

假设GPU节点数为N,两两GPU间的网络上下行带宽均为B,weight数据量S,那么broadcast(下图中的Receive)的通信时间:T = (N-1)S/B,可以看出T随N线性增长,当N很大时,这会成为严重的瓶颈。

当然,这是基于同步SGD。如果用异步SGD,通信时间会变短,但是异步SGD可能会不收敛。

2、Baidu All Reduce(Ring All Reduce)

参见:https://www.cnblogs.com/yangwenhuan/p/11391197.html

3、Double binary trees 

参考链接

1)Baidu All Reduce:

http://andrew.gibiansky.com/

https://github.com/baidu-research/baidu-allreduce

2)Horovod:

https://arxiv.org/pdf/1802.05799.pdf

原文地址:https://www.cnblogs.com/yangwenhuan/p/11390823.html