aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-05-18 13:40:02 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commitc4cbbc956e8405123e3c6a3df71e67ef492764d7 (patch)
treea524915356cb5baa526fba6f123c742ebcef579f
parent4e12776b9dd446751fe039b94e58dcfe11f600e5 (diff)
downloadethos-u-vela-c4cbbc956e8405123e3c6a3df71e67ef492764d7.tar.gz
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>
-rw-r--r--ethosu/vela/mark_tensors.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 36508762..e7b3e50f 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -276,6 +276,9 @@ def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False):
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