From 6dad592daec2aeed4473a084f54e60f088597fe4 Mon Sep 17 00:00:00 2001 From: James Ward Date: Fri, 3 Feb 2023 13:02:00 +0000 Subject: Create MI tests for Tensors: AVG_POOL2D, FULLY_CONNECTED, MATMUL Signed-off-by: James Ward Change-Id: I3bf038baba78bd9a54b33e6c718e02ff5eae37ad --- .../desc.json | 21 +++ .../input-0.json | 208 +++++++++++++++++++++ .../test.json | 77 ++++++++ 3 files changed, 306 insertions(+) create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/desc.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/input-0.json create mode 100644 operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/test.json (limited to 'operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000') diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/desc.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/desc.json new file mode 100644 index 000000000..59c8fbad4 --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/desc.json @@ -0,0 +1,21 @@ +{ + "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 stride dimension is smaller than zero", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/input-0.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/input-0.json new file mode 100644 index 000000000..569b22c16 --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/input-0.json @@ -0,0 +1,208 @@ +{ + "type": "float32", + "data": [ + [ + [ + [ + 0.8776727318763733, + 0.6620364785194397, + 0.7349172830581665, + 0.013570088893175125, + 0.427511990070343, + 0.31782063841819763, + 0.8519253730773926, + 0.953869640827179, + 0.4233408570289612, + 0.9730606079101562, + 0.014359204098582268 + ], + [ + 0.32571941614151, + 0.7749311923980713, + 0.3600996434688568, + 0.9209623336791992, + 0.2184648960828781, + 0.7956667542457581, + 0.20170225203037262, + 0.19710491597652435, + 0.4457493722438812, + 0.9449405670166016, + 0.5854549407958984 + ], + [ + 0.6350328922271729, + 0.00973267201334238, + 0.056615203619003296, + 0.0669340267777443, + 0.819642186164856, + 0.23685212433338165, + 0.32883819937705994, + 0.6099528074264526, + 0.5839543342590332, + 0.4105294942855835, + 0.00430020596832037 + ], + [ + 0.44960257411003113, + 0.7388826012611389, + 0.23523931205272675, + 0.7083579897880554, + 0.015152819454669952, + 0.908007800579071, + 0.9500392079353333, + 0.002461483469232917, + 0.4578184187412262, + 0.4138219356536865, + 0.8418833613395691 + ], + [ + 0.540721595287323, + 0.6113654971122742, + 0.20250600576400757, + 0.07706467062234879, + 0.692331075668335, + 0.6206759810447693, + 0.832328736782074, + 0.8446834683418274, + 0.6310352683067322, + 0.5383613705635071, + 0.9140082597732544 + ] + ], + [ + [ + 0.8012641072273254, + 0.8824250102043152, + 0.9958409070968628, + 0.403505802154541, + 0.7169346809387207, + 0.6880677938461304, + 0.1741427183151245, + 0.6365485787391663, + 0.4280892610549927, + 0.4506355822086334, + 0.1801379919052124 + ], + [ + 0.7447393536567688, + 0.69794100522995, + 0.5322901606559753, + 0.15671919286251068, + 0.5568647980690002, + 0.10013341903686523, + 0.33937203884124756, + 0.3723578453063965, + 0.8834254145622253, + 0.41556206345558167, + 0.5984698534011841 + ], + [ + 0.8747789859771729, + 0.4257594347000122, + 0.8837035298347473, + 0.1364613175392151, + 0.3648431599140167, + 0.09472724795341492, + 0.5609296560287476, + 0.9572820663452148, + 0.6569518446922302, + 0.6260756254196167, + 0.27815863490104675 + ], + [ + 0.9311067461967468, + 0.471534788608551, + 0.26700204610824585, + 0.9876999855041504, + 0.42312392592430115, + 0.3714989721775055, + 0.0349612683057785, + 0.17829497158527374, + 0.8091913461685181, + 0.4826951026916504, + 0.9548747539520264 + ], + [ + 0.0838858038187027, + 0.615943431854248, + 0.7199841737747192, + 0.6211830973625183, + 0.5298775434494019, + 0.5782983303070068, + 0.6895495653152466, + 0.8632635474205017, + 0.3363446295261383, + 0.4596540927886963, + 0.6359095573425293 + ] + ], + [ + [ + 0.3142159581184387, + 0.1787828654050827, + 0.9661687612533569, + 0.19472889602184296, + 0.2327331006526947, + 0.6186860799789429, + 0.07736831158399582, + 0.034047652035951614, + 0.06401360034942627, + 0.1232636421918869, + 0.42919686436653137 + ], + [ + 0.8292606472969055, + 0.34197190403938293, + 0.4275314211845398, + 0.6002510786056519, + 0.30214443802833557, + 0.43253788352012634, + 0.38631168007850647, + 0.3418835401535034, + 0.3883931636810303, + 0.01111771073192358, + 0.8862606883049011 + ], + [ + 0.9773467779159546, + 0.8624961972236633, + 0.005742274224758148, + 0.750885546207428, + 0.5731001496315002, + 0.09417491406202316, + 0.9328591227531433, + 0.7762171030044556, + 0.14529629051685333, + 0.9640414118766785, + 0.12619875371456146 + ], + [ + 0.4546798765659332, + 0.1589757353067398, + 0.1501908004283905, + 0.9678057432174683, + 0.5721227526664734, + 0.2591749131679535, + 0.7763993740081787, + 0.8752443790435791, + 0.9176039099693298, + 0.9329849481582642, + 0.9055818319320679 + ], + [ + 0.6389324069023132, + 0.34246665239334106, + 0.9255676865577698, + 0.12249653041362762, + 0.16879981756210327, + 0.43382754921913147, + 0.2836649417877197, + 0.6157327890396118, + 0.9053019285202026, + 0.49103131890296936, + 0.5538706183433533 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/test.json b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/test.json new file mode 100644 index 000000000..4fe16b46f --- /dev/null +++ b/operators/tensor/avg_pool2d/avg_pool2d_ERRORIF_StrideSmallerOne_1x3x5x11_f32_accf32_st-2-2_kern22_pad0000/test.json @@ -0,0 +1,77 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + regions: [ + { + name: "main", + blocks: [ + { + name: "main", + operators: [ + { + op: "AVG_POOL2D", + attribute_type: "PoolAttribute", + attribute: { + pad: [ + 0, + 0, + 0, + 0 + ], + kernel: [ + 2, + 2 + ], + stride: [ + -2, + -2 + ], + input_zp: 0, + output_zp: 0, + accum_dtype: "FP32" + }, + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1, + 3, + 5, + 11 + ], + type: "FP32" + }, + { + name: "result-0", + shape: [ + 1, + 1, + 1, + 11 + ], + type: "FP32" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] + } + ] +} -- cgit v1.2.1