当前位置:网站首页>Pytorch分布式并行处理
Pytorch分布式并行处理
2022-08-05 05:25:00 【ProfSnail】
Pytorch在1.9版本的官方文档中,明确说明了不再建议使用nn.DataParallel,或者是multiprocessing,而是推荐使用nn.parallel.DistributedDataParllel。即使只有一个GPU核,同样也推荐使用nn.paralle.DistributeDataParalle。官方文档给出的理由是:
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.
大意是,DistributedDataParallel比较优秀,是因为他对每个GPU分配一个固定的进程;而DataParallel不推荐,因为使用的是多线程的方法,这可能会导致来自于GIL或者Python解释器的性能开销。
另一个Basic文档里面提到,对于torch.multiprocessing或者是torch.nn.DataParallel来说,用户必须要显式的对每个进程创建一个独立的、关于主训练脚本的副本。这不方便。
边栏推荐
- Four ways to obtain Class objects through reflection
- Mina disconnects and reconnects
- disabledDate 日期选择器 datePicker
- Complete mysql offline installation in 5 minutes
- The size of the screen adaptation
- Xiaodu Xiaodu is here!
- Difference between link and @improt
- CIPU, what impact does it have on the cloud computing industry?
- 前置++和后置++的区别
- Come, come, let you understand how Cocos Creator reads and writes JSON files
猜你喜欢

VLAN is introduced with the experiment

BIO, NIO, AIO practical study notes (easy to understand theory)

One-arm routing experiment and three-layer switch experiment

DevOps流程demo(实操记录)

Dry!Teach you to use industrial raspberries pie combining CODESYS configuration EtherCAT master station

DevOps-了解学习
![[issue resolved] - jenkins pipeline checkout timeout](/img/3d/c14276d2b5ce18fc3d1288abb059c0.png)
[issue resolved] - jenkins pipeline checkout timeout

BIO,NIO,AIO实践学习笔记(便于理解理论)

input详解之文件上传

sql server duplicate values are counted after
随机推荐
LeetCode中常用语言的一些基本方法记录
The 25 best free games on mobile in 2020
请问下通过flink sql读取hologres 的两张表的 binlog,然后如何进行join?
wc, grep, tar, vi/vim
Come, come, let you understand how Cocos Creator reads and writes JSON files
network issue?Service packet loss?This is enough
Media query, rem mobile terminal adaptation
Xiaodu Xiaodu is here!
Will intelligent operation and maintenance replace manual operation and maintenance?
From "dual card dual standby" to "dual communication", vivo took the lead in promoting the implementation of the DSDA architecture
干货!教您使用工业树莓派结合CODESYS配置EtherCAT主站
教您简单几步实现工业树莓派正确安装RS232转USB驱动
人人AI(吴恩达系列)
What?CDN cache acceleration only works for accelerating static content?
Mina's long and short connections
Transformer详细解读与预测实例记录
程序员应该这样理解I/O
七种让盒子水平垂直居中的方法
D39_ coordinate transformation
link 和@improt的区别