Skip to content

Commit 0046c10

Browse files
author
Choi TaeHo
authored
Update README.md
1 parent 3e65394 commit 0046c10

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<p align="center"><img width="40%" src="./img/pytorch.png"></p>
22

33
# Multi Machine Tutorial for Pytorch
4-
It works TCP communication for multi-gpu processing.
5-
They automatically find unused port address and
4+
65

76
## Requirements
87
* pytorch : 1.5
@@ -18,9 +17,9 @@ CUDA_VISIBLE_DEVICES='0,1' python -m src.tools.check_dist --num-gpu 2
1817
## Multi Machines
1918
### Main Machine
2019
[For collective communication](https://tutorials.pytorch.kr/intermediate/dist_tuto.html#collective-communication) in pytorch, it needs to execute process in main machine.
21-
They automatically set main machine ip address and unused port number for TCP communication.
22-
`num-machine`
23-
set `machine-rank` to zero.
20+
They automatically set main machine IP address and unused port number for TCP communication.
21+
22+
For main process, you must set `machine-rank` to zero and `num-machine` to the number of machines.
2423
```bash
2524
CUDA_VISIBLE_DEVICES='0,1' python -m src.tools.check_dist --num-gpu 2 --num-machine 2 --machine-rank 0
2625
```
@@ -31,8 +30,7 @@ CUDA_VISIBLE_DEVICES='0,1' python -m src.tools.check_dist --num-gpu 2 --num-mach
3130
```
3231

3332
### Other Machines
34-
In other machines, you clarify `machine-rank` within the range of 1~(num_machine-1).
35-
And you must set `dist-ip` and `dist-port` arguments which is the same with main machine values.
33+
In other machines, you clarify `machine-rank` and must set `dist-ip` and `dist-port` arguments which is the same with main machine values.
3634

3735
```bash
3836
CUDA_VISIBLE_DEVICES='0,1' python -m src.tools.check_dist --num-gpu 2 --num-machine 2 --machine-rank 1 --dist-ip xxx.xxx.xxx.xxx --dist-port xxxxx

0 commit comments

Comments
 (0)