aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/greedy_allocation.py
diff options
context:
space:
mode:
authorCharles Xu <charles.xu@arm.com>2020-05-28 07:20:52 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commit5b3dcd7323a5852bd188bb3929e7f38db3b52862 (patch)
tree4fd76343cee25274d9c61738bb4193e22613198c /ethosu/vela/greedy_allocation.py
parentb2fb212216eaa29b96ddf270a0392172265ff02c (diff)
downloadethos-u-vela-5b3dcd7323a5852bd188bb3929e7f38db3b52862.tar.gz
MLBEDSW-2269: Fix the buffer overlap issue for multi subgraphes
Signed-off-by: Charles Xu <charles.xu@arm.com> Change-Id: Ia7127148d00280bf9c3759dd6dcbe500a4cfcc78
Diffstat (limited to 'ethosu/vela/greedy_allocation.py')
-rw-r--r--ethosu/vela/greedy_allocation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/greedy_allocation.py b/ethosu/vela/greedy_allocation.py
index d6896a59..8393434d 100644
--- a/ethosu/vela/greedy_allocation.py
+++ b/ethosu/vela/greedy_allocation.py
@@ -46,8 +46,8 @@ class GreedyAllocator:
current_offset = start_addr + lr.size
+ best_offset = new_lr.set_address(best_offset)
self.memory_required = max(self.memory_required, best_offset + size)
- new_lr.set_address(best_offset)
self.current_allocs.append((best_offset, new_lr))
self.current_allocs = list(sorted(self.current_allocs))
@@ -77,7 +77,7 @@ class GreedyAllocator:
for m in lrs:
if n != m and n.overlaps_ranges(m):
overlap, tens_n, tens_m = n.overlaps_address(m)
- if overlap:
+ if overlap and not (tens_n.equivalence_id == tens_m.equivalence_id and tens_n.address == tens_m.address):
print("Solution failed, overlapping buffer!")
print(tens_n.address, tens_n.address + n.size, n.name)
print(tens_m.address, tens_m.address + m.size, m.name)