Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Megatron-LM
Commits
ee4fd509
"vscode:/vscode.git/clone" did not exist on "e58eeebfb68e42871f60cc0702b35d1110653d80"
Commit
ee4fd509
authored
Aug 16, 2021
by
Mohammad Shoeybi
Committed by
Jared Casper
Aug 16, 2021
Browse files
changed torch distributed init method from tcp to env
parent
78a69eaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
megatron/initialize.py
megatron/initialize.py
+2
-6
No files found.
megatron/initialize.py
View file @
ee4fd509
...
...
@@ -176,14 +176,10 @@ def _initialize_distributed():
args
.
local_rank
=
device
torch
.
cuda
.
set_device
(
device
)
# Call the init process
init_method
=
'tcp://'
master_ip
=
os
.
getenv
(
'MASTER_ADDR'
,
'localhost'
)
master_port
=
os
.
getenv
(
'MASTER_PORT'
,
'6000'
)
init_method
+=
master_ip
+
':'
+
master_port
torch
.
distributed
.
init_process_group
(
backend
=
args
.
distributed_backend
,
world_size
=
args
.
world_size
,
rank
=
args
.
rank
,
init_method
=
init_method
)
world_size
=
args
.
world_size
,
rank
=
args
.
rank
)
# Set the tensor model-parallel, pipeline model-parallel, and
# data-parallel communicators.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment