microsoft / microsoft/TRELLIS

Why multi-GPU train is slower than single GPU

Open
#290 0 comments 0 reactions 0 assignees View on GitHub

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
Image
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
Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.