aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/weight_compressor.py
diff options
context:
space:
mode:
authorDiqing Zhong <diqing.zhong@arm.com>2021-02-01 19:07:04 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2021-02-02 13:27:25 +0000
commit66d7ec060a9c97f2095cb65f7242fa044a505810 (patch)
treea7bd120d11252dfb531b8ee4aa358f6863782587 /ethosu/vela/weight_compressor.py
parentf2afd7f8a893487f5e1ecb96e3406a5b04f258d2 (diff)
downloadethos-u-vela-66d7ec060a9c97f2095cb65f7242fa044a505810.tar.gz
MLBEDSW-3927: Fix wrong compression ratio
Change-Id: I06feeb98fb48badf06097f377a9504e6f4eeae91 Signed-off-by: Diqing Zhong <diqing.zhong@arm.com>
Diffstat (limited to 'ethosu/vela/weight_compressor.py')
-rw-r--r--ethosu/vela/weight_compressor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py
index 188b16ad..60ca846c 100644
--- a/ethosu/vela/weight_compressor.py
+++ b/ethosu/vela/weight_compressor.py
@@ -521,6 +521,9 @@ def update_pass_weight_and_scale_tensors(nng, arch):
compress_weights(
arch, nng, tens, op.type.npu_block_type, ps.block_config[-1], ofm_depth_step, op.get_dilation_h_w()
)
+ nng.total_compressed_weights += tens.weight_compressed_offsets[-1]
+ nng.total_original_weights += tens.elements() * tens.element_size()
+
# Update source tensor
if needs_dma:
src_tens = tens.get_dma_src_tensor()