pytorch多进程训练
pytorch多进程训练
一. 基础知识
- group:进程组,默认情况下只有一个组,多进程中一个group有多个world
- world:全局进程个数
- rank:表示进程号,用于进程间通信(值越低,优先级越高)
- local-rank:进程内GPU编号
二. 开启分布式模式
1 | def init_distributed_mode(args): |
- Post title:pytorch多进程训练
- Post author:sixwalter
- Create time:2023-08-05 11:14:26
- Post link:https://coelien.github.io/2023/08/05/projects/huawei project/distributed/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
Comments