Run Horovod
https://horovod.readthedocs.io/en/stable/running_include.html
https://horovod.readthedocs.io/en/stable/running.html
horovodrun训练,通过-np 指定线程数
1. 单机 4卡
$ horovodrun -np 4 -H localhost:4 python train.py
2. 4太机器,每台机器4卡
$ horovodrun -np 16 -H server1:4,server2:4,server3:4,server4:4 python train.py
3. 通过配置文件指定节点,节点的线程数
$ cat myhostfile
aa slots=2
bb slots=2
cc slots=2
-
其中 aa,bb,cc 是主机的名字
-
slots 是每个主机上可以执行的线程数
$ horovodrun -np 6 -hostfile myhostfile python train.py
3. To run using Open MPI
https://horovod.readthedocs.io/en/stable/mpirun.html
4. Horovod in Docker
https://horovod.readthedocs.io/en/latest/docker_include.html
5.To run in Kubernetes, see Kubeflow, MPI Operator, Helm Chart, FfDL, and Polyaxon.
https://github.com/kubeflow/examples/tree/master/demos/yelp_demo/ks_app/vendor/kubeflow/mpi-job