aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Alfvén <johan.alfven@arm.com>2022-12-07 12:40:55 +0100
committerFredrik Svedberg <fredrik.svedberg@arm.com>2022-12-15 12:43:07 +0000
commit2f87617ef1ed682a5a0ac2138fc9fd551c93fd74 (patch)
treedf040056097a07e1507e0e71760fc45e050a3b2c
parentfaa4b7861317385ecd2357b7af9b90c6a5fbdd08 (diff)
downloadethos-u-vela-2f87617ef1ed682a5a0ac2138fc9fd551c93fd74.tar.gz
MLBEDSW-7173: MLCE: NPU performance for reversed operands
- When introducing the support for reversed operands the npu performance was not updated. The result is larger numbers (degrade) from the performance estimater compared to the previous release. In reality there is no degrade and the real performance is the same. - Updated npu performance to reflect the behavior implemented by the reversed operands attribute. Change-Id: I1b37a07f25def8f7a8adbdaadcf931bfe49165cb Signed-off-by: Johan Alfven <johan.alfven@arm.com>
-rw-r--r--ethosu/vela/npu_performance.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index cfe13d03..967a7ac0 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -705,14 +705,15 @@ def estimate_full_op_performance(
)
# IFM read
- ifm = op.parent_op.ifm
+ ifm = op.parent_op.ifm2 if op.reversed_operands else op.parent_op.ifm
bw = access.ifm_read[0] * ifm.element_size()
bws[ifm.mem_area][ifm.purpose][BandwidthDirection.Read] += bw
scaled_bws[ifm.mem_area][ifm.purpose][BandwidthDirection.Read] += _estimate_memory_transfer_efficiency(
arch, True, query.ifm_memory_area, ifm.format, query.ifm_bits, query.config.ifm_block, query.ifm_shape, bw
)
+
if query.ifm2_shape:
- ifm2 = op.parent_op.ifm2
+ ifm2 = op.parent_op.ifm if op.reversed_operands else op.parent_op.ifm2
bw = access.ifm_read[1] * ifm2.element_size()
bws[ifm2.mem_area][ifm2.purpose][BandwidthDirection.Read] += bw
scaled_bws[ifm2.mem_area][ifm2.purpose][BandwidthDirection.Read] += _estimate_memory_transfer_efficiency(