From 8359a474e4f125382fd7b7d5431a612f6013f107 Mon Sep 17 00:00:00 2001 From: Dwight Lidman Date: Mon, 28 Sep 2020 15:53:40 +0200 Subject: MLBEDSW-3061: Update supported_operators.py This commit changes and amends some parts of the restriction functions in order to make sure operators are correctly placed. Signed-off-by: Dwight Lidman Change-Id: I336cf33a874c9078a5bbf81ce129ff917dbc5e9a --- ethosu/vela/test/test_supported_operators.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ethosu/vela/test/test_supported_operators.py') diff --git a/ethosu/vela/test/test_supported_operators.py b/ethosu/vela/test/test_supported_operators.py index 20d448d7..1fb452cf 100644 --- a/ethosu/vela/test/test_supported_operators.py +++ b/ethosu/vela/test/test_supported_operators.py @@ -30,11 +30,14 @@ support = SupportedOperators() def create_strided_slice_op(in_shape, out_shape, start_offsets, end_offsets): + qp = QuantizationParameters() in0 = Tensor(in_shape, DataType.uint8, "in") - in1 = create_const_tensor("begin", [len(start_offsets)], DataType.uint8, start_offsets) - in2 = create_const_tensor("end", [len(end_offsets)], DataType.uint8, end_offsets) - in3 = create_const_tensor("strides", [len(end_offsets)], DataType.uint8, len(end_offsets) * [1]) + in0.quantization = qp + in1 = create_const_tensor("begin", [len(start_offsets)], DataType.uint8, start_offsets, quantization=qp) + in2 = create_const_tensor("end", [len(end_offsets)], DataType.uint8, end_offsets, quantization=qp) + in3 = create_const_tensor("strides", [len(end_offsets)], DataType.uint8, len(end_offsets) * [1], quantization=qp) out = Tensor(out_shape, DataType.uint8, "out") + out.quantization = qp attrs = {"ellipsis_mask": 0, "new_axis_mask": 0, "shrink_axis_mask": 0, "begin_mask": 0, "end_mask": 0} return testutil.create_op(Op.StridedSlice, [in0, in1, in2, in3], out, attrs=attrs) -- cgit v1.2.1