当前位置:网站首页>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.
边栏推荐
猜你喜欢

Get the network input dimensions of the pretrained model

Error correction notes for the book Image Processing, Analysis and Machine Vision

Linux中安装Redis教程

Cloud Computing Basics - Study Notes

The future of cloud gaming

Chengyun Technology was invited to attend the 2022 Alibaba Cloud Partner Conference and won the "Gathering Strength and Going Far" Award

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

sql server duplicate values are counted after

scikit-image image processing notes

Nacos配置服务的源码解析(全)
随机推荐
多用户商城多商户B2B2C拼团砍价秒杀支持小程序H5+APP全开源
DevOps - Understanding Learning
亚马逊美国站:马术头盔CPC认证标准要求
vscode笔记
The future of cloud gaming
docker部署完mysql无法连接
Configuration of routers and static routes
uniapp打包次数限制怎么办?只需两步就能解决
Network Protocol Fundamentals - Study Notes
cs231n学习记录
DevOps流程demo(实操记录)
Mina disconnects and reconnects
Jenkins详细配置
人人AI(吴恩达系列)
el-progress implements different colors of the progress bar
Nacos配置服务的源码解析(全)
D46_Force applied to rigid body
Tencent Internal Technology: Evolution of Server Architecture of "The Legend of Xuanyuan"
numpy.random使用文档
System basics - study notes (some command records)