diff options
author | Johan Alfven <johan.alfven@arm.com> | 2024-01-25 12:32:13 +0100 |
---|---|---|
committer | Johan Alfven <johan.alfven@arm.com> | 2024-01-30 12:25:05 +0000 |
commit | 014bc28324014dc82e3b352d7a81df9ed0338c56 (patch) | |
tree | b0b5e765319531da441874e03c4c81980bd6f800 /ethosu/vela/stats_writer.py | |
parent | cbec599c97b8620580ed5f80ea253770df872fa1 (diff) | |
download | ethos-u-vela-014bc28324014dc82e3b352d7a81df9ed0338c56.tar.gz |
MLBEDSW-8569: MLCE: Reported number of CPU ops are wrong
- A Pack op is implemented by several AvgPool ops. Depending
on number of CPU ops and graph topology this could result in that
the AvgPool ops ended up in different nodes. One of these node
had the Pack output referenced to it but the other node did not.
As a result the full graph was not traversed when calculating CPU
ops.
- The compiled network works as intended but the number of
reported CPU was wrong.
- Added new method that extracts the ops using the passes in
the sub graphs which fix the problem.
Change-Id: Ie88ebd4669783559258ae763737a4c7f86c905f8
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu/vela/stats_writer.py')
-rw-r--r-- | ethosu/vela/stats_writer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/stats_writer.py b/ethosu/vela/stats_writer.py index 25c90300..b743a5f5 100644 --- a/ethosu/vela/stats_writer.py +++ b/ethosu/vela/stats_writer.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates <open-source-office@arm.com> +# SPDX-FileCopyrightText: Copyright 2020-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> # # SPDX-License-Identifier: Apache-2.0 # @@ -365,11 +365,11 @@ def print_performance_metrics(nng, arch, show_cpu_operations=False, verbose_weig for sg in nng.subgraphs: if sg.placement == PassPlacement.Cpu: - for op in sg.get_all_ops(): + for op in sg.get_all_ops_from_passes(): if op.type not in ir_only_ops: cpu_operations.append(op) elif sg.placement == PassPlacement.Npu: - for op in sg.get_all_ops(): + for op in sg.get_all_ops_from_passes(): if op.type not in ir_only_ops: npu_operations.append(op) |