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
deepspeed
Commits
d38ad6a1
Unverified
Commit
d38ad6a1
authored
Jan 05, 2021
by
Ammar Ahmad Awan
Committed by
GitHub
Jan 05, 2021
Browse files
change dist to torch.distributed to fix bug in assert. (#638)
parent
a9a83a6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
deepspeed/utils/distributed.py
deepspeed/utils/distributed.py
+3
-3
No files found.
deepspeed/utils/distributed.py
View file @
d38ad6a1
...
...
@@ -77,9 +77,9 @@ def mpi_discovery(distributed_port=TORCH_DISTRIBUTED_DEFAULT_PORT, verbose=True)
os
.
environ
[
'MASTER_PORT'
]))
if
torch
.
distributed
.
is_initialized
():
assert
dist
.
get_rank
()
==
rank
,
"MPI rank {} does not match torch rank {}"
.
format
(
rank
,
dist
.
get_rank
())
assert
dist
.
get_world_size
()
==
world_size
,
"MPI world size {} does not match torch world size {}"
.
format
(
world_size
,
dist
.
get_world_size
())
assert
torch
.
distributed
.
get_rank
()
==
rank
,
"MPI rank {} does not match torch rank {}"
.
format
(
rank
,
dist
.
get_rank
())
assert
torch
.
distributed
.
get_world_size
()
==
world_size
,
"MPI world size {} does not match torch world size {}"
.
format
(
world_size
,
torch
.
distributed
.
get_world_size
())
def
in_aml
():
...
...
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