MLBEDSW-6313 Static optimisation for Shape OP
*Shape OP value is available at compile time hence
it can be optimised
*Disconnected shape OP at compile time from parent
tensor
*Transformed shape OP tensor into constant
Change-Id: I0a024269e2b592c6146dd72e62d7a41951fb727a
Signed-off-by: Ayaan Masood <Ayaan.Masood@arm.com>
diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py
index 90cff03..1de437b 100644
--- a/ethosu/vela/vela.py
+++ b/ethosu/vela/vela.py
@@ -250,13 +250,22 @@
"",
f"### {network_type.name} Generic Constraints",
"",
- "This is a list of constraints that all NPU operators must satisfy in order to be scheduled on the NPU.",
- "",
+ "This is a list of constraints most NPU operators must satisfy in order to be scheduled on the NPU.",
+ "(Operators excluded from certain constraints are shown in brackets [ ] )\n" "",
]
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")
- lines.append(f"- {reason}")
+
+ 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}")
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")