8000 [distributed_test]Enable disabled ROCm tests. (#50421) · pytorch/pytorch@eb0fe70 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb0fe70

Browse files
jaglinuxfacebook-github-bot
authored andcommitted
[distributed_test]Enable disabled ROCm tests. (#50421)
Summary: Signed-off-by: Jagadish Krishnamoorthy <jagdish.krishna@gmail.com> Pull Request resolved: #50421 Reviewed By: ejguan Differential Revision: D26006844 Pulled By: zhaojuanmao fbshipit-source-id: aa6ac5ee2d37f354d52328c72eb2cd23f5665f53
1 parent aa3c28a commit eb0fe70

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

torch/testing/_internal/distributed/distributed_test.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,6 @@ def test_reduce_sum(self):
11001100

11011101
@unittest.skipIf(BACKEND != "nccl", "Only Nccl supports CUDA reduce")
11021102
@skip_if_no_gpu
1103-
@skip_if_rocm
11041103
def test_reduce_sum_cuda(self):
11051104
group, group_id, rank = self._init_global_test()
1106 10000 1105
rank_to_GPU = self._init_multigpu_helper()
@@ -1256,7 +1255,6 @@ def test_reduce_sum_twice(self):
12561255

12571256
@unittest.skipIf(BACKEND != "nccl", "Only Nccl supports CUDA reduce")
12581257
@skip_if_no_gpu
1259-
@skip_if_rocm
12601258
def test_reduce_sum_cuda_twice(self):
12611259
group, group_id, rank = self._init_global_test()
12621260
rank_to_GPU = self._init_multigpu_helper()
@@ -1635,7 +1633,6 @@ def test_sparse_all_reduce_sum(self):
16351633

16361634
@unittest.skipIf(BACKEND != "gloo", "Only Gloo backend support sparse all reduce")
16371635
@skip_if_no_gpu
1638-
@skip_if_rocm
16391636
def test_sparse_all_reduce_sum_cuda(self):
16401637
self._test_sparse_all_reduce_sum(lambda t: t.clone().cuda())
16411638

@@ -2227,7 +2224,6 @@ def test_all_to_all_single_equal_split(self):
22272224
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
22282225
)
22292226
@skip_if_no_gpu
2230-
@skip_if_rocm
22312227
def test_all_to_all_single_equal_split_cuda(self):
22322228
group, group_id, rank = self._init_global_test()
22332229
rank_to_GPU = self._init_multigpu_helper()
@@ -2250,7 +2246,6 @@ def test_all_to_all_single_unequal_split(self):
22502246
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
22512247
)
22522248
@skip_if_no_gpu
2253-
@skip_if_rocm
22542249
def test_all_to_all_single_unequal_split_cuda(self):
22552250
group, group_id, rank = self._init_global_test()
22562251
rank_to_GPU = self._init_multigpu_helper()
@@ -2286,7 +2281,6 @@ def test_all_to_all_single_equal_split_group(self):
22862281
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
22872282
)
22882283
@skip_if_no_gpu
2289-
@skip_if_rocm
22902284
@skip_if_small_worldsize
22912285
def test_all_to_all_single_equal_split_group_cuda(self):
22922286
group, group_id, rank = self._init_group_test()
@@ -2311,7 +2305,6 @@ def test_all_to_all_single_unequal_split_group(self):
23112305
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
23122306
)
23132307
@skip_if_no_gpu
2314-
@skip_if_rocm
23152308
@skip_if_small_worldsize
23162309
def test_all_to_all_single_unequal_split_group_cuda(self):
23172310
group, group_id, rank = self._init_global_test()
@@ -2356,7 +2349,6 @@ def test_all_to_all_single_equal_split_full_group(self):
23562349
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
23572350
)
23582351
@skip_if_no_gpu
2359-
@skip_if_rocm
23602352
def test_all_to_all_single_equal_split_full_group_cuda(self):
23612353
group, group_id, rank = self._init_full_group_test()
23622354
rank_to_GPU = self._init_multigpu_helper()
@@ -2379,7 +2371,6 @@ def test_all_to_all_single_unequal_split_full_group(self):
23792371
BACKEND != "nccl", "Only Nccl supports CUDA all_to_all_single"
23802372
)
23812373
@skip_if_no_gpu
2382-
@skip_if_rocm
23832374
def test_all_to_all_single_unequal_split_full_group_cuda(self):
23842375
group, group_id, rank = self._init_full_group_test()
23852376
rank_to_GPU = self._init_multigpu_helper()
@@ -2443,7 +2434,6 @@ def test_barrier_cuda(self):
24432434
@skip_if_small_worldsize
24442435
@skip_if_no_gpu
24452436
@unittest.skipIf(BACKEND == "mpi", "MPI doesn't supports GPU barrier")
2446-
@skip_if_rocm
24472437
def test_barrier_group_cuda(self):
24482438
group, group_id, rank = self._init_group_test()
24492439
rank_to_GPU = self._init_multigpu_helper()
@@ -2583,7 +2573,6 @@ def _test_reduce_multigpu_helper(
25832573

25842574
@unittest.skipIf(BACKEND != "nccl", "Only Nccl backend supports reduce multigpu")
25852575
@skip_if_no_gpu
2586-
@skip_if_rocm
25872576
def test_reduce_multigpu(self):
25882577
group, group_id, rank = self._init_global_test()
25892578
rank_to_GPU = self._init_multigpu_helper()
@@ -2820,7 +2809,6 @@ def test_DistributedDataParallel_requires_grad(self):
28202809
"Only NCCL and GLOO backend support DistributedDataParallel",
28212810
)
28222811
@skip_if_lt_x_gpu(int(os.environ["WORLD_SIZE"]))
2823-
@skip_if_rocm
28242812
def test_DistributedDataParallel_non_default_stream(self):
28252813
stream = torch.cuda.Stream(self.rank)
28262814
rank = self.rank
@@ -2896,7 +2884,6 @@ def test_DistributedDataParallel_powerSGD_ddp_comm_hook(self):
28962884
@unittest.skipIf(BACKEND != 'nccl' and BACKEND != 'gloo',
28972885
"Only Nccl & Gloo backend support DistributedDataParallel")
28982886
@skip_if_no_gpu
2899-
@skip_if_rocm
29002887
def test_DistributedDataParallel(self):
29012888
group, group_id, rank = self._init_global_test()
29022889
rank_to_GPU = self._init_multigpu_helper()
@@ -2913,7 +2900,6 @@ def test_DistributedDataParallel(self):
29132900
@unittest.skipIf(BACKEND != 'nccl' and BACKEND != 'gloo',
29142901
"Only Nccl & Gloo backend support DistributedDataParallel")
29152902
@skip_if_no_gpu
2916-
@skip_if_rocm
29172903
def test_DistributedDataParallel_with_grad_is_view(self):
29182904
group, group_id, rank = self._init_global_test()
29192905
rank_to_GPU = self._init_multigpu_helper()
@@ -3070,7 +3056,6 @@ def test_DistributedDataParallel_SyncBatchNorm_2D_Input(self):
30703056
"Only Nccl & Gloo backend support DistributedDataParallel")
30713057
@skip_if_no_gpu
30723058
@require_world_size(2)
3073-
@skip_if_rocm
30743059
def test_DistributedDataParallel_SyncBatchNorm_Single_Input_Per_Process(self):
30753060
group, group_id, rank = self._init_global_test()
30763061
rank_to_GPU = self._init_multigpu_helper()
@@ -3197,7 +3182,6 @@ def _run_reduction_test(
31973182
@require_backend({"nccl"})
31983183
@require_backends_available({"nccl"})
31993184
@skip_if_lt_x_gpu(2)
3200-
@skip_if_rocm
32013185
def test_nccl_backend_bool_allreduce(self):
32023186
torch.cuda.set_device(self.rank)
32033187
# Run all_reduce with PRODUCT
@@ -3228,7 +3212,6 @@ def test_nccl_backend_bool_allreduce(self):
32283212
@require_backend({"nccl"})
32293213
@require_backends_available({"nccl"})
32303214
@skip_if_lt_x_gpu(2)
3231-
@skip_if_rocm
32323215
def test_nccl_backend_bool_allgather(self):
32333216
torch.cuda.set_device(self.rank)
32343217
inp = {0: [True, True], 1: [False, True]}
@@ -3252,7 +3235,6 @@ def test_nccl_backend_bool_allgather(self):
32523235
@require_backend({"nccl"})
32533236
@require_backends_available({"nccl"})
32543237
@skip_if_lt_x_gpu(int(os.environ["WORLD_SIZE"]))
3255-
@skip_if_rocm
32563238
def test_nccl_backend_bool_reduce(self):
32573239
torch.cuda.set_device(self.rank)
32583240
inp = {0: [True, True], 1: [False, False]}
@@ -3285,7 +3267,6 @@ def test_nccl_backend_bool_reduce(self):
32853267
@require_backend({"nccl"})
32863268
@require_backends_available({"nccl"})
32873269
@skip_if_lt_x_gpu(2)
3288-
@skip_if_rocm
32893270
def test_nccl_backend_bool_broadcast(self):
32903271
tensor_size = 10
32913272
bcast_tensor = torch.tensor(
@@ -3481,7 +3462,6 @@ def validate_net_equivalence(self, net):
34813462
@require_backend({"gloo", "nccl"})
34823463
@require_backends_available({"gloo", "nccl"})
34833464
@skip_if_lt_x_gpu(2)
3484-
@skip_if_rocm
34853465
def test_ddp_sync_params_and_buffers(self):
34863466
# Test that after calling _sync_params_and_buffers, models across ranks
34873467
# are the same and are equal to the model on the input rank.
@@ -3523,7 +3503,6 @@ def test_ddp_sync_params_and_buffers(self):
35233503
@require_backend({"gloo", "nccl"})
35243504
@require_backends_available({"gloo", "nccl"})
35253505
@skip_if_lt_x_gpu(2)
3526-
@skip_if_rocm
35273506
def test_ddp_grad_div_uneven_inputs(self):
35283507
# Test gradient division during training with join() API. If
35293508
# divide_by_initial_world_size=False, we scale by the effective world
@@ -3577,7 +3556,6 @@ def test_ddp_grad_div_uneven_inputs(self):
35773556
@require_backend({"gloo", "nccl"})
35783557
@require_backends_available({"gloo", "nccl"})
35793558
@skip_if_lt_x_gpu(2)
3580-
@skip_if_rocm
35813559
def test_ddp_join_model_equivalence(self):
35823560
# Verifies equivalence with model training locally and with DDP under
35833561
# the join context manager.
@@ -3681,7 +3659,6 @@ def _run_uneven_inputs_test(
36813659
@require_backend({"gloo", "nccl"})
36823660
@require_backends_available({"gloo", "nccl"})
36833661
@skip_if_lt_x_gpu(2)
3684-
@skip_if_rocm
36853662
def test_ddp_uneven_inputs(self):
36863663
class DDPUnevenTestInput(NamedTuple):
36873664
name: str
@@ -3839,7 +3816,6 @@ def forward(self, x, rank):
38393816
@require_backend({"gloo", "nccl"})
38403817
@require_backends_available({"gloo", "nccl"})
38413818
@skip_if_lt_x_gpu(2)
3842-
@skip_if_rocm
38433819
def test_ddp_uneven_input_join_disable(self):
38443820
# tests that if net.join() with enable=False is specified, DDP works as
38453821
# expected with even inputs.
@@ -3874,7 +3850,6 @@ def test_ddp_uneven_input_join_disable(self):
38743850
@require_backend({"gloo", "nccl"})
38753851
@require_backends_available({"gloo", "nccl"})
38763852
@skip_if_lt_x_gpu(2)
3877-
@skip_if_rocm
38783853
def test_ddp_uneven_input_exception(self):
38793854
# Tests that exceptions during training are correctly propagated by the
38803855
# context manager.
@@ -3902,7 +3877,6 @@ def forward(self, _):
39023877
@require_backend({"gloo", "nccl"})
39033878
@require_backends_available({"gloo", "nccl"})
39043879
@skip_if_lt_x_gpu(4)
3905-
@skip_if_rocm
39063880
def test_ddp_uneven_inputs_replicated_error(self):
39073881
# Tests that the context manager errors out in SPMD mode.
39083882
group = dist.new_group([0, 1])
@@ -3952,7 +3926,6 @@ def test_broadcast_object_list(self):
39523926
@require_backend({"gloo", "nccl"})
39533927
@require_backends_available({"gloo", "nccl"})
39543928
@skip_if_lt_x_gpu(2)
3955-
@skip_if_rocm
39563929
def test_ddp_ignore_params_arg(self):
39573930
class TestModel(nn.Module):
39583931
def __init__(self, rank):
@@ -4040,7 +4013,6 @@ def forward(self, x):
40404013
@require_backend({"gloo", "nccl"})
40414014
@require_backends_available({"gloo", "nccl"})
40424015
@skip_if_lt_x_gpu(2)
4043-
@skip_if_rocm
40444016
def test_ddp_unused_params_rebuild_buckets_exception(self):
40454017
class ToyModel(nn.Module):
40464018
def __init__(self):
@@ -4071,7 +4043,6 @@ def forward(self, x):
40714043
@require_backend({"gloo", "nccl"})
40724044
@require_backends_available({"gloo", "nccl"})
40734045
@skip_if_lt_x_gpu(2)
4074-
@skip_if_rocm
40754046
def test_ddp_shared_grad_acc_unused_params(self):
40764047
# When find_unused_parameters=True, ensure we mark unused parameters
40774048
# even if they share gradient accumulators.
@@ -4104,7 +4075,6 @@ def forward(self, x):
41044075
@require_backend({"gloo", "nccl"})
41054076
@require_backends_available({"gloo", "nccl"})
41064077
@skip_if_lt_x_gpu(2)
4107-
@skip_if_rocm
41084078
def test_ddp_device(self):
41094079
m = nn.Linear(10, 10).to(self.rank)
41104080
expected_len = 2
@@ -4210,7 +4180,6 @@ def train_iter(inp, input_type):
42104180
@require_backend({"gloo", "nccl"})
42114181
@require_backends_available({"gloo", "nccl"})
42124182
@skip_if_lt_x_gpu(2)
4213-
@skip_if_rocm
42144183
def test_ddp_namedtuple(self):
42154184
batch = 5
42164185
dim = 10

0 commit comments

Comments
 (0)
0