aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/api.py
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2021-04-23 14:36:42 +0200
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2021-05-06 12:52:21 +0000
commitf5c07c45b48717fb6391adb35cb73ca7cd5734c3 (patch)
tree199fc4646a403af01009c8e10aafec0bad1e910e /ethosu/vela/api.py
parenta0b8d5f1bc32092cb85df07fb68e5582d01def32 (diff)
downloadethos-u-vela-f5c07c45b48717fb6391adb35cb73ca7cd5734c3.tar.gz
[MLBEDSW-4254] Improve weight information in summary
Improved weight information showed in summary if --verbose-weights option is used. Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com> Change-Id: Iac142f2a813bf1c05aa9da3f8a384466e2914d06
Diffstat (limited to 'ethosu/vela/api.py')
-rw-r--r--ethosu/vela/api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/api.py b/ethosu/vela/api.py
index f972133d..e91c0bdb 100644
--- a/ethosu/vela/api.py
+++ b/ethosu/vela/api.py
@@ -416,15 +416,16 @@ def npu_encode_weights(
:param ofm_block_depth: the depth of blocks for processing
:param is_depthwise: a boolean indicating these weights are used for a depthwise traversal
:param block_traversal: indicates how these weights are traversed on sub-kernel basis
- :return: a bytearray of compressed weights
+ :return: a bytearray of encoded weights
"""
from .architecture_features import Accelerator
from . import weight_compressor
acc = Accelerator.from_npu_accelerator(accelerator)
- return weight_compressor.encode_weights(
+ encoded_weights, _ = weight_compressor.encode_weights(
acc, weights_volume, dilation_xy, ifm_bitdepth, ofm_block_depth, is_depthwise, block_traversal
)
+ return encoded_weights
def npu_encode_bias(bias: numpy.int64, scale: int, shift: int):