Skip to content

Commit acfbf10

Browse files
lcskrishnaiotamudelta
authored andcommitted
enabled tests in test_nn and test_torch (#247)
1 parent aad9aec commit acfbf10

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

test/test_nn.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,6 @@ def test_embedding_max_norm(self):
18581858

18591859
@unittest.skipIf(not TEST_CUDA, "CUDA unavailable")
18601860
@repeat_test_for_types(ALL_TENSORTYPES)
1861-
@skipIfRocm
18621861
def test_embedding_max_norm_cuda(self, dtype=torch.float):
18631862
embedding = nn.Embedding(22, 5, max_norm=1.0).to("cuda", dtype=dtype)
18641863
# nn.Embedding only takes LongTensor as input
@@ -4561,7 +4560,6 @@ def test_inplace_thnn(self):
45614560

45624561
@unittest.skipIf(not TEST_CUDA, 'CUDA not available')
45634562
@repeat_test_for_types(ALL_TENSORTYPES)
4564-
@skipIfRocm
45654563
def test_noncontig_conv_grad_cuda(self, dtype=torch.float):
45664564
# FIXME: remove after adding non-contiguous grad tests for all modules
45674565
module = nn.Conv2d(3, 5, kernel_size=3, padding=1).to("cuda", dtype)
@@ -6013,7 +6011,6 @@ def test_conv_double_backward_stride(self):
60136011
no_weight)
60146012

60156013
@unittest.skipIf(not TEST_CUDA, "CUDA unavailable")
6016-
@skipIfRocm
60176014
def test_cudnn_noncontiguous_weight(self):
60186015
# Noncontiguous weights must be contiguous() before being
60196016
# passed to cuDNN
@@ -7499,7 +7496,6 @@ def multimarginloss_weights_no_reduce_test():
74997496
cudnn=True,
75007497
check_eval=True,
75017498
skip_double=TEST_WITH_ROCM,
7502-
test_cuda=(not TEST_WITH_ROCM),
75037499
),
75047500
dict(
75057501
module_name='BatchNorm2d',
@@ -7509,7 +7505,6 @@ def multimarginloss_weights_no_reduce_test():
75097505
check_eval=True,
75107506
desc='2d_simple_average',
75117507
skip_double=TEST_WITH_ROCM,
7512-
test_cuda=(not TEST_WITH_ROCM),
75137508
),
75147509
dict(
75157510
module_name='BatchNorm2d',
@@ -7519,7 +7514,6 @@ def multimarginloss_weights_no_reduce_test():
75197514
check_eval=True,
75207515
desc='momentum',
75217516
skip_double=TEST_WITH_ROCM,
7522-
test_cuda=(not TEST_WITH_ROCM),
75237517
),
75247518
dict(
75257519
module_name='BatchNorm2d',
@@ -7538,15 +7532,13 @@ def multimarginloss_weights_no_reduce_test():
75387532
check_eval=True,
75397533
desc='not_tracking_stats',
75407534
skip_double=TEST_WITH_ROCM,
7541-
test_cuda=(not TEST_WITH_ROCM),
75427535
),
75437536
dict(
75447537
module_name='BatchNorm3d',
75457538
constructor_args=(3,),
75467539
input_size=(2, 3, 4, 4, 4),
75477540
cudnn=True,
75487541
check_eval=True,
7549-
decorator=skipIfRocm,
75507542
),
75517543
dict(
75527544
module_name='BatchNorm3d',
@@ -7555,7 +7547,6 @@ def multimarginloss_weights_no_reduce_test():
75557547
cudnn=True,
75567548
check_eval=True,
75577549
desc='3d_simple_average',
7558-
decorator=skipIfRocm,
75597550
),
75607551
dict(
75617552
module_name='BatchNorm3d',
@@ -7564,7 +7555,6 @@ def multimarginloss_weights_no_reduce_test():
75647555
cudnn=True,
75657556
check_eval=True,
75667557
desc='momentum',
7567-
decorator=skipIfRocm,
75687558
),
75697559
dict(
75707560
module_name='BatchNorm3d',
@@ -7581,7 +7571,6 @@ def multimarginloss_weights_no_reduce_test():
75817571
cudnn=True,
75827572
check_eval=True,
75837573
desc='not_tracking_stats',
7584-
decorator=skipIfRocm,
75857574
),
75867575
dict(
75877576
module_name='InstanceNorm1d',
@@ -7726,7 +7715,6 @@ def multimarginloss_weights_no_reduce_test():
77267715
input_size=(2, 4, 10),
77277716
cudnn=True,
77287717
skip_double=TEST_WITH_ROCM,
7729-
test_cuda=(not TEST_WITH_ROCM),
77307718
),
77317719
dict(
77327720
module_name='Conv1d',
@@ -7735,7 +7723,6 @@ def multimarginloss_weights_no_reduce_test():
77357723
cudnn=True,
77367724
desc='stride',
77377725
skip_double=TEST_WITH_ROCM,
7738-
test_cuda=(not TEST_WITH_ROCM),
77397726
),
77407727
dict(
77417728
module_name='Conv1d',
@@ -7744,7 +7731,6 @@ def multimarginloss_weights_no_reduce_test():
77447731
cudnn=True,
77457732
desc='pad1',
77467733
skip_double=TEST_WITH_ROCM,
7747-
test_cuda=(not TEST_WITH_ROCM),
77487734
),
77497735
dict(
77507736
module_name='Conv1d',
@@ -7753,7 +7739,6 @@ def multimarginloss_weights_no_reduce_test():
77537739
cudnn=True,
77547740
desc='pad2',
77557741
skip_double=TEST_WITH_ROCM,
7756-
test_cuda=(not TEST_WITH_ROCM),
77577742
),
77587743
dict(
77597744
module_name='Conv1d',
@@ -7762,7 +7747,6 @@ def multimarginloss_weights_no_reduce_test():
77627747
cudnn=True,
77637748
desc='pad1size1',
77647749
skip_double=TEST_WITH_ROCM,
7765-
test_cuda=(not TEST_WITH_ROCM),
77667750
),
77677751
dict(
77687752
module_name='Conv1d',
@@ -7771,52 +7755,45 @@ def multimarginloss_weights_no_reduce_test():
77717755
cudnn=True,
77727756
desc='pad2size1',
77737757
skip_double=TEST_WITH_ROCM,
7774-
test_cuda=(not TEST_WITH_ROCM),
77757758
),
77767759
dict(
77777760
fullname='Conv1d_dilated',
77787761
constructor=lambda: nn.Conv1d(4, 5, kernel_size=3, dilation=2),
77797762
input_size=(2, 4, 10),
77807763
skip_double=TEST_WITH_ROCM,
7781-
test_cuda=(not TEST_WITH_ROCM),
77827764
),
77837765
dict(
77847766
fullname='Conv1d_groups',
77857767
constructor=lambda: nn.Conv1d(4, 6, kernel_size=3, groups=2),
77867768
input_size=(2, 4, 6),
77877769
cudnn=True,
77887770
skip_double=TEST_WITH_ROCM,
7789-
test_cuda=(not TEST_WITH_ROCM),
77907771
),
77917772
dict(
77927773
fullname='ConvTranspose1d',
77937774
constructor=lambda: nn.ConvTranspose1d(3, 4, kernel_size=3, stride=(3,), padding=1, output_padding=(1,)),
77947775
cudnn=True,
77957776
input_size=(1, 3, 7),
7796-
test_cuda=(not TEST_WITH_ROCM),
77977777
),
77987778
dict(
77997779
module_name='ConvTranspose1d',
78007780
constructor_args=(3, 4, 3, 2, 1, 1, 1, False),
78017781
input_size=(1, 3, 6),
78027782
cudnn=True,
78037783
desc='no_bias',
7804-
test_cuda=(not TEST_WITH_ROCM),
78057784
),
78067785
dict(
78077786
module_name='ConvTranspose1d',
78087787
constructor_args=(3, 4, 3, 2, 1, 1, 1, True, 2),
78097788
input_size=(1, 3, 6),
78107789
cudnn=True,
78117790
desc='dilated',
7812-
test_cuda=(not TEST_WITH_ROCM),
78137791
),
78147792
dict(
78157793
fullname='ConvTranspose1d_groups',
78167794
constructor=lambda: nn.ConvTranspose1d(4, 6, 3, stride=(3,), padding=1, output_padding=(1,), groups=2),
78177795
cudnn=True,
78187796
input_size=(2, 4, 7),
7819-
test_cuda=(not TEST_WITH_ROCM),
78207797
),
78217798
dict(
78227799
module_name='MaxPool1d',
@@ -7834,82 +7811,71 @@ def multimarginloss_weights_no_reduce_test():
78347811
constructor_args=(3, 4, (3, 2)),
78357812
input_size=(2, 3, 7, 5),
78367813
cudnn=True,
7837-
test_cuda=(not TEST_WITH_ROCM),
78387814
),
78397815
dict(
78407816
module_name='Conv2d',
78417817
constructor_args=(3, 4, (3, 3), (2, 2)),
78427818
input_size=(2, 3, 6, 6),
78437819
cudnn=True,
78447820
desc='strided',
7845-
test_cuda=(not TEST_WITH_ROCM),
78467821
),
78477822
dict(
78487823
module_name='Conv2d',
78497824
constructor_args=(3, 4, (3, 3), (2, 2), (1, 1)),
78507825
input_size=(2, 3, 6, 6),
78517826
cudnn=True,
78527827
desc='padding',
7853-
test_cuda=(not TEST_WITH_ROCM),
78547828
),
78557829
dict(
78567830
module_name='Conv2d',
78577831
constructor_args=(3, 2, (3, 3), (2, 2), (1, 1), (2, 2)),
78587832
input_size=(2, 3, 8, 8),
78597833
cudnn=True,
78607834
desc='dilated',
7861-
decorator=skipIfRocm,
78627835
),
78637836
dict(
78647837
module_name='Conv2d',
78657838
constructor_args=(3, 4, (3, 2), 1, 0, 1, 1, False),
78667839
input_size=(2, 3, 6, 5),
78677840
cudnn=True,
78687841
desc='no_bias',
7869-
decorator=skipIfRocm,
78707842
),
78717843
dict(
78727844
fullname='Conv2d_groups',
78737845
constructor=lambda: nn.Conv2d(4, 6, (3, 2), groups=2),
78747846
input_size=(2, 4, 6, 5),
78757847
cudnn=True,
7876-
decorator=skipIfRocm,
78777848
),
78787849
dict(
78797850
fullname='Conv2d_groups_thnn',
78807851
constructor=lambda: nn.Conv2d(4, 6, (3, 2), groups=2),
78817852
input_size=(2, 4, 6, 5),
7882-
decorator=skipIfRocm,
78837853
),
78847854
dict(
78857855
module_name='ConvTranspose2d',
78867856
constructor_args=(3, 4, 3, (3, 2), 1, (1, 1)),
78877857
cudnn=True,
78887858
input_size=(1, 3, 7, 6),
7889-
test_cuda=(not TEST_WITH_ROCM),
78907859
),
78917860
dict(
78927861
module_name='ConvTranspose2d',
78937862
constructor_args=(3, 4, 3, (2, 3), 1, (1, 1), 1, False, (2, 2)),
78947863
input_size=(1, 3, 6, 7),
78957864
cudnn=True,
78967865
desc='dilated',
7897-
test_cuda=(not TEST_WITH_ROCM),
78987866
),
78997867
dict(
79007868
module_name='ConvTranspose2d',
79017869
constructor_args=(3, 4, 3, (2, 3), 1, (1, 1), 1, False),
79027870
input_size=(1, 3, 6, 7),
79037871
cudnn=True,
79047872
desc='no_bias',
7905-
test_cuda=(not TEST_WITH_ROCM),
79067873
),
79077874
dict(
79087875
fullname='ConvTranspose2d_groups',
79097876
constructor=lambda: nn.ConvTranspose2d(2, 4, (2, 3), groups=2),
79107877
input_size=(1, 2, 4, 5),
79117878
cudnn=True,
7912-
test_cuda=(not TEST_WITH_ROCM),
79137879
),
79147880
dict(
79157881
fullname='Conv2d_depthwise',
@@ -8066,65 +8032,56 @@ def multimarginloss_weights_no_reduce_test():
80668032
constructor_args=(3, 4, (2, 3, 4)),
80678033
input_size=(2, 3, 3, 4, 5),
80688034
cudnn=True,
8069-
test_cuda=(not TEST_WITH_ROCM),
80708035
),
80718036
dict(
80728037
module_name='Conv3d',
80738038
constructor_args=(3, 4, (2, 3, 4), 1, 0, 1, 1, False),
80748039
input_size=(2, 3, 3, 4, 5),
80758040
cudnn=True,
80768041
desc='no_bias',
8077-
test_cuda=(not TEST_WITH_ROCM),
80788042
),
80798043
dict(
80808044
module_name='Conv3d',
80818045
constructor_args=(3, 4, 2, 2),
80828046
input_size=(2, 3, 5, 5, 5),
80838047
cudnn=True,
80848048
desc='stride',
8085-
test_cuda=(not TEST_WITH_ROCM),
80868049
),
80878050
dict(
80888051
module_name='Conv3d',
80898052
constructor_args=(3, 4, 2, 2, 1),
80908053
input_size=(2, 3, 5, 5, 5),
80918054
cudnn=True,
80928055
desc='stride_padding',
8093-
test_cuda=(not TEST_WITH_ROCM),
80948056
),
80958057
dict(
80968058
fullname='Conv3d_groups',
80978059
constructor=lambda: nn.Conv3d(4, 6, kernel_size=3, groups=2),
80988060
input_size=(2, 4, 4, 5, 4),
80998061
cudnn=True,
8100-
test_cuda=(not TEST_WITH_ROCM),
81018062
),
81028063
dict(
81038064
fullname='Conv3d_dilated',
81048065
constructor=lambda: nn.Conv3d(3, 4, kernel_size=2, dilation=2),
81058066
input_size=(2, 3, 5, 5, 5),
8106-
test_cuda=(not TEST_WITH_ROCM),
81078067
),
81088068
dict(
81098069
fullname='Conv3d_dilated_strided',
81108070
constructor=lambda: nn.Conv3d(3, 4, kernel_size=2, dilation=2, stride=2),
81118071
input_size=(2, 3, 5, 5, 5),
8112-
test_cuda=(not TEST_WITH_ROCM),
81138072
),
81148073
dict(
81158074
module_name='ConvTranspose3d',
81168075
constructor_args=(2, 3, (2, 3, 2)),
81178076
cudnn=True,
81188077
input_size=(1, 2, 4, 5, 4),
8119-
test_cuda=(not TEST_WITH_ROCM),
81208078
),
81218079
dict(
81228080
module_name='ConvTranspose3d',
81238081
constructor_args=(2, 3, (2, 3, 2), 1, 0, 0, 1, True, (2, 2, 2)),
81248082
cudnn=True,
81258083
input_size=(1, 2, 4, 5, 4),
81268084
desc='dilated',
8127-
test_cuda=(not TEST_WITH_ROCM),
81288085
),
81298086
dict(
81308087
module_name='MaxPool3d',

0 commit comments

Comments
 (0)