aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/weight_compressor.py
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2024-01-25 19:52:16 +0100
committerFredrik Svedberg <fredrik.svedberg@arm.com>2024-01-26 13:18:16 +0000
commitcbec599c97b8620580ed5f80ea253770df872fa1 (patch)
tree69b5c6f8362e8bb5687d4ce755b3fe64f4ccbb12 /ethosu/vela/weight_compressor.py
parent1c8f92d0bf0bfe032ada2a0d8cb234c486b96548 (diff)
downloadethos-u-vela-cbec599c97b8620580ed5f80ea253770df872fa1.tar.gz
MLBEDSW-8575 Tests fails on conv networks
Fixed a problem where the compiler incorrectly called the mlw_codec to create an empty weight stream for the second weight core. Also added code to the mlw_codec to detect this as an value error rather than a memory error. Change-Id: I463846cecb1178f8fbf04dc3e39bd6965cb8ddfc Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Diffstat (limited to 'ethosu/vela/weight_compressor.py')
-rw-r--r--ethosu/vela/weight_compressor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py
index 50ae26c0..a580fb61 100644
--- a/ethosu/vela/weight_compressor.py
+++ b/ethosu/vela/weight_compressor.py
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+# SPDX-FileCopyrightText: Copyright 2020-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -420,7 +420,7 @@ def encode_weight_and_scale_tensor(
# For each core, deinterleave weights/scales from the larger volume
# and generate separate compressed streams.
- for core in range(0, min(arch.ncores, full_ofm_depth)):
+ for core in range(0, min(arch.ncores, depth_length)):
core_block_depth = int((ofm_block_depth + arch.ncores - 1 - core) // arch.ncores)