stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

can not set GPU ids when DDP

Open fido20160817 opened this issue 2 years ago • 2 comments

I tried: CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nproc_per_node=4 --master_port=PORT train.py --batch BATCH_SIZE LMDB_PATH But the ids are always 0,1,2,3. I don't wha't the reason. Anybody konw this?

fido20160817 avatar Apr 18 '22 16:04 fido20160817

it's ok for other program

fido20160817 avatar Apr 18 '22 16:04 fido20160817

As ddp is depend on torch.distributed.launch, it is related on that module. I think you can try to use export CUDA_VISIBLED_DEVICES=4,5,6,7.

rosinality avatar Apr 18 '22 23:04 rosinality