aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2021-02-15 15:36:05 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2021-02-16 10:19:03 +0000
commitab11bd1216cded591382ed01b6f5ce0f55a6de46 (patch)
treec633b30e4315baed82d7a9b43192a7670a566e23
parentb70f8171ca8a87296c41692417aa5e4595869bbf (diff)
downloadethos-u-vela-ab11bd1216cded591382ed01b6f5ce0f55a6de46.tar.gz
Make HillClimb allocation reproducible
Made HillClimb allocation results reproducible between runs. Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com> Change-Id: I0535947e9cd9c6e0cf896e81b127d93cab54ebc8
-rw-r--r--ethosu/vela/tensor_allocation.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py
index b7057f0..621073a 100644
--- a/ethosu/vela/tensor_allocation.py
+++ b/ethosu/vela/tensor_allocation.py
@@ -67,6 +67,8 @@ def hillclimb_allocate_live_ranges(live_ranges: LiveRangeGraph, alloc_granularit
# Allocates using the hill climb allocator
lr_set = {(lr.start_time, lr.end_time, lr) for lr in live_ranges.ranges.values()}
lr_list = [lr for _, _, lr in lr_set]
+ lr_list.sort()
+
addresses = hillclimb_allocation.allocate_live_ranges(lr_list)
# The result is a list containing the allocated addresses
total_sz = 0