MLBEDSW-6563: networks failing with memory area exceeded in vela
- 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
diff --git a/ethosu/vela/test/test_hillclimb_allocation.py b/ethosu/vela/test/test_hillclimb_allocation.py
index 8a56c3f..03aec2b 100644
--- a/ethosu/vela/test/test_hillclimb_allocation.py
+++ b/ethosu/vela/test/test_hillclimb_allocation.py
@@ -54,10 +54,10 @@
def test_allocate(lrs, expected_size):
"""Tests the search allocator"""
lr_list = [live_range(start, end, size) for start, end, size in lrs]
- res = allocate_live_ranges(lr_list)
+ res = allocate_live_ranges(lr_list, None, 1 << 32)
assert len(res) == len(lrs)
assert max(addr + lr[2] for addr, lr in zip(res, lrs)) == expected_size
def test_allocate_empty_input():
- assert [] == allocate_live_ranges([])
+ assert [] == allocate_live_ranges([], 0, 0)