1 // clang-format off
2 // Generated file (from: dequantize_relaxed.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 0);
5   OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
6   // Phase 1, operands
7   auto op1 = model->addOperand(&type0);
8   auto op2 = model->addOperand(&type1);
9   // Phase 2, operations
10   model->addOperation(ANEURALNETWORKS_DEQUANTIZE, {op1}, {op2});
11   // Phase 3, inputs and outputs
12   model->identifyInputsAndOutputs(
13     {op1},
14     {op2});
15   // Phase 4: set relaxed execution
16   model->relaxComputationFloat32toFloat16(true);
17   assert(model->isValid());
18 }
19 
is_ignored(int i)20 inline bool is_ignored(int i) {
21   static std::set<int> ignore = {};
22   return ignore.find(i) != ignore.end();
23 }
24 
CreateModel_dynamic_output_shape(Model * model)25 void CreateModel_dynamic_output_shape(Model *model) {
26   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 0);
27   OperandType type2(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
28   // Phase 1, operands
29   auto op1 = model->addOperand(&type0);
30   auto op2 = model->addOperand(&type2);
31   // Phase 2, operations
32   model->addOperation(ANEURALNETWORKS_DEQUANTIZE, {op1}, {op2});
33   // Phase 3, inputs and outputs
34   model->identifyInputsAndOutputs(
35     {op1},
36     {op2});
37   // Phase 4: set relaxed execution
38   model->relaxComputationFloat32toFloat16(true);
39   assert(model->isValid());
40 }
41 
is_ignored_dynamic_output_shape(int i)42 inline bool is_ignored_dynamic_output_shape(int i) {
43   static std::set<int> ignore = {};
44   return ignore.find(i) != ignore.end();
45 }
46 
47