diff options
Diffstat (limited to 'ethosu/vela/tensor_allocation.py')
-rw-r--r-- | ethosu/vela/tensor_allocation.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py index f29296d1..bb91145e 100644 --- a/ethosu/vela/tensor_allocation.py +++ b/ethosu/vela/tensor_allocation.py @@ -26,6 +26,7 @@ from .greedy_allocation import allocate_live_ranges as greedy_allocate_live_rang from .nn_graph import TensorAllocator from .tensor import MemArea from .tensor import MemType +from .tensor import TensorPurpose def linear_allocate_live_ranges(live_ranges, alloc_granularity=16): @@ -44,6 +45,11 @@ def linear_allocate_live_ranges(live_ranges, alloc_granularity=16): if allocated_tens.weight_compression_config == tens.weight_compression_config: address = allocated_tens.address break + if tens.purpose == TensorPurpose.LUT: + for allocated_tens in allocated_tensors: + if allocated_tens.equivalent(tens): + address = allocated_tens.address + break lr.set_address(address) allocated_tensors += lr.tensors if address == total_sz: |