From 3dd7bf887d5d04d98bc19b845f43cd3000b1d407 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Fri, 17 Jun 2022 13:06:10 +0100 Subject: Updating WHILE_LOOP tests for v0.30.0 release Signed-off-by: Jeremy Johnson Change-Id: Id220e001bd6ddfc8b06f8530a0b3bc1ed647c373 --- .../desc.json | 20 + .../input-1.json | 6 + .../input-2.json | 125 ++++ .../test.json | 639 +++++++++++++++++++++ 4 files changed, 790 insertions(+) create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/desc.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-1.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-2.json create mode 100644 operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/test.json (limited to 'operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0') diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/desc.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/desc.json new file mode 100644 index 000000000..420d32858 --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/desc.json @@ -0,0 +1,20 @@ +{ + "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 output" +} \ No newline at end of file diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-1.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-1.json new file mode 100644 index 000000000..c795012dc --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-1.json @@ -0,0 +1,6 @@ +{ + "type": "int32", + "data": [ + 0 + ] +} \ No newline at end of file diff --git a/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-2.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-2.json new file mode 100644 index 000000000..5423c16c0 --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/input-2.json @@ -0,0 +1,125 @@ +{ + "type": "int32", + "data": [ + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 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_InputListBodyGraphOutputMismatch_15x6_i32_iter0/test.json b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/test.json new file mode 100644 index 000000000..034bffe65 --- /dev/null +++ b/operators/control_flow/while_loop/while_loop_ERRORIF_InputListBodyGraphOutputMismatch_15x6_i32_iter0/test.json @@ -0,0 +1,639 @@ +{ + version: { + _major: 0, + _minor: 30, + _patch: 0, + _draft: false + }, + 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: [ + 15, + 6 + ], + type: "INT32", + data: [ + 152, + 231, + 255, + 255, + 37, + 29, + 0, + 0, + 78, + 235, + 255, + 255, + 84, + 92, + 0, + 0, + 19, + 129, + 255, + 255, + 68, + 9, + 0, + 0, + 4, + 156, + 255, + 255, + 228, + 72, + 0, + 0, + 79, + 10, + 0, + 0, + 91, + 98, + 0, + 0, + 180, + 142, + 255, + 255, + 121, + 58, + 0, + 0, + 106, + 119, + 0, + 0, + 59, + 194, + 255, + 255, + 178, + 232, + 255, + 255, + 15, + 75, + 0, + 0, + 175, + 31, + 0, + 0, + 249, + 131, + 255, + 255, + 8, + 160, + 255, + 255, + 134, + 203, + 255, + 255, + 89, + 151, + 255, + 255, + 5, + 110, + 0, + 0, + 2, + 224, + 255, + 255, + 117, + 73, + 0, + 0, + 243, + 47, + 0, + 0, + 217, + 70, + 0, + 0, + 153, + 167, + 255, + 255, + 204, + 195, + 255, + 255, + 138, + 94, + 0, + 0, + 145, + 117, + 0, + 0, + 192, + 48, + 0, + 0, + 73, + 238, + 255, + 255, + 46, + 135, + 255, + 255, + 206, + 130, + 255, + 255, + 205, + 74, + 0, + 0, + 188, + 247, + 255, + 255, + 151, + 117, + 0, + 0, + 44, + 128, + 255, + 255, + 163, + 185, + 255, + 255, + 164, + 112, + 0, + 0, + 91, + 83, + 0, + 0, + 97, + 12, + 0, + 0, + 97, + 166, + 255, + 255, + 11, + 53, + 0, + 0, + 200, + 175, + 255, + 255, + 238, + 148, + 255, + 255, + 13, + 133, + 255, + 255, + 23, + 208, + 255, + 255, + 196, + 132, + 255, + 255, + 136, + 219, + 255, + 255, + 193, + 144, + 255, + 255, + 246, + 224, + 255, + 255, + 128, + 117, + 0, + 0, + 86, + 171, + 255, + 255, + 107, + 186, + 255, + 255, + 229, + 155, + 255, + 255, + 177, + 123, + 0, + 0, + 21, + 14, + 0, + 0, + 24, + 59, + 0, + 0, + 230, + 177, + 255, + 255, + 108, + 179, + 255, + 255, + 18, + 163, + 255, + 255, + 231, + 253, + 255, + 255, + 135, + 98, + 0, + 0, + 70, + 85, + 0, + 0, + 218, + 97, + 0, + 0, + 9, + 58, + 0, + 0, + 197, + 45, + 0, + 0, + 130, + 42, + 0, + 0, + 139, + 8, + 0, + 0, + 101, + 186, + 255, + 255, + 155, + 34, + 0, + 0, + 88, + 134, + 255, + 255, + 228, + 99, + 0, + 0, + 14, + 145, + 255, + 255, + 210, + 215, + 255, + 255, + 200, + 72, + 0, + 0, + 148, + 90, + 0, + 0, + 255, + 84, + 0, + 0, + 28, + 51, + 0, + 0, + 97, + 149, + 255, + 255, + 235, + 184, + 255, + 255, + 52, + 13, + 0, + 0, + 103, + 123, + 0, + 0, + 55, + 93, + 0, + 0, + 105, + 200, + 255, + 255, + 35, + 208, + 255, + 255, + 177, + 195, + 255, + 255, + 252, + 70, + 0, + 0, + 96, + 210, + 255, + 255 + ] + }, + { + name: "input-1", + shape: [ + + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 15, + 6 + ], + type: "INT32" + }, + { + name: "layer-1", + shape: [ + + ], + type: "INT32" + }, + { + name: "layer-2", + shape: [ + 15, + 6 + ], + type: "INT32" + }, + { + name: "layer-3", + shape: [ + 15, + 6 + ], + 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: [ + 15, + 6 + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 15, + 6 + ], + 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: [ + + ], + type: "INT32" + }, + { + name: "const-0", + shape: [ + 15, + 6 + ], + type: "INT32" + }, + { + name: "input-2", + shape: [ + 15, + 6 + ], + type: "INT32" + }, + { + name: "const-4", + shape: [ + + ], + type: "INT32", + data: [ + 1, + 0, + 0, + 0 + ] + }, + { + name: "layer-4", + shape: [ + 2 + ], + type: "INT32" + }, + { + name: "layer-5", + shape: [ + 18, + 8 + ], + type: "INT32" + } + ], + inputs: [ + "input-1", + "const-0", + "input-2" + ], + outputs: [ + "layer-4", + "const-0", + "layer-5" + ] + } + ] +} -- cgit v1.2.1