当前位置: 首页 > news >正文

pytorch 分布式 Node/Worker/Rank等基础概念

分布式训练相关基本参数的概念如下:

Definitions

  1. Node - A physical instance or a container; maps to the unit that the job manager works with.

  2. Worker - A worker in the context of distributed training.

  3. WorkerGroup - The set of workers that execute the same function (e.g. trainers).

  4. LocalWorkerGroup - A subset of the workers in the worker group running on the same node.

  5. RANK - The rank of the worker within a worker group.

  6. WORLD_SIZE - The total number of workers in a worker group.

  7. LOCAL_RANK - The rank of the worker within a local worker group.

  8. LOCAL_WORLD_SIZE - The size of the local worker group.

  9. rdzv_id - A user-defined id that uniquely identifies the worker group for a job. This id is used by each node to join as a member of a particular worker group.

  1. rdzv_backend - The backend of the rendezvous (e.g. c10d). This is typically a strongly consistent key-value store.

  2. rdzv_endpoint - The rendezvous backend endpoint; usually in form <host>:<port>.

Node runs LOCAL_WORLD_SIZE workers which comprise a LocalWorkerGroup. The union of all LocalWorkerGroups in the nodes in the job comprise the WorkerGroup.

翻译:

Node: 通常代表有几台机器

Worker: 指一个训练进程

WORD_SIZE: 总训练进程数,通常与所有机器加起来的GPU数相等(通常每个GPU跑一个训练进程)

RANK:  每个Worker的标号,用来标识每个每个训练进程(所有机器)

LOCAL_RANK :  在同一台机器上woker的标识,例如一台8卡机器上的woker标识就是0-7

总结:

一个节点(一台机器) 跑 LOCAL_WORLD_SIZE 个数的workers, 这些workers 构成了LocalWorkerGroup(组的概念), 

所有机器上的LocalWorkerGroup 就组成了WorkerGroup 

ps: Local 就是代表一台机器上的相关概念, 当只有一台机器时,Local的数据和不带local的数据时一致的

reference:

torchrun (Elastic Launch) — PyTorch 2.1 documentation

http://www.lryc.cn/news/278661.html

相关文章:

  • 《动手学深度学习》学习笔记 第8章 循环神经网络
  • 腾讯实验平台基于 StarRocks 构建湖仓底座
  • 【基础工具篇使用】ADB 的安装和使用
  • 数字图像处理练习题
  • 开关电源PFC电路原理详解及matlab仿真
  • SpringBoot+Hutool实现图片验证码
  • 【MySQL】MySQL版本8+ 窗口函数 Lead 的两种使用
  • Hive 的 安装与使用
  • Zynq 电源
  • DevOps系列之 Python操作数据库
  • 【AI视野·今日NLP 自然语言处理论文速览 第七十四期】Wed, 10 Jan 2024
  • TDengine 签约积成电子
  • C++ 数组分页,经常有用到分页,索性做一个简单封装 已解决
  • Redis管道操作
  • 新一代通信协议 - Socket.D
  • 国产系统-银河麒麟桌面版安装wps
  • Day31 贪心算法 part01 理论基础 455.分发饼干 376.摆动序列 53.最大子序和
  • 行为型模式 | 观察者模式
  • Python面向对象之继承
  • 如何使用CFImagehost结合内网穿透搭建私人图床并无公网ip远程访问
  • Wargames与bash知识14
  • 2020年认证杯SPSSPRO杯数学建模C题(第二阶段)抗击疫情,我们能做什么全过程文档及程序
  • JAVA基础学习笔记-day17-反射
  • 经典算法-模拟退火算法的python实现
  • 谷粒学院项目redirect_uri 参数错误微信二维码登录
  • Jenkins+nexus
  • 「JavaSE」类和对象1
  • Ubuntu server搭建dhcp服务器
  • 2024--Django平台开发-Web框架和Django基础(二)---Mysql多版本共存(Mac系统)
  • Pytorch 反向传播 计算图被修改的报错