From d2d22b3e074fa6be55ca3d568540e820e50f44be Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Thu, 13 Oct 2022 12:50:09 +0100 Subject: Updating CONTROL_FLOW tests for FP16 and accumulator types Signed-off-by: Jeremy Johnson Change-Id: I4ae422b36f7867a762ea2940a332afa6c5c153a8 --- .../desc.json | 24 ++ .../input-1.json | 6 + .../input-2.json | 35 ++ .../test.json | 351 +++++++++++++++++++++ 4 files changed, 416 insertions(+) create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/desc.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-1.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-2.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/test.json (limited to 'operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4') diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/desc.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/desc.json new file mode 100644 index 000000000..86d046887 --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/desc.json @@ -0,0 +1,24 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-1", + "input-2" + ], + "ifm_file": [ + "input-1.npy", + "input-2.npy" + ], + "ofm_name": [ + "layer-3" + ], + "ofm_file": [ + "layer-3.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "Input list does not match body graph input", + "profile": [ + "tosa-bi", + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-1.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-1.json new file mode 100644 index 000000000..a76a8b1e4 --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-1.json @@ -0,0 +1,6 @@ +{ + "type": "int32", + "data": [ + 4 + ] +} \ No newline at end of file diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-2.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-2.json new file mode 100644 index 000000000..ae8131cae --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/input-2.json @@ -0,0 +1,35 @@ +{ + "type": "int32", + "data": [ + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ] + ] +} \ No newline at end of file diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/test.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/test.json new file mode 100644 index 000000000..99729332d --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphInputMismatch_6x3_i32_iter4/test.json @@ -0,0 +1,351 @@ +{ + version: { + _major: 0, + _minor: 41, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "const-0" + ] + }, + { + op: "WHILE_LOOP", + attribute_type: "WhileLoopAttribute", + attribute: { + cond_branch: "COND_BLOCK", + body_branch: "BODY_BLOCK" + }, + inputs: [ + "input-1", + "const-0", + "input-2" + ], + outputs: [ + "layer-1", + "layer-2", + "layer-3" + ] + } + ], + tensors: [ + { + name: "const-0", + shape: [ + 6, + 3 + ], + type: "INT32", + data: [ + 212, + 103, + 0, + 0, + 205, + 151, + 255, + 255, + 124, + 97, + 0, + 0, + 109, + 213, + 255, + 255, + 168, + 243, + 255, + 255, + 119, + 233, + 255, + 255, + 184, + 200, + 255, + 255, + 146, + 96, + 0, + 0, + 78, + 35, + 0, + 0, + 139, + 119, + 0, + 0, + 103, + 116, + 0, + 0, + 117, + 235, + 255, + 255, + 31, + 58, + 0, + 0, + 154, + 0, + 0, + 0, + 174, + 254, + 255, + 255, + 89, + 61, + 0, + 0, + 85, + 48, + 0, + 0, + 104, + 105, + 0, + 0 + ] + }, + { + name: "input-1", + shape: [ + + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 6, + 3 + ], + type: "INT32" + }, + { + name: "layer-1", + shape: [ + + ], + type: "INT32" + }, + { + name: "layer-2", + shape: [ + 6, + 3 + ], + type: "INT32" + }, + { + name: "layer-3", + shape: [ + 6, + 3 + ], + type: "INT32" + } + ], + inputs: [ + "input-1", + "input-2" + ], + outputs: [ + "layer-3" + ] + }, + { + name: "COND_BLOCK", + operators: [ + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "const-3" + ] + }, + { + op: "GREATER", + attribute_type: "NONE", + inputs: [ + "input-1", + "const-3" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-1", + shape: [ + + ], + type: "INT32" + }, + { + name: "const-0", + shape: [ + 6, + 3 + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 6, + 3 + ], + type: "INT32" + }, + { + name: "const-3", + shape: [ + + ], + type: "INT32", + data: [ + 0, + 0, + 0, + 0 + ] + }, + { + name: "result-0", + shape: [ + + ], + type: "BOOL" + } + ], + inputs: [ + "input-1", + "const-0", + "input-2" + ], + outputs: [ + "result-0" + ] + }, + { + name: "BODY_BLOCK", + operators: [ + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "const-4" + ] + }, + { + op: "ADD", + attribute_type: "NONE", + inputs: [ + "const-0", + "input-2" + ], + outputs: [ + "layer-5" + ] + }, + { + op: "SUB", + attribute_type: "NONE", + inputs: [ + "input-1", + "const-4" + ], + outputs: [ + "layer-4" + ] + } + ], + tensors: [ + { + name: "input-1", + shape: [ + 3 + ], + type: "INT32" + }, + { + name: "const-0", + shape: [ + 6, + 3 + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 8, + 6 + ], + type: "INT32" + }, + { + name: "const-4", + shape: [ + + ], + type: "INT32", + data: [ + 1, + 0, + 0, + 0 + ] + }, + { + name: "layer-4", + shape: [ + + ], + type: "INT32" + }, + { + name: "layer-5", + shape: [ + 6, + 3 + ], + type: "INT32" + } + ], + inputs: [ + "input-1", + "const-0", + "input-2" + ], + outputs: [ + "layer-4", + "const-0", + "layer-5" + ] + } + ] +} -- cgit v1.2.1