aboutsummaryrefslogtreecommitdiff
path: root/tests/test_backend_armnn_tflite_delegate_compat.py
diff options
context:
space:
mode:
authorBenjamin Klimczak <benjamin.klimczak@arm.com>2023-08-14 14:17:45 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-08-21 13:10:05 +0100
commit87647b7bf1ee89b20aa87768ec8c82f329082db0 (patch)
tree4cdea8590e8f82bb1ba1322033e00c37b5ee178c /tests/test_backend_armnn_tflite_delegate_compat.py
parenta202a1a26c74fef898fb302c621ccfc258fa688c (diff)
downloadmlia-87647b7bf1ee89b20aa87768ec8c82f329082db0.tar.gz
MLIA-881 Update compatible operators for Cortex-A
Update the compatibility information of the backend for ArmNN TensorFlow Lite Delegate (classic) to version 23.05. Change-Id: I84693842d1a883f7083a6faf7d5ddcd5ecc34e5d Signed-off-by: Benjamin Klimczak <benjamin.klimczak@arm.com>
Diffstat (limited to 'tests/test_backend_armnn_tflite_delegate_compat.py')
-rw-r--r--tests/test_backend_armnn_tflite_delegate_compat.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_backend_armnn_tflite_delegate_compat.py b/tests/test_backend_armnn_tflite_delegate_compat.py
new file mode 100644
index 0000000..658e707
--- /dev/null
+++ b/tests/test_backend_armnn_tflite_delegate_compat.py
@@ -0,0 +1,21 @@
+# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates.
+# SPDX-License-Identifier: Apache-2.0
+"""Tests for ArmNN TensorFlow Lite Delegate backend."""
+from typing import cast
+
+from mlia.backend.armnn_tflite_delegate import compat
+from mlia.nn.tensorflow.tflite_graph import TFL_OP
+
+
+def test_compat_data() -> None:
+ """Make sure all data contains the necessary items."""
+ builtin_tfl_ops = {op.name for op in TFL_OP}
+ assert "backend" in compat.ARMNN_TFLITE_DELEGATE
+ assert "ops" in compat.ARMNN_TFLITE_DELEGATE
+
+ ops = cast(dict, compat.ARMNN_TFLITE_DELEGATE["ops"])
+ for data in ops.values():
+ assert "builtin_ops" in data
+ for comp in data["builtin_ops"]:
+ assert comp in builtin_tfl_ops
+ assert "custom_ops" in data