aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/npu_performance.py
diff options
context:
space:
mode:
authorWilliam Isaksson <william.isaksson@arm.com>2023-07-12 12:28:05 +0000
committerRickard Bolin <rickard.bolin@arm.com>2023-08-09 14:03:07 +0000
commita71efe00bcbac0e601a0e3812bba89da452f2aff (patch)
treebace47c899842573f5e7db85bbb7f11d784a2863 /ethosu/vela/npu_performance.py
parent81b765df02d7c7cae5f1084eec998824b68c00ab (diff)
downloadethos-u-vela-a71efe00bcbac0e601a0e3812bba89da452f2aff.tar.gz
MLBEDSW-7754: Performance estimator is not using write/read shapes3.9.0.rc1
- npu_performance now uses write/read shapes instead of using ifm/ofms for memory cycle estimations. - also fixes a would be bug in the tflite_graph_optimiser, where one read shape is not Shape4D. Change-Id: I2067069a713d2cf9e65a5cc227e803de79940fff Signed-off-by: William Isaksson <william.isaksson@arm.com>
Diffstat (limited to 'ethosu/vela/npu_performance.py')
-rw-r--r--ethosu/vela/npu_performance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index eb9f66c6..dfb7006b 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -618,15 +618,15 @@ def estimate_full_op_performance(
macs = 0
query = PerformanceQuery(op.op_type.npu_block_type)
- query.ifm_shape = op.ifm.shape
+ query.ifm_shape = op.ifm_read_shape
query.ifm_format = op.ifm.format
query.ifm_memory_area = op.ifm.connection.parent_tens.mem_area # Mem Area is set directly on parent_tens
query.ifm_bits = op.ifm.dtype.size_in_bits()
- query.ifm2_shape = op.ifm2 and op.ifm2.shape
+ query.ifm2_shape = op.ifm2_read_shape
query.ifm2_format = op.ifm2 and op.ifm2.format
query.ifm2_memory_area = op.ifm2 and op.ifm2.connection.parent_tens.mem_area
query.ifm2_bits = op.ifm2 and op.ifm2.dtype.size_in_bits()
- query.ofm_shape = op.ofm.shape
+ query.ofm_shape = op.ofm_write_shape
query.ofm_memory_area = op.ofm.connection.parent_tens.mem_area
query.ofm_bits = op.ofm.dtype.size_in_bits()
query.ofm_format = op.ofm.format