当前位置:网站首页>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 multiprocessing 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
DistributedDataParallelandDataParallelis:DistributedDataParalleluses multiprocessing where a process is created for each GPU, whileDataParalleluses 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.
边栏推荐
- Teach you simple steps to achieve industrial raspberries pie properly installed RS232 USB drive
- 文本样式这一篇文章就够了
- numpy.random usage documentation
- 七夕!专属于程序员的浪漫表白
- Mina's long and short connections
- Linux中安装Redis教程
- Transformer interprets and predicts instance records in detail
- GetEnumerator method and MoveNext and Reset methods in Unity
- el-progress implements different colors of the progress bar
- DevOps - Understanding Learning
猜你喜欢
随机推荐
H5开发调试-Fiddler手机抓包
Nacos集群搭建
VLAN is introduced with the experiment
el-progress实现进度条颜色不同
Matplotlib plotting notes
多行文本省略
[ingress]-ingress exposes services using tcp port
document.querySelector()方法
Alibaba Cloud Video on Demand
【FAQ】What is Canon CCAPI
LaTeX 图片加标题 文本分栏自动换行
淘宝宝贝页面制作
Shadowless Cloud Desktop
lingo入门——河北省第三届研究生建模竞赛B题
Linux中安装Redis教程
Transformer详细解读与预测实例记录
DisabledDate date picker datePicker
LeetCode刷题记录(2)
Nacos集群的搭建过程详解
input detailed file upload








