MLBEDSW-2641: Fix crash for network with only CPU ops
Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com>
Change-Id: Ia9c70d62c6abc827cbdf73a8bb37afd595796741
diff --git a/ethosu/vela/tflite_writer.py b/ethosu/vela/tflite_writer.py
index cf40b5b..3f3b7b1 100644
--- a/ethosu/vela/tflite_writer.py
+++ b/ethosu/vela/tflite_writer.py
@@ -316,6 +316,7 @@
scratch_tensors = [tens for tens in all_tensors if tens.name.endswith("scratch")]
+ scratch_fast_tensor = None
for tens in all_tensors:
if tens.name.endswith("scratch_fast"):
scratch_fast_tensor = tens