wtliao / text2image

Text to Image Generation with Semantic-Spatial Aware GAN
179 stars 34 forks source link

How to use multiple GPUs for training? #16

Open iwldzt3011 opened 2 years ago

wtliao commented 2 years ago

line523-524 in main.py has defined the multi-gpu conditions. Directly run the file whever you have multiple GPUs, like

CUDA_VISIBLE_DEVICES=10,,2,3,4,5,6,7 python main.py

iwldzt3011 commented 2 years ago

line523-524 in main.py has defined the multi-gpu conditions. Directly run the file whever you have multiple GPUs, like

CUDA_VISIBLE_DEVICES=10,,2,3,4,5,6,7 python main.py

OK, I'll try it. Thank you very much

iwldzt3011 commented 2 years ago

line523-524 in main.py has defined the multi-gpu conditions. Directly run the file whever you have multiple GPUs, like

CUDA_VISIBLE_DEVICES=10,,2,3,4,5,6,7 python main.py

When I use multiple 2080tis for training, I will report an error, nccl error 2 unhandled system. Have you ever encountered this problem? What version of torch do you use? The version I use is 1.10

iwldzt3011 commented 2 years ago

line523-524 in main.py has defined the multi-gpu conditions. Directly run the file whever you have multiple GPUs, like CUDA_VISIBLE_DEVICES=10,,2,3,4,5,6,7 python main.py

When I use multiple 2080tis for training, I will report an error, nccl error 2 unhandled system. Have you ever encountered this problem? What version of torch do you use? The version I use is 1.10

I solved this problem. After I reduced the torch version to 1.6.0, I found that the speed of training on four 2080tis is almost the same as that on one 3080. Is it normal to have an epoch in about 13 minutes?