未验证 提交 8067efa4 编写于 作者: T Takuya Makino 提交者: GitHub

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

上级 c28a71f9
......@@ -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())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册