MLBEDSW-2412 Refactor constraints for conv ops

Using a new system to report constraints, replaced existing
functionality for checking conv-like ops.
This new system will allow reporting of all constraints regardless of
any input network.

Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: If81177deca2a3b57c9dd9a3a08868cbc9cef0c23
diff --git a/ethosu/vela/test/testutil.py b/ethosu/vela/test/testutil.py
index c5ff003..92bf53d 100644
--- a/ethosu/vela/test/testutil.py
+++ b/ethosu/vela/test/testutil.py
@@ -72,6 +72,31 @@
     return op
 
 
+def create_op_with_quant_tensors(op_type, ifm_shape, ofm_shape, weights_shape=None, datatype=DataType.uint8):
+    qp = QuantizationParameters()
+    ifm = Tensor(ifm_shape, datatype, "in")
+    ifm.quantization = qp
+    ofm = Tensor(ofm_shape, datatype, "out")
+    ofm.quantization = qp
+    op = Operation(op_type, "op")
+    op.add_input_tensor(ifm)
+    op.set_output_tensor(ofm)
+    # Optional weight tensor
+    if weights_shape is not None:
+        if datatype.size_in_bytes() == 1:
+            np_type = np.uint8
+        elif datatype.size_in_bytes() == 2:
+            np_type = np.int16
+        else:
+            np_type = np.int32
+        qp.zero_point = np.zeros(weights_shape)
+        weights = create_const_tensor(
+            "weights", weights_shape, datatype, np.zeros(weights_shape), np_type, quantization=qp
+        )
+        op.add_input_tensor(weights)
+    return op
+
+
 def create_op(op_type, inputs, output, attrs=dict()):
     op = Operation(op_type, output.name + "_op")
     op.inputs = inputs