aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tensor_allocation.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tensor_allocation.py')
-rw-r--r--ethosu/vela/tensor_allocation.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py
index 1e5eb852..0a7da5da 100644
--- a/ethosu/vela/tensor_allocation.py
+++ b/ethosu/vela/tensor_allocation.py
@@ -202,12 +202,6 @@ def allocate_tensors(
else:
sg.memory_used_per_type[mem_type] += total_sz
- if mem_area == arch.fast_storage_mem_area:
- for tens in lrs.ranges:
- if tens.purpose == TensorPurpose.Weights:
- nng.total_compressed_weights += tens.storage_size()
- nng.total_original_weights += tens.elements() * tens.element_size()
-
print_allocation(lrs, mem_area, mem_type_set, sg, verbose_allocation)
if mem_area == MemArea.Sram:
@@ -217,10 +211,9 @@ def allocate_tensors(
if sg == nng.get_root_subgraph():
nng.memory_used = sg.memory_used
- if mem_area == arch.fast_storage_mem_area:
- try:
- nng.weights_compression_ratio = nng.total_compressed_weights / nng.total_original_weights
- except ZeroDivisionError:
- nng.weights_compression_ratio = 0.0
+ try:
+ nng.weights_compression_ratio = nng.total_compressed_weights / nng.total_original_weights
+ except ZeroDivisionError:
+ nng.weights_compression_ratio = 0.0
return True