diff options
author | Tim Hall <tim.hall@arm.com> | 2022-05-19 12:36:58 +0100 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2022-05-19 15:56:19 +0000 |
commit | cda4fcb0fd3e9766a161cf3e5aa7c3283e7f7c9e (patch) | |
tree | 2ca560bcf290bf88ab7a0058098df794486ab528 /ethosu/vela/greedy_allocation.py | |
parent | 8bc7a652607a771e234fda6b05275542ff0fc072 (diff) | |
download | ethos-u-vela-75b782dd9cbc54cdba59ed9690eea2bcbcc6bdbe.tar.gz |
MLBEDSW-6563: networks failing with memory area exceeded in vela3.4.0.rc2
- For allocations that have a hard memory limit the Hill Climb allocator
should be given more attempts to find a solution that would fit
- The fix is to use a memory limit when there is a hard constraint, and
a minimum iteration count, reset on every improvement, when there is a soft
constraint
- Added maximum number iterations CLI option
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I19ff53a0b68412de280263626778a3102cbe52fa
Diffstat (limited to 'ethosu/vela/greedy_allocation.py')
-rw-r--r-- | ethosu/vela/greedy_allocation.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ethosu/vela/greedy_allocation.py b/ethosu/vela/greedy_allocation.py index 6f4f8019..f6d7a3a1 100644 --- a/ethosu/vela/greedy_allocation.py +++ b/ethosu/vela/greedy_allocation.py @@ -19,11 +19,7 @@ from . import numeric_util class GreedyAllocator: - def __init__(self, nng, arch, live_ranges, mem_area): - self.nng = nng - self.arch = arch - self.mem_area = mem_area - + def __init__(self, live_ranges): self.live_ranges = live_ranges self.memory_required = 0 @@ -75,6 +71,6 @@ class GreedyAllocator: return self.memory_required -def allocate_live_ranges(nng, arch, live_ranges, mem_area, alignment): - g = GreedyAllocator(nng, arch, live_ranges, mem_area) +def allocate_live_ranges(live_ranges, alignment): + g = GreedyAllocator(live_ranges) return g.allocate_live_ranges(alignment) |