diff options
author | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-30 10:30:25 +0200 |
---|---|---|
committer | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-30 15:54:14 +0200 |
commit | d85750702229af97c0b0bbda6e397a23254b6144 (patch) | |
tree | 389962105a35d5cef595cfeb5d640bd59a0d0ff8 /ethosu/vela/tensor_allocation.py | |
parent | cc5f4de1c35ba44fca7ff6295c6ae846f8242344 (diff) | |
download | ethos-u-vela-d85750702229af97c0b0bbda6e397a23254b6144.tar.gz |
Update version of Black to 22.3.0
Update version of Black to 22.3.0 due to updated dependencies.
Updates to fix reported issues due to new version.
Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com>
Change-Id: I60056aae452093ce8dcea1f499ecced22b25eef1
Diffstat (limited to 'ethosu/vela/tensor_allocation.py')
-rw-r--r-- | ethosu/vela/tensor_allocation.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py index c8b5129d..ab65740e 100644 --- a/ethosu/vela/tensor_allocation.py +++ b/ethosu/vela/tensor_allocation.py @@ -128,7 +128,12 @@ def print_allocation(lrs, mem_area, mem_type_set, tensor_allocator, sg, actual_m print("\n" + "#" * 80) sg_placement = ( sg.placement.name - if mem_type_set.intersection((MemType.Permanent_NPU, MemType.Permanent_CPU,)) + if mem_type_set.intersection( + ( + MemType.Permanent_NPU, + MemType.Permanent_CPU, + ) + ) else "Cpu and Npu" ) print( @@ -141,7 +146,15 @@ def print_allocation(lrs, mem_area, mem_type_set, tensor_allocator, sg, actual_m min_mem_usage_for_alloc = max(memory_hist) print("Start Time - End Time: Start Addr - End Addr: Tensor Size: Memory Usage: Tensor Purpose: Tensor Name") for start_time, end_time, size, start_addr, end_addr, purpose, name in sorted( - (lr.start_time, lr.end_time, lr.size, tens.address, tens.address + lr.size, tens.purpose, tens.name,) + ( + lr.start_time, + lr.end_time, + lr.size, + tens.address, + tens.address + lr.size, + tens.purpose, + tens.name, + ) for tens, lr in lrs.ranges.items() ): print( @@ -184,7 +197,11 @@ def allocate( ): # Allocates addresses to tensors, returns False if tensors could not be fit within max_size lrs = live_range.extract_live_ranges_from_cascaded_passes( - sg, mem_area, mem_type_set, lr_graph=lr_graph, cpu_tensor_alignment=cpu_tensor_alignment, + sg, + mem_area, + mem_type_set, + lr_graph=lr_graph, + cpu_tensor_alignment=cpu_tensor_alignment, ) total_sz = 0 if lrs.ranges: |