diff options
Diffstat (limited to 'operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0')
4 files changed, 296 insertions, 0 deletions
diff --git a/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/desc.json b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/desc.json new file mode 100644 index 000000000..5e04ea1ea --- /dev/null +++ b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/desc.json @@ -0,0 +1,24 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0", + "input-1" + ], + "ifm_file": [ + "input-0.npy", + "input-1.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "Conditional tensor is not equal to a size of one", + "profile": [ + "tosa-bi", + "tosa-mi" + ] +}
\ No newline at end of file diff --git a/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-0.json b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-0.json new file mode 100644 index 000000000..773d37230 --- /dev/null +++ b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-0.json @@ -0,0 +1,45 @@ +{ + "type": "int32", + "data": [ + [ + 0, + 22 + ], + [ + 6, + 7 + ], + [ + 18, + 17 + ], + [ + 15, + 14 + ], + [ + 12, + 29 + ], + [ + 24, + 28 + ], + [ + 7, + 5 + ], + [ + 26, + 2 + ], + [ + 26, + 28 + ], + [ + 12, + 19 + ] + ] +}
\ No newline at end of file diff --git a/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-1.json b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-1.json new file mode 100644 index 000000000..b56f31399 --- /dev/null +++ b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/input-1.json @@ -0,0 +1,45 @@ +{ + "type": "int32", + "data": [ + [ + 15, + 15 + ], + [ + 2, + 15 + ], + [ + 25, + 18 + ], + [ + 10, + 17 + ], + [ + 31, + 0 + ], + [ + 0, + 20 + ], + [ + 5, + 31 + ], + [ + 11, + 0 + ], + [ + 25, + 21 + ], + [ + 18, + 16 + ] + ] +}
\ No newline at end of file diff --git a/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/test.json b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/test.json new file mode 100644 index 000000000..f4d4bd27e --- /dev/null +++ b/operators/control_flow/cond_if_binary/cond_if_binary_ERRORIF_CondIfCondShapeNotSizeOne_10x2_i16_cond0/test.json @@ -0,0 +1,182 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "const-2" + ] + }, + { + op: "COND_IF", + attribute_type: "CondIfAttribute", + attribute: { + then_branch: "THEN_BLOCK", + else_branch: "ELSE_BLOCK" + }, + inputs: [ + "const-2", + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "input-1", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "const-2", + shape: [ + 2 + ], + type: "BOOL", + data: [ + 0 + ] + }, + { + name: "result-0", + shape: [ + 10, + 2 + ], + type: "INT16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + }, + { + name: "THEN_BLOCK", + operators: [ + { + op: "LOGICAL_RIGHT_SHIFT", + attribute_type: "NONE", + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-1" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "input-1", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "result-1", + shape: [ + 10, + 2 + ], + type: "INT16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-1" + ] + }, + { + name: "ELSE_BLOCK", + operators: [ + { + op: "LOGICAL_LEFT_SHIFT", + attribute_type: "NONE", + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-2" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "input-1", + shape: [ + 10, + 2 + ], + type: "INT16" + }, + { + name: "result-2", + shape: [ + 10, + 2 + ], + type: "INT16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-2" + ] + } + ] +} |