diff options
author | Tim Hall <tim.hall@arm.com> | 2023-12-19 11:17:37 +0000 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2023-12-19 17:56:54 +0000 |
commit | d2e03c61b028f9f84fd61812ea8905bf68f482e3 (patch) | |
tree | d80cfd183ab4b9a8f8d546e711cc3332f29d67de /ethosu/vela | |
parent | 6165283b314363677cc1c34388b92c414972273c (diff) | |
download | ethos-u-vela-d2e03c61b028f9f84fd61812ea8905bf68f482e3.tar.gz |
MLBEDSW-8467: verbose-allocation memory usage is incorrect
- The issue was that the peak memory usage was only evaluated at the
start of the tensor's lifetime and not across its whole lifetime
- The fix is to look for the maximum usage between start and end
Change-Id: Iff4f390f3a017f1df0f8933796fa5282db7870db
Signed-off-by: Tim Hall <tim.hall@arm.com>
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/tensor_allocation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py index fa9ace17..7a7aaa41 100644 --- a/ethosu/vela/tensor_allocation.py +++ b/ethosu/vela/tensor_allocation.py @@ -165,7 +165,7 @@ def print_allocation(lrs, mem_area, mem_type_set, tensor_allocator, sg, actual_m ): print( f"{start_time:10d} - {end_time:10d}: {start_addr:#10x} - {end_addr:#10x}: {size:11d}:" - f" {memory_hist[start_time]:12d}: {purpose.display_name():12s}: {name:s}" + f" {max(memory_hist[start_time:end_time+1]):12d}: {purpose.display_name():12s}: {name:s}" ) alloc_overhead_fraction = (actual_mem_usage_for_alloc - min_mem_usage_for_alloc) / min_mem_usage_for_alloc |