aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/stats_writer.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-09-30 09:01:52 +0200
committerLouis Verhaard <louis.verhaard@arm.com>2020-10-08 16:29:29 +0200
commitaee5d7537ff81ffda5ba222721b72f914ce50fb8 (patch)
tree495b9dfff2a188c6916f8ca2e390ee88f7da8ccc /ethosu/vela/stats_writer.py
parent36ad73a0fb46d3f844845c97c56d92de2a7a9b3d (diff)
downloadethos-u-vela-aee5d7537ff81ffda5ba222721b72f914ce50fb8.tar.gz
MLBEDSW-3148: Refactor Operation
- op.type is now an enum instead of a string - Removed unused operator codes - Refactored some attributes like npu_block_type, fused_activation_function - Refactored operator index calculation - Refactored a number of operator sets Change-Id: I641f65ee375794b7aec42abc0664251ae37d78e8 Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/stats_writer.py')
-rw-r--r--ethosu/vela/stats_writer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/stats_writer.py b/ethosu/vela/stats_writer.py
index 2ea14f2b..6fd68f85 100644
--- a/ethosu/vela/stats_writer.py
+++ b/ethosu/vela/stats_writer.py
@@ -25,6 +25,7 @@ from .npu_performance import BandwidthDirection
from .npu_performance import MacCount
from .npu_performance import PassCycles
from .numeric_util import round_up_to_int
+from .operation import Op
from .tensor import MemArea
from .tensor import TensorPurpose
@@ -192,11 +193,11 @@ def write_pass_metrics_csv(nng, pass_filename):
continue # skip the dummy init pass
for ps in cps.passes:
- if len(ps.ops) == 1 and ps.ops[0].type == "NpuOp":
+ if len(ps.ops) == 1 and ps.ops[0].type == Op.CustomNpuOp:
# just treat this as a call, unroll it
write_subgraph(ps.ops[0].attrs["subgraph"])
continue
- stats = [ps.name, " ".join(op.type for op in ps.ops)]
+ stats = [ps.name, " ".join(op.type.name for op in ps.ops)]
stats += [ps.placement.name]
stats += [cps.strategy.name]
stats += list(ps.block_config)