MLBEDSW-3301: Vela fails ungracefully when reading string buffers

When encountering a sparse string buffer, Vela fails
both due to missing a mapping for a Numpy string type
and also for not being able to read sparse buffers.
The failing line is attempting to reshape a [100]
buffer into a [3, 5] tensor which does not work due
to Vela treating the buffer as non-sparse.
The solution here is to simply not do the reshape
for string buffers (which all appear to be sparse)
since it is not something that will be supported in
the future anyway.
The related operator can then be pushed to the CPU
as expected.

Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: Iea0af6cd60a691f975209014b6aa098dde8d6a4b
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py
index b3b0720..c190f7e 100644
--- a/ethosu/vela/tflite_reader.py
+++ b/ethosu/vela/tflite_reader.py
@@ -106,7 +106,8 @@
         np_shape = tens_data.ShapeAsNumpy()
         shape = list(np_shape) if type(np_shape) is np.ndarray else []
         name = decode_str(tens_data.Name())
-        dtype = datatype_map[tens_data.Type()]
+        tens_dtype = tens_data.Type()
+        dtype = datatype_map[tens_dtype]
         tens = Tensor(shape, dtype, name)
         quant = tens_data.Quantization()
 
@@ -129,8 +130,8 @@
 
         tens.values = None
         buf = self.graph.buffers[tens_data.Buffer()]
-        if buf is not None:
-            tens.values = np.array(buf.view(datatype_map_numpy[tens_data.Type()]).reshape(shape))
+        if buf is not None and dtype != DataType.string:
+            tens.values = np.array(buf.view(datatype_map_numpy[tens_dtype]).reshape(shape))
             if tens.quantization is not None:
                 tens.quant_values = tens.values
                 tens.values = tens.quantization.dequantize(tens.quant_values)