Why multi-GPU train is slower than single GPU
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
I am following the train guide in a 8*GPU machine, however, the train speed of 8 GPU is slower than 1 GPU.
1 GPU
CUDA_VISIBLE_DEVICES=0 python train.py --config configs/vae/slat_vae_dec_mesh_swin8_B_64l8_fp16.json --output_dir outputs/slat_vae_dec_mesh_swin8_B_64l8_fp16_1node_8gpu --data_dir datasets/HSSD
8 GPU
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train.py --config configs/vae/slat_vae_dec_mesh_swin8_B_64l8_fp16.json --output_dir outputs/slat_vae_dec_mesh_swin8_B_64l8_fp16_1node_8gpu --data_dir datasets/HSSD
I am not familiar with torch DDP, the LLM told me that self.step is a global variable, it should be updated by all of the threads, so I think the speed in 8GPU should be the overall speed, is that correct?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with train.py and the configs/vae/slat_vae_dec_mesh_swin8_B_64l8_fp16.json configuration, then reproduce the provided single-GPU and eight-GPU commands. Inspect the torch DDP handling and how self.step is updated; the issue is done when the slowdown's cause and the expected speed comparison are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100