Fix stats writer exception when op has no tensors

Signed-off-by: Simon Hollis <simon.hollis@meta.com>
Change-Id: I5553802afaa3faaa2548aece7a3e0e1530021765
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 @@
     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),