aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_supported_operators.py
diff options
context:
space:
mode:
authorJohan Alfvén <johan.alfven@arm.com>2022-09-15 15:50:30 +0200
committerFredrik Svedberg <fredrik.svedberg@arm.com>2022-09-27 12:19:24 +0000
commit5060ff53f5ac2382e04a68d7772bd71a36f63845 (patch)
treee46e109573ca9066288119b76e3aec86a30e9727 /ethosu/vela/tflite_supported_operators.py
parente84ed6b6663bb9158cd87d11cb21b48abed1033d (diff)
downloadethos-u-vela-5060ff53f5ac2382e04a68d7772bd71a36f63845.tar.gz
MLBEDSW-6961: Bypass functionality for memory ops
- In order to solve output diffs, the Reshape op was pushed to the CPU. The problem was that the Mean op ifm shape was replaced by the Reshape op ifm shape. - This limitation is now removed. Changed implementation how memory only ops are bypassed. Always replace the memory only op ifm tensor with its ofm tensor. By doing this the ifm tensor for the operator that is after the memory only op is never changed. Signed-off-by: Johan Alfven <johan.alfven@arm.com> Change-Id: Ibcdebf33fd9b7a37f90984a129500b5dac52e5ea
Diffstat (limited to 'ethosu/vela/tflite_supported_operators.py')
-rw-r--r--ethosu/vela/tflite_supported_operators.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py
index d42caf58..3d04def3 100644
--- a/ethosu/vela/tflite_supported_operators.py
+++ b/ethosu/vela/tflite_supported_operators.py
@@ -317,7 +317,6 @@ class TFLiteSupportedOperators:
# Reshape specific checks:
self.specific_constraints[Op.Reshape].append(TFLiteSupportedOperators.constraint_reshape_shape_constant)
- self.specific_constraints[Op.Reshape].append(TFLiteSupportedOperators.constraint_reshape_before_mean)
def is_operator_supported(self, op):
ext_type = optype_to_builtintype(op.type)
@@ -887,11 +886,3 @@ class TFLiteSupportedOperators:
extra = ", ".join(extra)
return valid, f"Op has non-const input(s): {extra}"
-
- @staticmethod
- def constraint_reshape_before_mean(op):
- "Reshape on NPU not supported before MEAN operator"
- for next_op in op.outputs[0].consumers():
- if next_op is not None and next_op.type == Op.Mean:
- return False, ""
- return True, ""