Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tests in test_pytorch_onnx_onnxruntime #37868

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 1 addition & 14 deletions test/onnx/test_pytorch_onnx_onnxruntime.py
Expand Up @@ -771,7 +771,6 @@ def forward(self, x):
x = torch.randn(3, 4, 5, 6, 7)
self.run_test(NegSlice(), x)

@unittest.skip('https://github.com/pytorch/pytorch/issues/10984')
def test_slice_neg_large_negone(self):
class NegSlice(torch.nn.Module):
def forward(self, x):
Expand Down Expand Up @@ -822,7 +821,6 @@ def forward(self, x):
'output_1': [0, 1, 2]})

@skipIfUnsupportedMinOpsetVersion(9)
@unittest.skip("relies on not constant folding size calls, but other tests rely on constant folding")
def test_arange_dynamic(self):
class ArangeModel(torch.nn.Module):
def forward(self, input):
Expand Down Expand Up @@ -1312,7 +1310,6 @@ def test_interpolate_downsample(self):
self._interpolate_tests(False)

@skipIfUnsupportedMinOpsetVersion(11)
@unittest.skip("Interpolate script NYI")
def test_interpolate_no_shape(self):
class MyModel(torch.jit.ScriptModule):
@torch.jit.script_method
Expand Down Expand Up @@ -1524,7 +1521,7 @@ def forward(self, x, k):
k = torch.tensor(3)
self.run_test(MyModuleDynamic(), [x, k])

@skipIfUnsupportedOpsetVersion([7, 12])
@skipIfUnsupportedOpsetVersion([7])
def test_normalize(self):
class Model(torch.nn.Module):
def forward(self, x):
Expand Down Expand Up @@ -2424,7 +2421,6 @@ def forward(self, x):
x = torch.randn(3, 4, 5, requires_grad=True)
self.run_test(MaskedSelectModel(), x)

@unittest.skip("Enable this once depthToSpace attr 'mode' is supported in ORT")
@skipIfUnsupportedMinOpsetVersion(9)
def test_pixel_shuffle(self):
class PixelShuffle(torch.nn.Module):
Expand Down Expand Up @@ -2815,7 +2811,6 @@ def forward(self, input):
self.run_test(DimModel(), empty_input)
self.run_test(DimModel(), multi_dim_input)

@unittest.skip("Enable this once einsum supported in ORT")
@skipIfUnsupportedMinOpsetVersion(12)
def test_einsum(self):
class EinsumModelBatchDiagonal(torch.nn.Module):
Expand Down Expand Up @@ -2852,7 +2847,6 @@ def forward(self, *tensor_list):
x = torch.randn(3, 4)
self.run_test(EinsumModelTranspose(), input=(x,))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_crossentropyloss(self):
x = torch.randn(3, 5)
Expand Down Expand Up @@ -3004,7 +2998,6 @@ def forward(self, input):
x = torch.randn(1, 2, 3, requires_grad=True)
self.run_test(EmptyBranchModel(), x)

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3022,7 +3015,6 @@ def forward(self, input, target):
target = torch.empty(N, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_none(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3041,7 +3033,6 @@ def forward(self, input, target):
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_mean(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3060,7 +3051,6 @@ def forward(self, input, target):
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_sum(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3079,7 +3069,6 @@ def forward(self, input, target):
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_mean_weights(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3098,7 +3087,6 @@ def forward(self, input, target):
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_mean_ignore_index(self):
class NLLModel(torch.nn.Module):
Expand All @@ -3117,7 +3105,6 @@ def forward(self, input, target):
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
self.run_test(NLLModel(), (input, target))

@unittest.skip("Enable this once ORT version is updated")
@skipIfUnsupportedMinOpsetVersion(12)
def test_nllloss_2d_mean_ignore_index_weights(self):
class NLLModel(torch.nn.Module):
Expand Down