MLBEDSW-6703 Add SHAPE operator to supported operators

Added SHAPE operator to the supported operators report.
Updated the constraints for QUANTIZE and SHAPE operator.
Also fixed RESHAPE consuming statically optimised shape.

Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Change-Id: I1d964d602d3f361a0f16dae8133197280dd84c48
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py
index 6328a4e..25a34e8 100644
--- a/ethosu/vela/tflite_supported_operators.py
+++ b/ethosu/vela/tflite_supported_operators.py
@@ -39,7 +39,12 @@
 
 class TFLiteSupportedOperators:
     # Categorised lists of supported operators
-    npu_pre_ops = set((Op.SplitSliceRead,))
+    npu_pre_ops = set(
+        (
+            Op.SplitSliceRead,
+            Op.Shape,
+        )
+    )
     convolution_ops = set(
         (
             Op.Conv2DBias,
@@ -103,6 +108,7 @@
             (
                 Op.ReduceSum,
                 Op.CLZ,
+                Op.Shape,
             )
         )
         | binary_elem_wise_add_mul_sub
@@ -363,7 +369,7 @@
         if op.type not in cls.per_axis_quant_ops:
             tensors = [tens for tens in op.get_ifm_ifm2_weights_ofm() if tens]
             for tens in tensors:
-                if tens.quantization.is_per_axis():
+                if tens.quantization and tens.quantization.is_per_axis():
                     valid = False
                     extra.append(tens.name)
         return valid, "The following tensor(s) have per-axis quantization parameters: " + ", ".join(extra)