From c4cbbc956e8405123e3c6a3df71e67ef492764d7 Mon Sep 17 00:00:00 2001 From: Louis Verhaard Date: Mon, 18 May 2020 13:40:02 +0200 Subject: 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 --- ethosu/vela/mark_tensors.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.1