aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Xu <charles.xu@arm.com>2020-06-25 16:05:25 +0200
committertim.hall <tim.hall@arm.com>2020-06-26 14:01:18 +0000
commitb02c8d954b9c7b8452a2c9adbcdd14a787a352a5 (patch)
tree3852233e17ecccfaced1b470886593ce57cb2584
parent6231676d1751caa353a51f9bdfc50642930f4802 (diff)
downloadethos-u-vela-1.1.0.rc1.tar.gz
MLBEDSW-2552: Skip npu cycle calculation for cpu op1.1.0.rc1
Signed-off-by: Charles Xu <charles.xu@arm.com> Change-Id: Ief50c934b9e9b0bd3024d3ed0bbaa7b655971952
-rw-r--r--ethosu/vela/npu_performance.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index 98626de6..1663c26b 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -232,7 +232,9 @@ def performance_metrics_for_pass(arch, ps, block_config=None, rewrite_list=[], f
explicit_padding = (0, 0, 0, 0)
primary_op = ps.primary_op
replacement_read_bws = {}
- if primary_op:
+ if ps.placement == PassPlacement.Cpu:
+ cycles[PassCycles.Cpu] = arch.cpu_cycle_estimate(ps.ops[0])
+ elif primary_op:
skirt = primary_op.attrs.get("skirt", skirt)
explicit_padding = primary_op.attrs.get("explicit_padding", explicit_padding)
assert primary_op.attrs["npu_block_type"] == ps.npu_block_type
@@ -397,9 +399,6 @@ def performance_metrics_for_pass(arch, ps, block_config=None, rewrite_list=[], f
cycles[PassCycles.ElementWise] = numeric_util.round_up_divide(elms, arch.num_elem_wise_units)
- if ps.placement == PassPlacement.Cpu:
- cycles[PassCycles.Cpu] = arch.cpu_cycle_estimate(ps.ops[0])
-
# apply the desired rewrites
for rewrite_op, tens, _, _, _, ps_to_rewrite in rewrite_list:
if ps != ps_to_rewrite: