Skip to content

Commit

Permalink
[Refactor] Remove outdated code (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Sep 26, 2021
1 parent a90b397 commit 8cac7c2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions mmcv/runner/dist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from torch._utils import (_flatten_dense_tensors, _take_tensors,
_unflatten_dense_tensors)

from mmcv.utils import TORCH_VERSION, digit_version


def init_dist(launcher, backend='nccl', **kwargs):
if mp.get_start_method(allow_none=True) is None:
Expand Down Expand Up @@ -78,15 +76,7 @@ def _init_dist_slurm(backend, port=None):


def get_dist_info():
if (TORCH_VERSION != 'parrots'
and digit_version(TORCH_VERSION) < digit_version('1.0')):
initialized = dist._initialized
else:
if dist.is_available():
initialized = dist.is_initialized()
else:
initialized = False
if initialized:
if dist.is_available() and dist.is_initialized():
rank = dist.get_rank()
world_size = dist.get_world_size()
else:
Expand Down

0 comments on commit 8cac7c2

Please sign in to comment.