1 // clang-format off
2 // Generated file (from: concat_float_2_relaxed.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4   OperandType type0(Type::TENSOR_FLOAT32, {52, 230});
5   OperandType type1(Type::TENSOR_FLOAT32, {40, 230});
6   OperandType type2(Type::INT32, {});
7   OperandType type3(Type::TENSOR_FLOAT32, {92, 230});
8   // Phase 1, operands
9   auto input1 = model->addOperand(&type0);
10   auto input2 = model->addOperand(&type1);
11   auto axis0 = model->addOperand(&type2);
12   auto output = model->addOperand(&type3);
13   // Phase 2, operations
14   static int32_t axis0_init[] = {0};
15   model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
16   model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis0}, {output});
17   // Phase 3, inputs and outputs
18   model->identifyInputsAndOutputs(
19     {input1, input2},
20     {output});
21   // Phase 4: set relaxed execution
22   model->relaxComputationFloat32toFloat16(true);
23   assert(model->isValid());
24 }
25 
is_ignored(int i)26 inline bool is_ignored(int i) {
27   static std::set<int> ignore = {};
28   return ignore.find(i) != ignore.end();
29 }
30 
CreateModel_dynamic_output_shape(Model * model)31 void CreateModel_dynamic_output_shape(Model *model) {
32   OperandType type0(Type::TENSOR_FLOAT32, {52, 230});
33   OperandType type1(Type::TENSOR_FLOAT32, {40, 230});
34   OperandType type2(Type::INT32, {});
35   OperandType type4(Type::TENSOR_FLOAT32, {0, 0});
36   // Phase 1, operands
37   auto input1 = model->addOperand(&type0);
38   auto input2 = model->addOperand(&type1);
39   auto axis0 = model->addOperand(&type2);
40   auto output = model->addOperand(&type4);
41   // Phase 2, operations
42   static int32_t axis0_init[] = {0};
43   model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
44   model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis0}, {output});
45   // Phase 3, inputs and outputs
46   model->identifyInputsAndOutputs(
47     {input1, input2},
48     {output});
49   // Phase 4: set relaxed execution
50   model->relaxComputationFloat32toFloat16(true);
51   assert(model->isValid());
52 }
53 
is_ignored_dynamic_output_shape(int i)54 inline bool is_ignored_dynamic_output_shape(int i) {
55   static std::set<int> ignore = {};
56   return ignore.find(i) != ignore.end();
57 }
58 
59