aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ethosu/vela/npu_performance.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index dfb7006..32d0749 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.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
#
@@ -954,7 +954,11 @@ def calc_new_performance_for_network(
if encoded_npu_weight and (encoded_npu_weight.equivalence_id not in encoded_npu_weight_uuids):
encoded_npu_weight_uuids.add(encoded_npu_weight.equivalence_id)
- total_encoded_weight_size += len(encoded_npu_weight.buffer)
+ # Get total weight size from encoded ranges
+ sz = 0
+ for key in encoded_npu_weight.encoded_ranges:
+ sz += encoded_npu_weight.encoded_ranges[key].weight_bytes
+ total_encoded_weight_size += sz
total_bws += bws[sched_op]
total_macs += macs[sched_op]