Unverified Commit 8067efa4 authored by Takuya Makino's avatar Takuya Makino Committed by GitHub
Browse files

Fix NameError: name 'dist' is not defined (#763)

parent c28a71f9
...@@ -89,7 +89,8 @@ def mpi_discovery(distributed_port=TORCH_DISTRIBUTED_DEFAULT_PORT, verbose=True) ...@@ -89,7 +89,8 @@ def mpi_discovery(distributed_port=TORCH_DISTRIBUTED_DEFAULT_PORT, verbose=True)
os.environ['MASTER_PORT'])) os.environ['MASTER_PORT']))
if torch.distributed.is_initialized(): 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( 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()) world_size, torch.distributed.get_world_size())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment