type
status
date
slug
summary
tags
category
icon
password
comment_flag
SLUGS

教程

  1. 速成torch的分布式训练可先看https://zhuanlan.zhihu.com/p/113694038,边看文章边coding,其参考了https://yangkky.github.io/2019/07/08/distributed-pytorch-tutorial.html。对应的仓库代码https://github.com/yangkky/distributed_tutorial/tree/master/src,从单进程训练→单机多进程分布式训练→单机多进程分布式训练+apex。
    1. 个人实战1
      models.py
      main-singleprocess.py
      main-multiprocess.py
  1. 在熟悉上面的文章后,可阅读https://spell.ml/blog/pytorch-distributed-data-parallel-XvEaABIAAB8Ars0e来巩固学习torch的DDP。其对应的仓库代码https://github.com/spellml/deeplab-voc-2012/tree/master/models
  1. 然后想从torch的DDP到使用horovod,可阅读https://zhuanlan.zhihu.com/p/98535650,其对应的仓库代码https://github.com/tczhangzhi/pytorch-distributed/blob/master/horovod_distributed.py。在这之前你可能需要安装horovod。
    1. 个人实战2
      models.py
      _01_torch_ddp.py
      _02_torch_hvd.py
       
安装horovod要诀Pytorch指定GPU的操作小结
Loading...