One of the unique things about Horovod is its ability to interleave communication and computation coupled with the ability to batch small allreduce operations, which results in improved performance. We call this batching feature Tensor Fusion.
Tensor Fusion works by attempting to combine all the tensors that are ready to be reduced at given moment of time into one reduction operation. The algorithm of Tensor Fusion is as follows:
HOROVOD_FUSION_THRESHOLD
bytes and have the same data type.HOROVOD_FUSION_THRESHOLD
if it was not allocated before. Default fusion buffer size is 64 MB.The fusion buffer size can be adjusted using the --fusion-threshold-mb
command line argument to horovodrun
:
$ horovodrun -np 4 --fusion-threshold-mb 32 python train.py
Setting --fusion-threshold-mb
to zero disables Tensor Fusion:
$ horovodrun -np 4 --fusion-threshold-mb 0 python train.py
You can tweak time between cycles (defined in milliseconds) using the --cycle-time-ms
command line argument:
$ horovodrun -np 4 --cycle-time-ms 3.5 python train.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。