aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/target/cortex_a/reporters.py
diff options
context:
space:
mode:
authorAnnie Tallund <annie.tallund@arm.com>2023-02-06 14:56:31 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-02-13 16:20:41 +0000
commit49dfd03617ed28a4fcbd847dd958c27442c84556 (patch)
tree1fe14ba3980dd6be15f866e97b67582831344eb9 /src/mlia/target/cortex_a/reporters.py
parente3bef50932abdc2e32fa5636fb7a496b149e72d9 (diff)
downloadmlia-49dfd03617ed28a4fcbd847dd958c27442c84556.tar.gz
MLIA-709 Update compatibility data for Cortex-A0.6.0-rc.1
- 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
Diffstat (limited to 'src/mlia/target/cortex_a/reporters.py')
-rw-r--r--src/mlia/target/cortex_a/reporters.py14
1 files changed, 7 insertions, 7 deletions
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}.")