Skip to content

use dim order in arm test #7697

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions backends/arm/test/models/test_mobilenet_v2_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ class TestMobileNetV2(unittest.TestCase):
"executorch_exir_dialects_edge__ops_aten__native_batch_norm_legit_no_training_default",
}

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

def test_mv2_tosa_MI(self):
(
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def __init__(self):
def forward(self, x, y):
return x + y

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

def _test_add_tosa_MI_pipeline(
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@
class TestLinear(unittest.TestCase):
"""tests the linear operation y = Ax + b"""

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

class Linear(torch.nn.Module):
def __init__(
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_maximum.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def __init__(self):
def forward(self, x, y):
return torch.maximum(x, y)

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

def _test_maximum_tosa_MI_pipeline(
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_minimum.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def __init__(self):
def forward(self, x, y):
return torch.minimum(x, y)

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

def _test_minimum_tosa_MI_pipeline(
self, module: torch.nn.Module, test_data: Tuple[torch.Tensor]
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ class Sum(torch.nn.Module):
def forward(self, x: torch.Tensor, dim: int, keepdim: bool):
return x.sum(dim=dim, keepdim=keepdim)

_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
)
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig()

def _test_sum_tosa_MI_pipeline(
self, module: torch.nn.Module, test_data: tuple[exampledata_t]
Expand Down
3 changes: 0 additions & 3 deletions backends/arm/test/tester/arm_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ def to_edge(
if config is not None:
to_edge_stage.edge_compile_conf = config

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

def partition(self, partition_stage: Optional[Partition] = None):
Expand All @@ -232,7 +230,6 @@ def to_edge_transform_and_lower(
to_edge_and_lower_stage.partitioners = partitioners
if edge_compile_config is not None:
to_edge_and_lower_stage.edge_compile_conf = edge_compile_config
to_edge_and_lower_stage.edge_compile_conf._skip_dim_order = True
return super().to_edge_transform_and_lower(to_edge_and_lower_stage)

def to_executorch(self, to_executorch_stage: Optional[ToExecutorch] | None = None):
Expand Down
Loading