与 DataParallel 的单进程控制多 GPU 不同,在 distributed 的帮助下,我们只需要编写一份代码,torch 就会自动将其分配给 个进程,分别在 个 GPU 上运行。 在 API 层面,pytorch 为我们提供了 torch.distributed.launch 启动器,用于在命令行分布式地执行 python 文件。
When splitting a simple model that contains an nn.Embedding layer into pipeline stages with the torch.distributed.pipelining.pipeline API, the pipeline representation incorrectly calls the embedding ...