当前位置:网站首页>Pytorch distributed parallel processing
Pytorch distributed parallel processing
2022-08-05 06:48:00 【ProfSnail】
In the official documentation of version 1.9 of Pytorch, it is clearly stated that nn.DataParallel
or multiprocessin
g is no longer recommended, but nn is recommended.parallel.DistributedDataParllel
.Even if there is only one GPU core, nn.paralle.DistributeDataParalle
is also recommended.The reason given in the official documentation is:
The difference between
DistributedDataParallel
andDataParallel
is:DistributedDataParallel
uses multiprocessing where a process is created for each GPU, whileDataParallel
uses multithreading. By using multiprocessing, each GPU has its dedicated process, this avoids the performance overhead caused by GIL of Python interpreter.
The general idea is that DistributedDataParallel
is better because it allocates a fixed process to each GPU; and DataParallel
is not recommended because it uses a multi-threaded method, which may incur performance overhead from the GIL or the Python interpreter.
Another Basic
document mentions that for torch.multiprocessing
or torch.nn.DataParallel
, the user must displayCreate an independent copy of the main training script for each process.This is not convenient.
边栏推荐
- document.querySelector() method
- NB-IOT智能云家具项目系列实站
- ev加密视频转换成MP4格式,亲测可用
- DisabledDate date picker datePicker
- The cocos interview answers you are looking for are all here!
- Error correction notes for the book Image Processing, Analysis and Machine Vision
- VSCode编写OpenCV
- transport layer protocol
- Mina's long and short connections
- 邮件管理 过滤邮件
猜你喜欢
Passing parameters in multiple threads
DevOps process demo (practical record)
Cocos Creator Mini Game Case "Stick Soldier"
农场游戏果园系统+牧场养殖系统+广告联盟模式流量主游戏小程序APP V1
如何将.asd恢复为Word文档
DevOps - Understanding Learning
文件内音频的时长统计并生成csv文件
selenium learning
多行文本省略
Some basic method records of commonly used languages in LeetCode
随机推荐
reduce()方法的学习和整理
js判断文字是否超过区域
LeetCode中常用语言的一些基本方法记录
文本样式这一篇文章就够了
numpy.random usage documentation
文件内音频的时长统计并生成csv文件
D45_Camera assembly Camera
uniapp打包次数限制怎么办?只需两步就能解决
D39_ coordinate transformation
numpy.random使用文档
单片机期末复习大题
Get the network input dimensions of the pretrained model
七种让盒子水平垂直居中的方法
农场游戏果园系统+牧场养殖系统+广告联盟模式流量主游戏小程序APP V1
Network Troubleshooting Basics - Study Notes
ev加密视频转换成MP4格式,亲测可用
【FAQ】CCAPI Compatible EOS Camera List (Updated in August 2022)
设置文本向两边居中展示
获取预训练模型的网络输入尺寸
LaTeX笔记