Skip to content

Commit 65f7ecc

Browse files
committed
FACTO: Add Arm U85 generated-test profile
Add an Arm U85 INT FACTO profile using the existing U85 compile spec and generated-case harness. Quantize before export and use the Corstone-320 portable-ops runner when available. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I9e7719bf4255c5a949f6753c7319ac9ac460c061
1 parent e6f0c0c commit 65f7ecc

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

‎backends/test/facto/test_facto.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ def _selected_arm_op_names() -> list[str]:
175175
return []
176176

177177
return _selected_op_names()
178+
179+
178180
def _facto_config() -> _FactoConfig:
179181
max_cases = os.environ.get(FACTO_MAX_CASES_ENV)
180182
selected_op_names = _selected_op_names()

‎backends/test/facto/test_facto_arm.py‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,21 @@ def _make_arm_u55_int_tester(
148148
)
149149

150150

151+
def _make_arm_u85_int_tester(
152+
model: torch.nn.Module, example_inputs: tuple[Any, ...]
153+
) -> BackendTester:
154+
return _ArmFactoTester(
155+
model,
156+
example_inputs,
157+
compile_spec=arm_common.get_u85_compile_spec(
158+
memory_mode="Dedicated_Sram_384KB"
159+
),
160+
quantize_before_export=True,
161+
qtol=1,
162+
use_portable_ops=True,
163+
)
164+
165+
151166
class _FactoTestsArmMixin:
152167
_tensor_constraints = ARM_TOSA_FP_TENSOR_CONSTRAINTS
153168

@@ -235,6 +250,19 @@ def __init__(self, *args, **kwargs):
235250
super().__init__(_make_arm_u55_int_tester, *args, **kwargs)
236251

237252

253+
@unittest.skipUnless(
254+
arm_common.corstone320_installed()
255+
and arm_common.arm_executor_runner_exists("corstone-320", use_portable_ops=True),
256+
"Did not find Corstone-320 FVP or executor_runner",
257+
)
258+
class FactoTestsArmU85_INT(_FactoTestsArmSerializedRunnerMixin, FactoTestsBase):
259+
__test__ = True
260+
_tensor_constraints = ARM_TOSA_INT_TENSOR_CONSTRAINTS
261+
262+
def __init__(self, *args, **kwargs):
263+
super().__init__(_make_arm_u85_int_tester, *args, **kwargs)
264+
265+
238266
class TestArmFactoTensorConstraintSelection(unittest.TestCase):
239267
def test_arm_shared_bases_are_not_unittest_cases(self) -> None:
240268
self.assertFalse(issubclass(_FactoTestsArmMixin, unittest.TestCase))
@@ -336,6 +364,7 @@ def test_vgf_serialized_runner_requires_converter_and_runtime(self) -> None:
336364
FactoTestsArmVGF_FP._generate_test(op_name)
337365
FactoTestsArmVGF_INT._generate_test(op_name)
338366
FactoTestsArmU55_INT._generate_test(op_name)
367+
FactoTestsArmU85_INT._generate_test(op_name)
339368

340369
if _generated_facto_tests_enabled():
341370
if not FACTO_AVAILABLE:

0 commit comments

Comments
 (0)