Skip to content

Commit e0dda90

Browse files
authored
[Backend Tester] Skip in-place activation tests due to lack of support in ET (#13989)
These tests are failing for all backends due to lack of defunctionalization support for in-place activations. This PR disables them to reduce noise. They can be re-enabled in the future when supported. Tracking in #11700.
1 parent 4a4f5a0 commit e0dda90

File tree

8 files changed

+24
-0
lines changed

8 files changed

+24
-0
lines changed

backends/test/suite/operators/test_elu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -42,5 +44,6 @@ def test_elu_f32_multi_dim(self, flow: TestFlow) -> None:
4244
def test_elu_f32_alpha(self, flow: TestFlow) -> None:
4345
self._test_op(Model(alpha=0.5), (torch.randn(3, 4, 5),), flow)
4446

47+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4548
def test_elu_f32_inplace(self, flow: TestFlow) -> None:
4649
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)

backends/test/suite/operators/test_hardsigmoid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -38,6 +40,7 @@ def test_hardsigmoid_f32_single_dim(self, flow: TestFlow) -> None:
3840
def test_hardsigmoid_f32_multi_dim(self, flow: TestFlow) -> None:
3941
self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow)
4042

43+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4144
def test_hardsigmoid_f32_inplace(self, flow: TestFlow) -> None:
4245
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
4346

backends/test/suite/operators/test_hardswish.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -38,6 +40,7 @@ def test_hardswish_f32_single_dim(self, flow: TestFlow) -> None:
3840
def test_hardswish_f32_multi_dim(self, flow: TestFlow) -> None:
3941
self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow)
4042

43+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4144
def test_hardswish_f32_inplace(self, flow: TestFlow) -> None:
4245
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
4346

backends/test/suite/operators/test_hardtanh.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -45,6 +47,7 @@ def test_hardtanh_f32_multi_dim(self, flow: TestFlow) -> None:
4547
def test_hardtanh_f32_custom_range(self, flow: TestFlow) -> None:
4648
self._test_op(Model(min_val=-2.0, max_val=2.0), (torch.randn(3, 4, 5),), flow)
4749

50+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4851
def test_hardtanh_f32_inplace(self, flow: TestFlow) -> None:
4952
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
5053

backends/test/suite/operators/test_leaky_relu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -44,6 +46,7 @@ def test_leaky_relu_f32_multi_dim(self, flow: TestFlow) -> None:
4446
def test_leaky_relu_f32_custom_slope(self, flow: TestFlow) -> None:
4547
self._test_op(Model(negative_slope=0.1), (torch.randn(3, 4, 5),), flow)
4648

49+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4750
def test_leaky_relu_f32_inplace(self, flow: TestFlow) -> None:
4851
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
4952

backends/test/suite/operators/test_relu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -38,5 +40,6 @@ def test_relu_f32_single_dim(self, flow: TestFlow) -> None:
3840
def test_relu_f32_multi_dim(self, flow: TestFlow) -> None:
3941
self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow)
4042

43+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4144
def test_relu_f32_inplace(self, flow: TestFlow) -> None:
4245
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)

backends/test/suite/operators/test_silu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -38,6 +40,7 @@ def test_silu_f32_single_dim(self, flow: TestFlow) -> None:
3840
def test_silu_f32_multi_dim(self, flow: TestFlow) -> None:
3941
self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow)
4042

43+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
4144
def test_silu_f32_inplace(self, flow: TestFlow) -> None:
4245
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
4346

backends/test/suite/operators/test_threshold.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# pyre-unsafe
88

99

10+
import unittest
11+
1012
import torch
1113
from executorch.backends.test.suite.flow import TestFlow
1214

@@ -51,6 +53,7 @@ def test_threshold_f32_custom_value(self, flow: TestFlow) -> None:
5153
def test_threshold_f32_custom_threshold_value(self, flow: TestFlow) -> None:
5254
self._test_op(Model(threshold=0.5, value=1.0), (torch.randn(3, 4, 5),), flow)
5355

56+
@unittest.skip("In place activations aren't properly defunctionalized yet.")
5457
def test_threshold_f32_inplace(self, flow: TestFlow) -> None:
5558
self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow)
5659

0 commit comments

Comments
 (0)