diff options
author | Johan Alfvén <johan.alfven@arm.com> | 2022-09-28 20:06:25 +0200 |
---|---|---|
committer | Johan Alfvén <johan.alfven@arm.com> | 2022-10-28 09:46:11 +0200 |
commit | 48e5159e8b34abe91f331d76e746c25b4017a96e (patch) | |
tree | a78c984d43574f614c7573e15650ec2b45e91cff /ethosu/vela/tflite_supported_operators.py | |
parent | 8484d6e529bc7828d3e5034cd9dfcfb1ddb0559a (diff) | |
download | ethos-u-vela-48e5159e8b34abe91f331d76e746c25b4017a96e.tar.gz |
MLBEDSW-6975: Updated bypass functionality
- The previous patch the always replaced ifm with ofm
introduced unnecessary avg pool ops for some cases.
That patch has been reverted and this is a new solution.
- Replace ifm with ofm for the following condition:
a) Ops that are dependent that the original ifm tensor
shape is not changed by the bypass memory op function.
b) When the memory op has different IFM and OFM rank.
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Change-Id: I16a023e169ae64c5db46f6f88516a5e1ca7ed7ef
Diffstat (limited to 'ethosu/vela/tflite_supported_operators.py')
-rw-r--r-- | ethosu/vela/tflite_supported_operators.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py index c394778b..b8fe4b6a 100644 --- a/ethosu/vela/tflite_supported_operators.py +++ b/ethosu/vela/tflite_supported_operators.py @@ -319,7 +319,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) @@ -880,11 +879,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, "" |