MLBEDSW-2813: Handle non-const weights and check shapes

- Added check for non-constant weights in supported operators
- Added check ifm & ifm2 shapes
- Handle None tensors for CPU operators
- Handle missing attributes for Cast operator

Signed-off-by: Andreas Nevalainen <andreas.nevalainen@arm.com>
Change-Id: I2f16d3d44d0c6da5237550b39273cdb9cc3c7607
diff --git a/ethosu/vela/pass_packing.py b/ethosu/vela/pass_packing.py
index a1b03fe..f49f981 100644
--- a/ethosu/vela/pass_packing.py
+++ b/ethosu/vela/pass_packing.py
@@ -318,6 +318,8 @@
                             print("Warning:", curr_op.type, "operation is unknown or unsupported, placing on CPU")
 
                         for inp in reversed(curr_op.inputs):
+                            if inp is None:
+                                continue
                             can_pack = True
                             if len(inp.ops) == 1:
                                 next_op = inp.ops[0]
@@ -390,6 +392,8 @@
         # Check primary_op first
         if primary_op is not None:
             for inp in primary_op.inputs:
+                if inp is None:
+                    continue
                 if len(inp.ops) == 1 and inp.ops[0].type == "DMA" and inp.purpose == TensorPurpose.FeatureMap:
                     src_op = inp.ops[0]
                     if src_op in input_ops_list: