From 49dfd03617ed28a4fcbd847dd958c27442c84556 Mon Sep 17 00:00:00 2001 From: Annie Tallund Date: Mon, 6 Feb 2023 14:56:31 +0100 Subject: MLIA-709 Update compatibility data for Cortex-A - Add operator compatibility data for Cortex-A via for ArmNN TensorFlow Lite delegate 22.11 - Extend the Cortex-A target profile to include the version of the ArmNN TensorFlow Lite delegate to be used. - Some re-factoring work to support multiple versions and the new target profile parameter. Change-Id: Iae91bb0757ea3909be975af68b34d0ca2be47c43 --- src/mlia/target/cortex_a/reporters.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mlia/target/cortex_a/reporters.py') diff --git a/src/mlia/target/cortex_a/reporters.py b/src/mlia/target/cortex_a/reporters.py index d214b09..65d7906 100644 --- a/src/mlia/target/cortex_a/reporters.py +++ b/src/mlia/target/cortex_a/reporters.py @@ -18,7 +18,7 @@ from mlia.core.reporting import ReportItem from mlia.core.reporting import Table from mlia.nn.tensorflow.tflite_compat import TFLiteCompatibilityInfo from mlia.target.cortex_a.config import CortexAConfiguration -from mlia.target.cortex_a.operators import Operator +from mlia.target.cortex_a.operators import CortexACompatibilityInfo from mlia.utils.console import style_improvement from mlia.utils.types import is_list_of @@ -85,7 +85,7 @@ def report_tflite_compatiblity(compat_info: TFLiteCompatibilityInfo) -> Report: ) -def report_cortex_a_operators(ops: list[Operator]) -> Report: +def report_cortex_a_operators(op_compat: CortexACompatibilityInfo) -> Report: """Generate report for the operators.""" return Table( [ @@ -108,15 +108,15 @@ def report_cortex_a_operators(ops: list[Operator]) -> Report: op.location, op.full_name, Cell( - op.support_type, + op_compat.get_support_type(op), Format( wrap_width=30, - style=style_improvement(op.is_cortex_a_compatible), + style=style_improvement(op_compat.is_op_compatible(op)), str_fmt=lambda v: cast(str, v.value), ), ), ) - for index, op in enumerate(ops) + for index, op in enumerate(op_compat.operators) ], name="Operators", alias="operators", @@ -134,7 +134,7 @@ def cortex_a_formatters(data: Any) -> Callable[[Any], Report]: if isinstance(data, TFLiteCompatibilityInfo): return report_tflite_compatiblity - if is_list_of(data, Operator): + if isinstance(data, CortexACompatibilityInfo): return report_cortex_a_operators - raise Exception(f"Unable to find appropriate formatter for {data}") + raise Exception(f"Unable to find appropriate formatter for {data}.") -- cgit v1.2.1