MLBEDSW-2002: Fix Reshape's output MemArea
A Reshape operator's input and output tensor point to same data, thus
have the same mem area.
Change-Id: Ice830f83da78103d54b5f72f5bfc1e6ffa8636c3
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 3650876..e7b3e50 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -276,6 +276,9 @@
for idx, tens in enumerate(op.inputs):
purpose = input_purpose(op, idx)
mark_tensor_helper(tens, purpose)
+ if op.type == "Reshape":
+ # Reshape's input and output point to same data
+ op.outputs[0].mem_area = op.inputs[0].mem_area
break
return op