1 // Generated file (from: concat_float_1_relaxed.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3 OperandType type1(Type::INT32, {});
4 OperandType type0(Type::TENSOR_FLOAT32, {2, 3});
5 OperandType type2(Type::TENSOR_FLOAT32, {4, 3});
6 // Phase 1, operands
7 auto op1 = model->addOperand(&type0);
8 auto op2 = model->addOperand(&type0);
9 auto axis0 = model->addOperand(&type1);
10 auto result = model->addOperand(&type2);
11 // Phase 2, operations
12 static int32_t axis0_init[] = {0};
13 model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
14 model->addOperation(ANEURALNETWORKS_CONCATENATION, {op1, op2, axis0}, {result});
15 // Phase 3, inputs and outputs
16 model->identifyInputsAndOutputs(
17 {op1, op2},
18 {result});
19 // Phase 4: set relaxed execution
20 model->relaxComputationFloat32toFloat16(true);
21 assert(model->isValid());
22 }
23
is_ignored(int i)24 bool is_ignored(int i) {
25 static std::set<int> ignore = {};
26 return ignore.find(i) != ignore.end();
27 }
28