diff options
author | Simon Hollis <simon.hollis@meta.com> | 2024-02-27 19:51:16 +0000 |
---|---|---|
committer | Simon Hollis <simon.hollis@meta.com> | 2024-02-28 15:26:23 +0000 |
commit | f19fd2f00983dfdf2a04dfefead888653ced1162 (patch) | |
tree | cc3d89fdc94fde046b78e2f156624c0a5dc46b30 | |
parent | 78b9412b07e0a46e58e8ecb9da8d661399c006a5 (diff) | |
download | ethos-u-vela-f19fd2f00983dfdf2a04dfefead888653ced1162.tar.gz |
Fix stats writer exception when op has no tensors
Signed-off-by: Simon Hollis <simon.hollis@meta.com>
Change-Id: I5553802afaa3faaa2548aece7a3e0e1530021765
-rw-r--r-- | ethosu/vela/stats_writer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/stats_writer.py b/ethosu/vela/stats_writer.py index b743a5f..dce20b9 100644 --- a/ethosu/vela/stats_writer.py +++ b/ethosu/vela/stats_writer.py @@ -1,4 +1,5 @@ # SPDX-FileCopyrightText: Copyright 2020-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> +# SPDX-FileCopyrightText: (c) Meta Platforms, Inc. and affiliates. (http://www.meta.com) # # SPDX-License-Identifier: Apache-2.0 # @@ -280,7 +281,7 @@ def print_performance_metrics_for_strat( n_total_operations = max(n_cpu_operations + n_npu_operations, 1) # avoid potential divide by zero def format_tens_list(lst): - return " ".join(str(list(tens.shape)) for tens in lst) + return " ".join(str(list(tens.shape)) for tens in lst if tens is not None) for str_ops_type, n_ops, ops in ( ("CPU", n_cpu_operations, cpu_operations), |