MLBEDSW-4704: Vela crashes when serializing subset of Inception v3 network

* Add check for tensor with no operations, raising error if its constant-data buffer is empty

Signed-off-by: Alex Matthews <alex.matthews@arm.com>
Change-Id: Ib210dcc9733e4ecedbada0f430e8b3c4a8384999
Signed-off-by: James Ward <james.ward@arm.com>
diff --git a/ethosu/vela/reader_util.py b/ethosu/vela/reader_util.py
old mode 100644
new mode 100755
index 476b70a..b5de8b1
--- a/ethosu/vela/reader_util.py
+++ b/ethosu/vela/reader_util.py
@@ -53,6 +53,11 @@
 
     for tens in tensors:
         if not tens.ops:
+            if tens.values is None:
+                tens.error(
+                    "Tensor with no operator output connection is assumed to contain constant "
+                    "data but no data buffer is associated with this tensor. Perhaps the network is invalid?"
+                )
             op = Operation(Op.Const, tens.name)
             op.set_output_tensor(tens)