aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-22 13:53:52 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-22 15:31:49 +0000
commitc509d33b81d0c2fadd938ec9445d0616db86e5fb (patch)
tree6275e1d73a542df5206c3e04b86d0188e7cd7679
parent69b8480987fb078139e8b7d803cdfb5d76197651 (diff)
downloadethos-u-vela-c509d33b81d0c2fadd938ec9445d0616db86e5fb.tar.gz
MLBEDSW-3654 Fix setting op ifm ofm for LeakyRelu
Added op.set_ifm_ofm_shapes to the convertion functions Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I727d4cf34395bc0997863df1ac89537f84f9c7c8
-rw-r--r--ethosu/vela/graph_optimiser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index e468f6d..6d2696c 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -893,6 +893,7 @@ def convert_mul_max_to_abs_or_lrelu(op, arch, nng):
op.name = op.name.replace("Maximum", new_op.name)
op.outputs[0].name = op.outputs[0].name.replace("Maximum", new_op.name)
op.inputs = [shared_in]
+ op.set_ifm_ofm_shapes()
# Record optimisation in debug database
DebugDatabase.add_optimised(op, op)
@@ -953,6 +954,7 @@ def convert_lrelu_to_mul_max(op, arch):
ifm.consumer_list.remove(op)
op.add_input_tensor(fm_alpha)
op.add_input_tensor(fm_id)
+ op.set_ifm_ofm_shapes()
DebugDatabase.add_optimised(op, op)
return op
@@ -982,6 +984,7 @@ def convert_to_lut(op, lut_values, lut_name):
op.forced_output_quantization = ifm.quantization
lut_tensor = lut.create_lut_tensor(op.name + "_values", lut_values, DataType.int8)
op.set_activation_lut(lut_tensor)
+ op.set_ifm_ofm_shapes()
return op