Unverified Commit 688e6abe authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

call dist.is_initialized() after checking the availability (#128)

parent 22ba143d
...@@ -18,7 +18,10 @@ def get_dist_info(): ...@@ -18,7 +18,10 @@ def get_dist_info():
if torch.__version__ < '1.0': if torch.__version__ < '1.0':
initialized = dist._initialized initialized = dist._initialized
else: else:
initialized = dist.is_initialized() if dist.is_available():
initialized = dist.is_initialized()
else:
initialized = False
if initialized: if initialized:
rank = dist.get_rank() rank = dist.get_rank()
world_size = dist.get_world_size() world_size = dist.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