aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/vela.py
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2022-09-16 16:24:55 +0200
committerFredrik Svedberg <fredrik.svedberg@arm.com>2022-09-26 14:52:00 +0000
commit88d5b128fc86cecfa96aae09a7e7e9095f76b2a4 (patch)
tree76de6d0918e465f93dfec1b2d3aa56a459f68bdf /ethosu/vela/vela.py
parent1cd39493163ea4cf74266b2957a5e54d1ed059bf (diff)
downloadethos-u-vela-88d5b128fc86cecfa96aae09a7e7e9095f76b2a4.tar.gz
MLBEDSW-4075 PACK axis 0 + tanh fails with output diff
The test failed since the tanh had batch size > 1. Added checks for batch size for all supported operators. Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com> Change-Id: I3570352740c40eb96bd9db965dfa3c91c81ff2ad
Diffstat (limited to 'ethosu/vela/vela.py')
-rw-r--r--ethosu/vela/vela.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py
index a42b2188..7740711e 100644
--- a/ethosu/vela/vela.py
+++ b/ethosu/vela/vela.py
@@ -45,6 +45,7 @@ from .tensor import Tensor
from .tflite.Model import Model
from .tflite_mapping import builtin_operator_map
from .tflite_mapping import builtin_operator_name_map
+from .tflite_mapping import optype_to_builtintype
from .tflite_model_semantic import TFLiteSemantic
from .tflite_supported_operators import TFLiteSupportedOperators
from .tosa_model_semantic import TosaSemantic
@@ -178,6 +179,12 @@ def generate_supported_ops():
# To easily exclude NetworkType from generated documentation.
exclude_generation_network_type_value = [NetworkType.TOSA.value]
+ def _exclude_list_names(constraint, exclude_list):
+ constraints_excluded_names = [
+ optype_to_builtintype(op) for op, exclude_constraint in exclude_list if constraint in exclude_constraint
+ ]
+ return f" - [{', '.join(sorted(constraints_excluded_names))}]" if constraints_excluded_names else ""
+
lines = [
"# Supported Ops",
"",
@@ -256,20 +263,13 @@ def generate_supported_ops():
for constraint in semantic_checker.generic_constraints:
# Markdown needs two spaces at the end of a line to render it as a separate line
reason = constraint.__doc__.replace("\n", " \n")
-
exclude_list = TFLiteSemantic.get_generic_constraint_exclude_list().items()
- constraints_excluded_names = [
- op.name for op, exclude_constraint in exclude_list if constraint in exclude_constraint
- ]
- excluded_constraint_text = ""
- if constraints_excluded_names:
- excluded_constraint_text = f"- [{', '.join(constraints_excluded_names)}]"
-
- lines.append(f"- {reason} {excluded_constraint_text}")
+ lines.append(f"- {reason}{_exclude_list_names(constraint, exclude_list)}")
for constraint in supported.generic_constraints:
# Markdown needs two spaces at the end of a line to render it as a separate line
reason = constraint.__doc__.replace("\n", " \n")
- lines.append(f"- {reason}")
+ exclude_list = supported.generic_constraints_exceptions.items()
+ lines.append(f"- {reason}{_exclude_list_names(constraint, exclude_list)}")
for op, name in op_constraint_links:
lines += [
"",