Skip to content

Commit 77cc1c4

Browse files
Gasoonjiafacebook-github-bot
authored andcommitted
use dim order in arm test
Summary: as title Differential Revision: D68177095
1 parent 0dba025 commit 77cc1c4

File tree

7 files changed

+6
-21
lines changed

7 files changed

+6
-21
lines changed

backends/arm/test/models/test_mobilenet_v2_arm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class TestMobileNetV2(unittest.TestCase):
4747
"executorch_exir_dialects_edge__ops_aten__native_batch_norm_legit_no_training_default",
4848
}
4949

50-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
51-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
52-
)
50+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
5351

5452
def test_mv2_tosa_MI(self):
5553
(

backends/arm/test/ops/test_add.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ def __init__(self):
5151
def forward(self, x, y):
5252
return x + y
5353

54-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
55-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
56-
)
54+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
5755

5856
def _test_add_tosa_MI_pipeline(
5957
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]

backends/arm/test/ops/test_linear.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@
108108
class TestLinear(unittest.TestCase):
109109
"""tests the linear operation y = Ax + b"""
110110

111-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
112-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
113-
)
111+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
114112

115113
class Linear(torch.nn.Module):
116114
def __init__(

backends/arm/test/ops/test_maximum.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def __init__(self):
3838
def forward(self, x, y):
3939
return torch.maximum(x, y)
4040

41-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
42-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
43-
)
41+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
4442

4543
def _test_maximum_tosa_MI_pipeline(
4644
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]

backends/arm/test/ops/test_minimum.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def __init__(self):
3838
def forward(self, x, y):
3939
return torch.minimum(x, y)
4040

41-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
42-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
43-
)
41+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
4442

4543
def _test_minimum_tosa_MI_pipeline(
4644
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]

backends/arm/test/ops/test_sum.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class Sum(torch.nn.Module):
4747
def forward(self, x: torch.Tensor, dim: int, keepdim: bool):
4848
return x.sum(dim=dim, keepdim=keepdim)
4949

50-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
51-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
52-
)
50+
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()
5351

5452
def _test_sum_tosa_MI_pipeline(
5553
self, module: torch.nn.Module, test_data: tuple[exampledata_t]

backends/arm/test/tester/arm_tester.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ def to_edge(
205205
if config is not None:
206206
to_edge_stage.edge_compile_conf = config
207207

208-
# TODO(T182928844): Delegate dim order op to backend.
209-
to_edge_stage.edge_compile_conf._skip_dim_order = True
210208
return super().to_edge(to_edge_stage)
211209

212210
def partition(self, partition_stage: Optional[Partition] = None):
@@ -232,7 +230,6 @@ def to_edge_transform_and_lower(
232230
to_edge_and_lower_stage.partitioners = partitioners
233231
if edge_compile_config is not None:
234232
to_edge_and_lower_stage.edge_compile_conf = edge_compile_config
235-
to_edge_and_lower_stage.edge_compile_conf._skip_dim_order = True
236233
return super().to_edge_transform_and_lower(to_edge_and_lower_stage)
237234

238235
def to_executorch(self, to_executorch_stage: Optional[ToExecutorch] | None = None):

0 commit comments

Comments
 (0)