From 138d47f5a3e87d294b3714ae799ccad8ac9111bd Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Mon, 8 Feb 2021 10:13:48 +0100 Subject: MLBEDSW-3774 Removed ConcatSliceWrite -Removed ConcatSliceWrite from the optimised graph. Always executed as avgpool, which is equivalent with before the patch. -Added copy op to enable more removal of reshapes. Sg input/outputs need to remain. When Reshape input and outut, are sg input/outputs a copy op is needed to be inserted, in order to remove the reshape. Signed-off-by: Patrik Gustavsson Change-Id: Id7be9966673ae34499e8518a5544104493fe326b --- ethosu/vela/high_level_command_stream_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/high_level_command_stream_generator.py') diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py index 66613ba8..97b42aeb 100644 --- a/ethosu/vela/high_level_command_stream_generator.py +++ b/ethosu/vela/high_level_command_stream_generator.py @@ -109,7 +109,7 @@ def generate_high_level_command_stream_for_pass(strat, passes, block_configs, id concat_offset = 0 for op in ps.ops: - if op.type == Op.ConcatSliceWrite: + if op.attrs.get("concat_axis", None) is not None: concat_axis = op.attrs["concat_axis"] concat_start = op.attrs["concat_start"] concat_end = op.attrs["concat_end"] @@ -117,7 +117,7 @@ def generate_high_level_command_stream_for_pass(strat, passes, block_configs, id ofm_start[concat_axis] = concat_start ofm_end[concat_axis] = concat_end concat_offset = concat_start - ps.primary_op.memory_function = op.type + ps.primary_op.memory_function = Op.ConcatSliceWrite elif op.type.is_relu_op() or op.type in (Op.Tanh, Op.Sigmoid): ps.primary_op.activation = create_activation_function(op.type) -- cgit v1.2.1