diff options
author | Ayaan Masood <Ayaan.Masood@arm.com> | 2022-06-29 11:30:57 +0100 |
---|---|---|
committer | Ayaan Masood <Ayaan.Masood@arm.com> | 2022-06-29 11:30:57 +0100 |
commit | 4965faee41300393cd8d74da4b399fa4c4ee9030 (patch) | |
tree | 1054d6f89be70ec471007132dec97d325ecc0067 /ethosu/vela/vela.py | |
parent | 68b8f2f9457d56df3211be5318e3682332bcefbf (diff) | |
download | ethos-u-vela-4965faee41300393cd8d74da4b399fa4c4ee9030.tar.gz |
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>
Diffstat (limited to 'ethosu/vela/vela.py')
-rw-r--r-- | ethosu/vela/vela.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py index 90cff034..1de437bb 100644 --- a/ethosu/vela/vela.py +++ b/ethosu/vela/vela.py @@ -250,13 +250,22 @@ def generate_supported_ops(): "", 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") |