How to use a single-machine multi-GPU to run
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
The function to get the device: init_distributed_device(args), in training.main.py line 129, it seems that only a single-GPU device can be obtained. The key part of the function is defined as follows:
if torch.cuda.is_available():
if args.distributed and not args.no_set_device_rank:
device = 'cuda:%d' % args.local_rank
else:
device = 'cuda:0'
torch.cuda.set_device(device)
else:
device = 'cpu'
How to make the project run on a single-machine multi-GPU?
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 in training.main.py around line 129 and inspect init_distributed_device(args), especially the args.distributed, args.no_set_device_rank, and args.local_rank branches. Trace how training is launched and configured, then establish the documented single-machine multi-GPU invocation and verify that training uses multiple GPUs without selecting only cuda:0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100