diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-10-11 16:15:47 +0200 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-10-12 11:22:17 +0000 |
commit | 3e3faa90def7c2c4aaaf71543726c881f05f53b5 (patch) | |
tree | 1dc8abcafc609a0f8e6dc81b006d68e86fca5103 | |
parent | b75e2e7e6df89a773ff7f94ccef3e692a12c7306 (diff) | |
download | ethos-u-vela-3e3faa90def7c2c4aaaf71543726c881f05f53b5.tar.gz |
MLBEDSW-6987 Regressions after removing RescaleAdd/RescaleMul
The problem was that the updated conditions for elementwise
cascading was to permissive after the RescaleAdd removal.
Conditions for elementwise updated and transpose convolution
removed from cascading since it does have issues.
Change-Id: I0151256c4e3905fad39152941eec44bc76035d30
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
-rw-r--r-- | ethosu/vela/cascade_builder.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/cascade_builder.py b/ethosu/vela/cascade_builder.py index 1f5dc504..b4a4f876 100644 --- a/ethosu/vela/cascade_builder.py +++ b/ethosu/vela/cascade_builder.py @@ -101,6 +101,7 @@ class CascadeBuilder: and sched_op.parent_op.read_offsets[1] is None and self.element_wise_cascading_conformity(sched_op) and not sched_op.parent_op.type.is_resize_op() + and not sched_op.parent_op.type == Op.Conv2DBackpropInputSwitchedBias and sched_op.parent_op.attrs.get("padding", None) != Padding.TILE ) @@ -177,7 +178,8 @@ class CascadeBuilder: # Cascading elementwise operations with reverse operand order is not handled if sched_op.parent_op.type.is_binary_elementwise_op() and ifm and ifm2: # We cannot rule out cascadability if at least one IFM is constant - return Op.Const in (ifm.ops[0].type, ifm2.ops[0].type) and ifm_ifm2_correct_order(ifm.shape, ifm2.shape) + ifm2_const = ifm2.ops != [] and ifm2.ops[0].type == Op.Const + return ifm_ifm2_correct_order(ifm.shape, ifm2.shape) and ifm2_const else: # Either one IFM is not variable or it is not a binary elementwise op - we cannot rule out cascadability return True |