Unverified Commit d38ad6a1 authored by Ammar Ahmad Awan's avatar Ammar Ahmad Awan Committed by GitHub
Browse files

change dist to torch.distributed to fix bug in assert. (#638)

parent a9a83a6f
......@@ -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():
......
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