aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/test/testutil.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-16 13:08:06 +0100
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-21 07:34:05 +0100
commitbf31d647dc5df47410ee577b12427ddf076d816b (patch)
tree85ddd620916565aa8565d072b764ca4918b405a1 /ethosu/vela/test/testutil.py
parent2349d429d926e258e9a61d34c7fd97660ab9fb98 (diff)
downloadethos-u-vela-bf31d647dc5df47410ee577b12427ddf076d816b.tar.gz
MLBEDSW-3645 4D class for op ifm/ofm shapes
Add 4D shape class for op Ifm/ofm shapes Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: Ic0a98da9d2f9d085605e39a9ab5a26bad6e702a3
Diffstat (limited to 'ethosu/vela/test/testutil.py')
-rw-r--r--ethosu/vela/test/testutil.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ethosu/vela/test/testutil.py b/ethosu/vela/test/testutil.py
index 63f841b4..c3459501 100644
--- a/ethosu/vela/test/testutil.py
+++ b/ethosu/vela/test/testutil.py
@@ -75,7 +75,7 @@ def create_elemwise_op(
def create_op_with_quant_tensors(
- op_type, ifm_shape, ofm_shape, weights_shape=None, bias_shape=None, datatype=DataType.uint8
+ op_type, ifm_shape, ofm_shape, weights_shape=None, bias_shape=None, datatype=DataType.uint8, set_ifm_ofm_shapes=True
):
ifm = Tensor(ifm_shape, datatype, "in")
ifm.quantization = default_quant_params()
@@ -107,7 +107,9 @@ def create_op_with_quant_tensors(
bias = create_const_tensor("bias", bias_shape, DataType.int32, np.zeros(bias_shape), np.int32, quantization=qp)
op.add_input_tensor(bias)
- op.set_ifm_ofm_shapes()
+ if set_ifm_ofm_shapes:
+ op.set_ifm_ofm_shapes()
+
return op