aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/npu_performance.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2021-06-01 12:43:43 +0200
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2021-06-03 10:11:43 +0200
commit225e19d3640288e991475ee4c49cb3ffd83cc83b (patch)
treebca6477cf5c809dfea5aca9ff43fc8d7dfdf745b /ethosu/vela/npu_performance.py
parentc1c12438ea06fff2d12c20bd8db06c7091d8548d (diff)
downloadethos-u-vela-225e19d3640288e991475ee4c49cb3ffd83cc83b.tar.gz
MLBEDSW-4688: Fix performance estimates
Putting back the estimates related to unbuffered weight transfer. Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I2072066bc1e01814fe3b0b87a912f69646da861c
Diffstat (limited to 'ethosu/vela/npu_performance.py')
-rw-r--r--ethosu/vela/npu_performance.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index b1dae4e0..5c61c7db 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -708,11 +708,17 @@ def estimate_full_op_performance(
bw = access.const_read[0] * bandwidth_compression_scale_approx
bws[query.const_memory_area][TensorPurpose.Weights][BandwidthDirection.Read] += bw
+ if not cost.buffered_weight_tensor:
+ scaled_bws[query.const_memory_area][TensorPurpose.Weights][BandwidthDirection.Read] += bw
+
if access.const_read[1] > 0:
# Scales & biases
bw = access.const_read[1] * op.parent_op.bias.element_size()
bws[query.const_memory_area][TensorPurpose.FSBias][BandwidthDirection.Read] += bw
+ if not cost.buffered_weight_tensor:
+ scaled_bws[query.const_memory_area][TensorPurpose.FSBias][BandwidthDirection.Read] += bw
+
update_summary_cycles(arch, scaled_bws, cycles_a)
return bws, macs, cycles_a