Skip to content

Commit 79f0731

Browse files
committed
remove explicit ddp destruction
1 parent 507b6f9 commit 79f0731

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tests/metrics/test_converters.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ def test_sync_reduce_ddp():
128128
worldsize = 2
129129
mp.spawn(ddp_test_fn, args=(worldsize,), nprocs=worldsize)
130130

131-
dist.destroy_process_group()
132-
133131

134132
def test_sync_reduce_simple():
135133
"""Make sure sync-reduce works without DDP"""
@@ -167,16 +165,13 @@ def _ddp_test_tensor_metric(rank, worldsize):
167165
_test_tensor_metric(True)
168166

169167

170-
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
171168
def test_tensor_metric_ddp():
172169
tutils.reset_seed()
173170
tutils.set_random_master_port()
174171

175172
world_size = 2
176173
mp.spawn(_ddp_test_tensor_metric, args=(world_size,), nprocs=world_size)
177174

178-
dist.destroy_process_group()
179-
180175

181176
def test_tensor_metric_simple():
182177
_test_tensor_metric(False)
@@ -208,13 +203,11 @@ def _ddp_test_numpy_metric(rank, worldsize):
208203
_test_numpy_metric(True)
209204

210205

211-
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
212206
def test_numpy_metric_ddp():
213207
tutils.reset_seed()
214208
tutils.set_random_master_port()
215209
world_size = 2
216210
mp.spawn(_ddp_test_numpy_metric, args=(world_size,), nprocs=world_size)
217-
dist.destroy_process_group()
218211

219212

220213
def test_numpy_metric_simple():

0 commit comments

Comments
 (0)