Skip to content
Merged
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
11 changes: 0 additions & 11 deletions backends/arm/test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,3 @@ def get_u85_compile_spec_unbuilt(
.dump_intermediate_artifacts_to(artifact_path)
)
return compile_spec


def get_target_board(compile_spec: list[CompileSpec]) -> str | None:
for spec in compile_spec:
if spec.key == "compile_flags":
flags = spec.value.decode()
if "u55" in flags:
return "corstone-300"
elif "u85" in flags:
return "corstone-320"
return None
4 changes: 2 additions & 2 deletions backends/arm/test/models/test_mobilenet_v2_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_mv2_u55_BI(self):
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
atol=1.0, qtol=1, inputs=self.model_inputs, target_board="corstone-300"
atol=1.0, qtol=1, inputs=self.model_inputs
)

@pytest.mark.slow
Expand All @@ -118,5 +118,5 @@ def test_mv2_u85_BI(self):
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
atol=1.0, qtol=1, inputs=self.model_inputs, target_board="corstone-320"
atol=1.0, qtol=1, inputs=self.model_inputs
)
16 changes: 4 additions & 12 deletions backends/arm/test/ops/test_max_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ def test_maxpool2d_tosa_u55_BI(
(test_data,),
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=(test_data,), target_board="corstone-300"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=(test_data,))

@parameterized.expand(test_data_suite)
@pytest.mark.corstone_fvp
Expand All @@ -191,9 +189,7 @@ def test_maxpool2d_tosa_u85_BI(
(test_data,),
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=(test_data,), target_board="corstone-320"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=(test_data,))

@parameterized.expand(test_data_suite_mult_batches)
def test_maxpool2d_tosa_MI_mult_batches(
Expand Down Expand Up @@ -232,9 +228,7 @@ def test_maxpool2d_tosa_u55_BI_mult_batches(
(test_data,),
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=(test_data,), target_board="corstone-300"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=(test_data,))

@parameterized.expand(test_data_suite_mult_batches)
@pytest.mark.corstone_fvp
Expand All @@ -251,6 +245,4 @@ def test_maxpool2d_tosa_u85_BI_mult_batches(
(test_data,),
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=(test_data,), target_board="corstone-320"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=(test_data,))
8 changes: 2 additions & 6 deletions backends/arm/test/ops/test_maximum.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ def test_maximum_u55_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
self.Maximum(), common.get_u55_compile_spec(), test_data
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=test_data, target_board="corstone-300"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=test_data)

@parameterized.expand(Maximum.test_parameters)
def test_maximum_u85_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
Expand All @@ -132,6 +130,4 @@ def test_maximum_u85_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
self.Maximum(), common.get_u85_compile_spec(), test_data
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=test_data, target_board="corstone-320"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=test_data)
7 changes: 3 additions & 4 deletions backends/arm/test/ops/test_minimum.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ def test_minimum_u55_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
self.Minimum(), common.get_u55_compile_spec(), test_data
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=test_data, target_board="corstone-300"
)
tester.run_method_and_compare_outputs(qtol=1, inputs=test_data)

@parameterized.expand(Minimum.test_parameters)
def test_minimum_u85_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
Expand All @@ -133,5 +131,6 @@ def test_minimum_u85_BI(self, operand1: torch.Tensor, operand2: torch.Tensor):
)
if conftest.is_option_enabled("corstone_fvp"):
tester.run_method_and_compare_outputs(
qtol=1, inputs=test_data, target_board="corstone-320"
qtol=1,
inputs=test_data,
)
Loading
Loading