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
8067efa4
Unverified
Commit
8067efa4
authored
Feb 18, 2021
by
Takuya Makino
Committed by
GitHub
Feb 17, 2021
Browse files
Fix NameError: name 'dist' is not defined (#763)
parent
c28a71f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
deepspeed/utils/distributed.py
deepspeed/utils/distributed.py
+2
-1
No files found.
deepspeed/utils/distributed.py
View file @
8067efa4
...
...
@@ -89,7 +89,8 @@ def mpi_discovery(distributed_port=TORCH_DISTRIBUTED_DEFAULT_PORT, verbose=True)
os
.
environ
[
'MASTER_PORT'
]))
if
torch
.
distributed
.
is_initialized
():
assert
torch
.
distributed
.
get_rank
()
==
rank
,
"MPI rank {} does not match torch rank {}"
.
format
(
rank
,
dist
.
get_rank
())
assert
torch
.
distributed
.
get_rank
()
==
rank
,
"MPI rank {} does not match torch rank {}"
.
format
(
rank
,
torch
.
distributed
.
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
())
...
...
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