From f19fd2f00983dfdf2a04dfefead888653ced1162 Mon Sep 17 00:00:00 2001 From: Simon Hollis Date: Tue, 27 Feb 2024 19:51:16 +0000 Subject: Fix stats writer exception when op has no tensors Signed-off-by: Simon Hollis Change-Id: I5553802afaa3faaa2548aece7a3e0e1530021765 --- ethosu/vela/stats_writer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +# 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), -- cgit v1.2.1