diff options
author | Johan Alfvén <johan.alfven@arm.com> | 2022-07-19 14:03:27 +0200 |
---|---|---|
committer | Johan Alfvén <johan.alfven@arm.com> | 2022-07-19 18:10:07 +0200 |
commit | 783d364dda009a063fb4f5cc8dc89f347df7eb7c (patch) | |
tree | df726f2af01064a918b2293d554778e1efad1b37 /ethosu/vela | |
parent | a9fba260ec050794bd24e968c3dbd4e202b9d643 (diff) | |
download | ethos-u-vela-783d364dda009a063fb4f5cc8dc89f347df7eb7c.tar.gz |
MLBEDSW-6700: Fix compiler assert when fusing tensors
If an elemenwise op is part of a cascade, the ifm can not
be overwritten by the ofm.
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Change-Id: I1e5f7ee501be17e76684b33c6e86ab8af0f3e61f
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/live_range.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index ccf49297..e683f9f5 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -289,12 +289,14 @@ def create_linear_live_range_graph(sg, target_mem_area, target_mem_type_set, lr_ def _extract_live_ranges_from_schedule(sg, target_mem_area, target_mem_type_set, lr_graph): time_for_cascade = {} for sched_op in sg.sched_ops: - merge_elementwise_op_ranges(sg, sched_op, lr_graph, target_mem_area, target_mem_type_set) - op_info = sg.schedule.cost_map[sched_op] cascade = op_info.cascade cascade_info = sg.schedule.cascades.get(cascade, None) + if cascade_info is None: + # Op is not part of a cascade, check if the ifm can be overwritten by the ofm + merge_elementwise_op_ranges(sg, sched_op, lr_graph, target_mem_area, target_mem_type_set) + time_to_set = time_for_cascade.get(cascade, lr_graph.current_time) op_info.time_index = time_to_set |