From d065e338624da04730c490bbaae208d111176f22 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Thu, 13 Oct 2022 13:54:25 +0100 Subject: Updating AVG_POOL2D tests for FP16 and accumulator types Signed-off-by: Jeremy Johnson Change-Id: Iea118912a210b35bffb135ce38c8a6d899aef1ed --- .../desc.json | 22 + .../input-0.json | 1111 ++++++++++++++++++++ .../test.json | 72 ++ 3 files changed, 1205 insertions(+) create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/desc.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/input-0.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/test.json (limited to 'operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000') diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/desc.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/desc.json new file mode 100644 index 000000000..c221aa36b --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/desc.json @@ -0,0 +1,22 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0" + ], + "ifm_file": [ + "input-0.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "At least one kernel dimension is smaller than zero", + "profile": [ + "tosa-bi", + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/input-0.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/input-0.json new file mode 100644 index 000000000..2198c38d2 --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/input-0.json @@ -0,0 +1,1111 @@ +{ + "type": "int32", + "data": [ + [ + [ + [ + -58, + 56, + 1, + 66, + 18, + 87, + 16 + ], + [ + -114, + -110, + 70, + -119, + -32, + -124, + -51 + ], + [ + 24, + -84, + -9, + 126, + -110, + -112, + -59 + ], + [ + 83, + -25, + 35, + -120, + 60, + -111, + 54 + ], + [ + -91, + 91, + -53, + -81, + -42, + -128, + -86 + ], + [ + 25, + -52, + -38, + 78, + -97, + -27, + -81 + ], + [ + -5, + -44, + -117, + -111, + 90, + -114, + 72 + ], + [ + 106, + -9, + -49, + 70, + 123, + -98, + 118 + ], + [ + 113, + -92, + -114, + 55, + -109, + 25, + -112 + ], + [ + 48, + -69, + -104, + -111, + -80, + 10, + -109 + ] + ], + [ + [ + 77, + 26, + -52, + 124, + 40, + 44, + -84 + ], + [ + 53, + 15, + 124, + -6, + 45, + -41, + -118 + ], + [ + -96, + 93, + 60, + -35, + 50, + -127, + -119 + ], + [ + 1, + 31, + 111, + 66, + -63, + 80, + -3 + ], + [ + 83, + -84, + -122, + -114, + 125, + -108, + 112 + ], + [ + 58, + -91, + 93, + -92, + -92, + 19, + -55 + ], + [ + -54, + -79, + 27, + -122, + -66, + 13, + -4 + ], + [ + 51, + -73, + 37, + 66, + -29, + -63, + 14 + ], + [ + 20, + -104, + 16, + -89, + 17, + 110, + 9 + ], + [ + 66, + -49, + 108, + 80, + 106, + 61, + 38 + ] + ], + [ + [ + 6, + 109, + 89, + -22, + -107, + -128, + -69 + ], + [ + -112, + -74, + -100, + 123, + -104, + 32, + -38 + ], + [ + -84, + 51, + 120, + 74, + 121, + 23, + 44 + ], + [ + -91, + 90, + 63, + -63, + -38, + 28, + -125 + ], + [ + 81, + -57, + -109, + -44, + 85, + -58, + 10 + ], + [ + 79, + -120, + 66, + -55, + 50, + -80, + -93 + ], + [ + 73, + 78, + 123, + 45, + -9, + -79, + -53 + ], + [ + 37, + -40, + -5, + -85, + -16, + -68, + -100 + ], + [ + -95, + 4, + -35, + -103, + 3, + -86, + -125 + ], + [ + -95, + -14, + 116, + -67, + -56, + -66, + -38 + ] + ], + [ + [ + 55, + -46, + 40, + 101, + 114, + 16, + 54 + ], + [ + 107, + 73, + -52, + -95, + -99, + 97, + 14 + ], + [ + -53, + -40, + -56, + 77, + 28, + 97, + -51 + ], + [ + -8, + -97, + 120, + 3, + 13, + -23, + -59 + ], + [ + 114, + -3, + 44, + -119, + -58, + 77, + -106 + ], + [ + -103, + 79, + -49, + -58, + 16, + -79, + -117 + ], + [ + -127, + -108, + -88, + 50, + -52, + -110, + -125 + ], + [ + -6, + 87, + -42, + -112, + -70, + -1, + -80 + ], + [ + 122, + 67, + -40, + 115, + -45, + -93, + 112 + ], + [ + 117, + -48, + 24, + -84, + 36, + 48, + 53 + ] + ], + [ + [ + 17, + 52, + 14, + 81, + -83, + -5, + -22 + ], + [ + 8, + -92, + -46, + 116, + -102, + 34, + 42 + ], + [ + -7, + -120, + -120, + -58, + -102, + -104, + -88 + ], + [ + -80, + 86, + 35, + -121, + 32, + -94, + -21 + ], + [ + -119, + -105, + -95, + -18, + -10, + -38, + 30 + ], + [ + 56, + 58, + 20, + 11, + -3, + -68, + -4 + ], + [ + -126, + 119, + -34, + 65, + 116, + -1, + 92 + ], + [ + -6, + -95, + -122, + -94, + 113, + -7, + -47 + ], + [ + -14, + -63, + 94, + 127, + -107, + 55, + -43 + ], + [ + -116, + 108, + -113, + -76, + -122, + -8, + 25 + ] + ], + [ + [ + -46, + -110, + -99, + 110, + 78, + 111, + 7 + ], + [ + 11, + 73, + 29, + -17, + -54, + -4, + -112 + ], + [ + -79, + 60, + 94, + -102, + -104, + -107, + 74 + ], + [ + -49, + -45, + -125, + 120, + -17, + 76, + 53 + ], + [ + -92, + 77, + 12, + 26, + -77, + 88, + 110 + ], + [ + -24, + -105, + 89, + 99, + 1, + 20, + -71 + ], + [ + -111, + 113, + -5, + -58, + 49, + -122, + -108 + ], + [ + -66, + -13, + -35, + -81, + -39, + -43, + 6 + ], + [ + 16, + 98, + 78, + -54, + 103, + 5, + -80 + ], + [ + -41, + 61, + 82, + -33, + -88, + -79, + -102 + ] + ], + [ + [ + 50, + 0, + -13, + 44, + 84, + 75, + -93 + ], + [ + 22, + 97, + 70, + -44, + -28, + 99, + -120 + ], + [ + 6, + -99, + 101, + -119, + -123, + -44, + -77 + ], + [ + -2, + -52, + -37, + 16, + 15, + 111, + -5 + ], + [ + 16, + 45, + -84, + 42, + 92, + -47, + -83 + ], + [ + -40, + -58, + 21, + 93, + 24, + -96, + -48 + ], + [ + 48, + -44, + 22, + 49, + -44, + 37, + -27 + ], + [ + -94, + -33, + -16, + -128, + 100, + 7, + -119 + ], + [ + 94, + 90, + -125, + -87, + -35, + 1, + 57 + ], + [ + -20, + 28, + -126, + 40, + 106, + 6, + -12 + ] + ], + [ + [ + -52, + 116, + -120, + -55, + -93, + 93, + -5 + ], + [ + 108, + 42, + 14, + 4, + -77, + 15, + 47 + ], + [ + 119, + 12, + 112, + 113, + 5, + -16, + -92 + ], + [ + -60, + 97, + -93, + -27, + 50, + -67, + 121 + ], + [ + 38, + -121, + -65, + 61, + 92, + 109, + 89 + ], + [ + -109, + 58, + -100, + -109, + 49, + -6, + 37 + ], + [ + 89, + -111, + 7, + 85, + -16, + 5, + -1 + ], + [ + 104, + -116, + 96, + 80, + 80, + -23, + 4 + ], + [ + -34, + -64, + 96, + 1, + 57, + -103, + 73 + ], + [ + 40, + 127, + -94, + 10, + 2, + 9, + -115 + ] + ], + [ + [ + -7, + -52, + 30, + -69, + -17, + 30, + -112 + ], + [ + 73, + 55, + -114, + -112, + 89, + -56, + 92 + ], + [ + -1, + -41, + -58, + 40, + -100, + -25, + -40 + ], + [ + -89, + -38, + 7, + 45, + -106, + 95, + 96 + ], + [ + 49, + 108, + -19, + 82, + 58, + 16, + -83 + ], + [ + 14, + 102, + 124, + -14, + -65, + 63, + -109 + ], + [ + -90, + 15, + 125, + -44, + -15, + -46, + -16 + ], + [ + -127, + 24, + 24, + -48, + -61, + 66, + -80 + ], + [ + -116, + -118, + 97, + -35, + -102, + 97, + -90 + ], + [ + -42, + -123, + 45, + 51, + 65, + -61, + -45 + ] + ], + [ + [ + 112, + 82, + -119, + 49, + 80, + 15, + 35 + ], + [ + -128, + -121, + -120, + -88, + 125, + 34, + 72 + ], + [ + -53, + 112, + -78, + 102, + -121, + -123, + -108 + ], + [ + 74, + -63, + -13, + -8, + 74, + -39, + -127 + ], + [ + -30, + -55, + 59, + 64, + -105, + 75, + -110 + ], + [ + 30, + -29, + -51, + -5, + -49, + 75, + 119 + ], + [ + 80, + -16, + 0, + -14, + 75, + 13, + -9 + ], + [ + -24, + -32, + 13, + 48, + -18, + 78, + 83 + ], + [ + -19, + 104, + -84, + 110, + -53, + 16, + -56 + ], + [ + -15, + -41, + 52, + -108, + 86, + 103, + 16 + ] + ], + [ + [ + 12, + 51, + -78, + 63, + -73, + 45, + -50 + ], + [ + 63, + 74, + -75, + 30, + -1, + -53, + 22 + ], + [ + 126, + -128, + 116, + 91, + 7, + 28, + -34 + ], + [ + -95, + 18, + 80, + -69, + 55, + 63, + 66 + ], + [ + -41, + -28, + -22, + 90, + 102, + -23, + 120 + ], + [ + 18, + -30, + -128, + 28, + 37, + 119, + 55 + ], + [ + -121, + 17, + 62, + -1, + -19, + 79, + 28 + ], + [ + 46, + -10, + -57, + 4, + 117, + 26, + 53 + ], + [ + -97, + 124, + -66, + 120, + -14, + 107, + 100 + ], + [ + 65, + 106, + 28, + 89, + -84, + -111, + 11 + ] + ], + [ + [ + 79, + 67, + 7, + 5, + 28, + 94, + 87 + ], + [ + -100, + 24, + -31, + 76, + 1, + 125, + -18 + ], + [ + 45, + -101, + 110, + -89, + -32, + 86, + 119 + ], + [ + -4, + -4, + -116, + 122, + -124, + -122, + -7 + ], + [ + -128, + -86, + 32, + 52, + -52, + 75, + 27 + ], + [ + -70, + 54, + 23, + 79, + -89, + -69, + -51 + ], + [ + -41, + 99, + 59, + 11, + 10, + 98, + -14 + ], + [ + -71, + -93, + -44, + 39, + -8, + -21, + -6 + ], + [ + 121, + 127, + -87, + -99, + -66, + 90, + -11 + ], + [ + 93, + 37, + 13, + -56, + -40, + -91, + 4 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/test.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/test.json new file mode 100644 index 000000000..d5202a71c --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_KernelSmallerOne_1x12x10x7_i8_acci32_st11_kern-1-3_pad0000/test.json @@ -0,0 +1,72 @@ +{ + version: { + _major: 0, + _minor: 41, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "AVG_POOL2D", + attribute_type: "PoolAttribute", + attribute: { + pad: [ + 0, + 0, + 0, + 0 + ], + kernel: [ + -1, + -3 + ], + stride: [ + 1, + 1 + ], + input_zp: 49, + output_zp: -118, + accum_dtype: "INT32" + }, + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1, + 12, + 10, + 7 + ], + type: "INT8" + }, + { + name: "result-0", + shape: [ + 1, + 14, + 14, + 7 + ], + type: "INT8" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1