There is no option to select different GPU ids here
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
When we run the code for a single node-multiple gpu case, as soon as torch.distributed.init_process_group(backend='nccl', init_method='env://') is executed, Pytorch spawns n processes on n gpus as the following argument makes it to do so torch.distributed.launch --nproc_per_node=n. All these processes started from the 0-th index up to n-1 gpu and there is no way to change the indices of gpus and starting them from anything else rather than zero. Although, later we can change the indices of the gpus for the model and data but those initialized processes on the n gpus at the beginning will remain.
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 at examples/imagenet/main_amp.py around line 123 and inspect how torch.distributed.init_process_group is reached when launched with torch.distributed.launch. Trace the handling of GPU and process indices, then verify that a run can initialize the requested nonzero GPU range without leaving processes on the default devices.
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
- Mostly clear
- Newbie friendliness
- 35/100