From 225e19d3640288e991475ee4c49cb3ffd83cc83b Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Tue, 1 Jun 2021 12:43:43 +0200 Subject: MLBEDSW-4688: Fix performance estimates Putting back the estimates related to unbuffered weight transfer. Signed-off-by: Patrik Gustavsson Change-Id: I2072066bc1e01814fe3b0b87a912f69646da861c --- ethosu/vela/npu_performance.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ethosu/vela') 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 -- cgit v1.2.1