MLBEDSW-3463: StridedSlice fixup function causes infinite recursion
This commit reverts a control flow path where
already modified StridedSlice operators are
left untouched.
If not, Vela would recurse infinitely and crash.
Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: Iaf3ae916325bedd3dd1edd3395fb4a9ecf832590
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index 7304630..899da07 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -456,6 +456,9 @@
assert len(tens.shape) == (len(op.inputs[0].shape) + n)
op.attrs["new_axis_mask"] = 0
+ else:
+ # Equal Rank StridedSlice, no need to insert reshape
+ return tens
# Construct 1 shape tensor to be used by all inserted reshape ops
new_shape_tens = create_const_tensor(op.name + "_reshape_shape", [1], DataType.int32, tens.shape)