From 8d57aaa722a4f0430d7e7520d194d1df5394eb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Alfv=C3=A9n?= Date: Fri, 4 Feb 2022 11:19:17 +0100 Subject: MLBEDSW-6148: Allow overwrite of subgraph input This change will allow the subgraph's input tensor to be reused/overwritten by the output from an elementwise op if there is only one consumer attached to the input tensor. Signed-off-by: Johan Alfven Change-Id: I317188af11a5470614770e18dc8973462fd5f21c --- ethosu/vela/live_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethosu/vela/live_range.py') diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index 5aec0dfb..1aaaadd5 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -158,7 +158,7 @@ def tensor_should_be_ignored(tens, target_mem_area, target_mem_type_set): def merge_elementwise_op_ranges(sg, sched_op, lr_graph, target_mem_area, target_mem_type_set): def _tensor_should_be_ignored(tens): - if tens in sg.input_tensors + sg.output_tensors: + if tens.ifm_write_protected: return True return tensor_should_be_ignored(tens, target_mem_area, target_mem_type_set) -- cgit v1.2.1