deeplabv3-plus-pytorch icon indicating copy to clipboard operation
deeplabv3-plus-pytorch copied to clipboard

单机多卡分布训练

Open BaronDuan opened this issue 1 year ago • 3 comments

UpUp你好:我在远程服务器运行你的代码的时候想使用单机多卡分布训练,但是按照你的注释提示在终端运行时还是一直报错: ValueError: Error initializing torch.distributed using env:// rendezvous: environment variable RANK expected, but not set 这是为啥啊,Up能帮忙解决一下吗?

BaronDuan avatar Jan 21 '24 08:01 BaronDuan

Up:我感觉有一点奇怪,就是我没有设置环境变量CUDA_VISIBLE_DEVICES=0,1,2,3,以及参数变量--nproc_per_node=4,但是我发现gpu-Util居然4块GPU都在使用,这是为啥啊? QQ图片

BaronDuan avatar Jan 21 '24 08:01 BaronDuan

我已经明白为什么4块GPU都在用了,因为代码设置成了单机多卡非分布式训练,但是我想知道如何进行单机多卡分布训练呢?我按照代码注释来一直报错

BaronDuan avatar Jan 22 '24 06:01 BaronDuan

富哥

ZJDATY avatar May 18 '24 07:05 ZJDATY