Home | History | Annotate | Download | only in models
      1 // clang-format off
      2 // Generated file (from: select_v1_2.mod.py). Do not edit
      3 void CreateModel(Model *model) {
      4   OperandType type0(Type::TENSOR_BOOL8, {3});
      5   OperandType type1(Type::TENSOR_FLOAT32, {3});
      6   // Phase 1, operands
      7   auto input0 = model->addOperand(&type0);
      8   auto input1 = model->addOperand(&type1);
      9   auto input2 = model->addOperand(&type1);
     10   auto output0 = model->addOperand(&type1);
     11   // Phase 2, operations
     12   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
     13   // Phase 3, inputs and outputs
     14   model->identifyInputsAndOutputs(
     15     {input0, input1, input2},
     16     {output0});
     17   assert(model->isValid());
     18 }
     19 
     20 inline bool is_ignored(int i) {
     21   static std::set<int> ignore = {};
     22   return ignore.find(i) != ignore.end();
     23 }
     24 
     25 void CreateModel_int32(Model *model) {
     26   OperandType type0(Type::TENSOR_BOOL8, {3});
     27   OperandType type6(Type::TENSOR_INT32, {3});
     28   // Phase 1, operands
     29   auto input0 = model->addOperand(&type0);
     30   auto input1 = model->addOperand(&type6);
     31   auto input2 = model->addOperand(&type6);
     32   auto output0 = model->addOperand(&type6);
     33   // Phase 2, operations
     34   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
     35   // Phase 3, inputs and outputs
     36   model->identifyInputsAndOutputs(
     37     {input0, input1, input2},
     38     {output0});
     39   assert(model->isValid());
     40 }
     41 
     42 inline bool is_ignored_int32(int i) {
     43   static std::set<int> ignore = {};
     44   return ignore.find(i) != ignore.end();
     45 }
     46 
     47 void CreateModel_float16(Model *model) {
     48   OperandType type0(Type::TENSOR_BOOL8, {3});
     49   OperandType type7(Type::TENSOR_FLOAT16, {3});
     50   // Phase 1, operands
     51   auto input0 = model->addOperand(&type0);
     52   auto input1 = model->addOperand(&type7);
     53   auto input2 = model->addOperand(&type7);
     54   auto output0 = model->addOperand(&type7);
     55   // Phase 2, operations
     56   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
     57   // Phase 3, inputs and outputs
     58   model->identifyInputsAndOutputs(
     59     {input0, input1, input2},
     60     {output0});
     61   assert(model->isValid());
     62 }
     63 
     64 inline bool is_ignored_float16(int i) {
     65   static std::set<int> ignore = {};
     66   return ignore.find(i) != ignore.end();
     67 }
     68 
     69 void CreateModel_relaxed(Model *model) {
     70   OperandType type0(Type::TENSOR_BOOL8, {3});
     71   OperandType type1(Type::TENSOR_FLOAT32, {3});
     72   // Phase 1, operands
     73   auto input0 = model->addOperand(&type0);
     74   auto input1 = model->addOperand(&type1);
     75   auto input2 = model->addOperand(&type1);
     76   auto output0 = model->addOperand(&type1);
     77   // Phase 2, operations
     78   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
     79   // Phase 3, inputs and outputs
     80   model->identifyInputsAndOutputs(
     81     {input0, input1, input2},
     82     {output0});
     83   // Phase 4: set relaxed execution
     84   model->relaxComputationFloat32toFloat16(true);
     85   assert(model->isValid());
     86 }
     87 
     88 inline bool is_ignored_relaxed(int i) {
     89   static std::set<int> ignore = {};
     90   return ignore.find(i) != ignore.end();
     91 }
     92 
     93 void CreateModel_quant8(Model *model) {
     94   OperandType type0(Type::TENSOR_BOOL8, {3});
     95   OperandType type10(Type::TENSOR_QUANT8_ASYMM, {3}, 1.0f, 128);
     96   OperandType type8(Type::TENSOR_QUANT8_ASYMM, {3}, 1.5f, 129);
     97   OperandType type9(Type::TENSOR_QUANT8_ASYMM, {3}, 0.5f, 127);
     98   // Phase 1, operands
     99   auto input0 = model->addOperand(&type0);
    100   auto input1 = model->addOperand(&type8);
    101   auto input2 = model->addOperand(&type9);
    102   auto output0 = model->addOperand(&type10);
    103   // Phase 2, operations
    104   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    105   // Phase 3, inputs and outputs
    106   model->identifyInputsAndOutputs(
    107     {input0, input1, input2},
    108     {output0});
    109   assert(model->isValid());
    110 }
    111 
    112 inline bool is_ignored_quant8(int i) {
    113   static std::set<int> ignore = {};
    114   return ignore.find(i) != ignore.end();
    115 }
    116 
    117 void CreateModel_dynamic_output_shape(Model *model) {
    118   OperandType type0(Type::TENSOR_BOOL8, {3});
    119   OperandType type1(Type::TENSOR_FLOAT32, {3});
    120   OperandType type11(Type::TENSOR_FLOAT32, {0});
    121   // Phase 1, operands
    122   auto input0 = model->addOperand(&type0);
    123   auto input1 = model->addOperand(&type1);
    124   auto input2 = model->addOperand(&type1);
    125   auto output0 = model->addOperand(&type11);
    126   // Phase 2, operations
    127   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    128   // Phase 3, inputs and outputs
    129   model->identifyInputsAndOutputs(
    130     {input0, input1, input2},
    131     {output0});
    132   assert(model->isValid());
    133 }
    134 
    135 inline bool is_ignored_dynamic_output_shape(int i) {
    136   static std::set<int> ignore = {};
    137   return ignore.find(i) != ignore.end();
    138 }
    139 
    140 void CreateModel_dynamic_output_shape_int32(Model *model) {
    141   OperandType type0(Type::TENSOR_BOOL8, {3});
    142   OperandType type12(Type::TENSOR_INT32, {0});
    143   OperandType type6(Type::TENSOR_INT32, {3});
    144   // Phase 1, operands
    145   auto input0 = model->addOperand(&type0);
    146   auto input1 = model->addOperand(&type6);
    147   auto input2 = model->addOperand(&type6);
    148   auto output0 = model->addOperand(&type12);
    149   // Phase 2, operations
    150   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    151   // Phase 3, inputs and outputs
    152   model->identifyInputsAndOutputs(
    153     {input0, input1, input2},
    154     {output0});
    155   assert(model->isValid());
    156 }
    157 
    158 inline bool is_ignored_dynamic_output_shape_int32(int i) {
    159   static std::set<int> ignore = {};
    160   return ignore.find(i) != ignore.end();
    161 }
    162 
    163 void CreateModel_dynamic_output_shape_float16(Model *model) {
    164   OperandType type0(Type::TENSOR_BOOL8, {3});
    165   OperandType type13(Type::TENSOR_FLOAT16, {0});
    166   OperandType type7(Type::TENSOR_FLOAT16, {3});
    167   // Phase 1, operands
    168   auto input0 = model->addOperand(&type0);
    169   auto input1 = model->addOperand(&type7);
    170   auto input2 = model->addOperand(&type7);
    171   auto output0 = model->addOperand(&type13);
    172   // Phase 2, operations
    173   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    174   // Phase 3, inputs and outputs
    175   model->identifyInputsAndOutputs(
    176     {input0, input1, input2},
    177     {output0});
    178   assert(model->isValid());
    179 }
    180 
    181 inline bool is_ignored_dynamic_output_shape_float16(int i) {
    182   static std::set<int> ignore = {};
    183   return ignore.find(i) != ignore.end();
    184 }
    185 
    186 void CreateModel_dynamic_output_shape_relaxed(Model *model) {
    187   OperandType type0(Type::TENSOR_BOOL8, {3});
    188   OperandType type1(Type::TENSOR_FLOAT32, {3});
    189   OperandType type11(Type::TENSOR_FLOAT32, {0});
    190   // Phase 1, operands
    191   auto input0 = model->addOperand(&type0);
    192   auto input1 = model->addOperand(&type1);
    193   auto input2 = model->addOperand(&type1);
    194   auto output0 = model->addOperand(&type11);
    195   // Phase 2, operations
    196   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    197   // Phase 3, inputs and outputs
    198   model->identifyInputsAndOutputs(
    199     {input0, input1, input2},
    200     {output0});
    201   // Phase 4: set relaxed execution
    202   model->relaxComputationFloat32toFloat16(true);
    203   assert(model->isValid());
    204 }
    205 
    206 inline bool is_ignored_dynamic_output_shape_relaxed(int i) {
    207   static std::set<int> ignore = {};
    208   return ignore.find(i) != ignore.end();
    209 }
    210 
    211 void CreateModel_dynamic_output_shape_quant8(Model *model) {
    212   OperandType type0(Type::TENSOR_BOOL8, {3});
    213   OperandType type14(Type::TENSOR_QUANT8_ASYMM, {0}, 1.0f, 128);
    214   OperandType type8(Type::TENSOR_QUANT8_ASYMM, {3}, 1.5f, 129);
    215   OperandType type9(Type::TENSOR_QUANT8_ASYMM, {3}, 0.5f, 127);
    216   // Phase 1, operands
    217   auto input0 = model->addOperand(&type0);
    218   auto input1 = model->addOperand(&type8);
    219   auto input2 = model->addOperand(&type9);
    220   auto output0 = model->addOperand(&type14);
    221   // Phase 2, operations
    222   model->addOperation(ANEURALNETWORKS_SELECT, {input0, input1, input2}, {output0});
    223   // Phase 3, inputs and outputs
    224   model->identifyInputsAndOutputs(
    225     {input0, input1, input2},
    226     {output0});
    227   assert(model->isValid());
    228 }
    229 
    230 inline bool is_ignored_dynamic_output_shape_quant8(int i) {
    231   static std::set<int> ignore = {};
    232   return ignore.find(i) != ignore.end();
    233 }
    234 
    235 void CreateModel_2(Model *model) {
    236   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    237   OperandType type3(Type::TENSOR_FLOAT32, {2, 2});
    238   // Phase 1, operands
    239   auto input01 = model->addOperand(&type2);
    240   auto input11 = model->addOperand(&type3);
    241   auto input21 = model->addOperand(&type3);
    242   auto output01 = model->addOperand(&type3);
    243   // Phase 2, operations
    244   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    245   // Phase 3, inputs and outputs
    246   model->identifyInputsAndOutputs(
    247     {input01, input11, input21},
    248     {output01});
    249   assert(model->isValid());
    250 }
    251 
    252 inline bool is_ignored_2(int i) {
    253   static std::set<int> ignore = {};
    254   return ignore.find(i) != ignore.end();
    255 }
    256 
    257 void CreateModel_int32_2(Model *model) {
    258   OperandType type15(Type::TENSOR_INT32, {2, 2});
    259   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    260   // Phase 1, operands
    261   auto input01 = model->addOperand(&type2);
    262   auto input11 = model->addOperand(&type15);
    263   auto input21 = model->addOperand(&type15);
    264   auto output01 = model->addOperand(&type15);
    265   // Phase 2, operations
    266   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    267   // Phase 3, inputs and outputs
    268   model->identifyInputsAndOutputs(
    269     {input01, input11, input21},
    270     {output01});
    271   assert(model->isValid());
    272 }
    273 
    274 inline bool is_ignored_int32_2(int i) {
    275   static std::set<int> ignore = {};
    276   return ignore.find(i) != ignore.end();
    277 }
    278 
    279 void CreateModel_float16_2(Model *model) {
    280   OperandType type16(Type::TENSOR_FLOAT16, {2, 2});
    281   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    282   // Phase 1, operands
    283   auto input01 = model->addOperand(&type2);
    284   auto input11 = model->addOperand(&type16);
    285   auto input21 = model->addOperand(&type16);
    286   auto output01 = model->addOperand(&type16);
    287   // Phase 2, operations
    288   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    289   // Phase 3, inputs and outputs
    290   model->identifyInputsAndOutputs(
    291     {input01, input11, input21},
    292     {output01});
    293   assert(model->isValid());
    294 }
    295 
    296 inline bool is_ignored_float16_2(int i) {
    297   static std::set<int> ignore = {};
    298   return ignore.find(i) != ignore.end();
    299 }
    300 
    301 void CreateModel_relaxed_2(Model *model) {
    302   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    303   OperandType type3(Type::TENSOR_FLOAT32, {2, 2});
    304   // Phase 1, operands
    305   auto input01 = model->addOperand(&type2);
    306   auto input11 = model->addOperand(&type3);
    307   auto input21 = model->addOperand(&type3);
    308   auto output01 = model->addOperand(&type3);
    309   // Phase 2, operations
    310   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    311   // Phase 3, inputs and outputs
    312   model->identifyInputsAndOutputs(
    313     {input01, input11, input21},
    314     {output01});
    315   // Phase 4: set relaxed execution
    316   model->relaxComputationFloat32toFloat16(true);
    317   assert(model->isValid());
    318 }
    319 
    320 inline bool is_ignored_relaxed_2(int i) {
    321   static std::set<int> ignore = {};
    322   return ignore.find(i) != ignore.end();
    323 }
    324 
    325 void CreateModel_quant8_2(Model *model) {
    326   OperandType type17(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 1.5f, 129);
    327   OperandType type18(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 0.5f, 127);
    328   OperandType type19(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 1.0f, 128);
    329   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    330   // Phase 1, operands
    331   auto input01 = model->addOperand(&type2);
    332   auto input11 = model->addOperand(&type17);
    333   auto input21 = model->addOperand(&type18);
    334   auto output01 = model->addOperand(&type19);
    335   // Phase 2, operations
    336   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    337   // Phase 3, inputs and outputs
    338   model->identifyInputsAndOutputs(
    339     {input01, input11, input21},
    340     {output01});
    341   assert(model->isValid());
    342 }
    343 
    344 inline bool is_ignored_quant8_2(int i) {
    345   static std::set<int> ignore = {};
    346   return ignore.find(i) != ignore.end();
    347 }
    348 
    349 void CreateModel_dynamic_output_shape_2(Model *model) {
    350   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    351   OperandType type20(Type::TENSOR_FLOAT32, {0, 0});
    352   OperandType type3(Type::TENSOR_FLOAT32, {2, 2});
    353   // Phase 1, operands
    354   auto input01 = model->addOperand(&type2);
    355   auto input11 = model->addOperand(&type3);
    356   auto input21 = model->addOperand(&type3);
    357   auto output01 = model->addOperand(&type20);
    358   // Phase 2, operations
    359   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    360   // Phase 3, inputs and outputs
    361   model->identifyInputsAndOutputs(
    362     {input01, input11, input21},
    363     {output01});
    364   assert(model->isValid());
    365 }
    366 
    367 inline bool is_ignored_dynamic_output_shape_2(int i) {
    368   static std::set<int> ignore = {};
    369   return ignore.find(i) != ignore.end();
    370 }
    371 
    372 void CreateModel_dynamic_output_shape_int32_2(Model *model) {
    373   OperandType type15(Type::TENSOR_INT32, {2, 2});
    374   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    375   OperandType type21(Type::TENSOR_INT32, {0, 0});
    376   // Phase 1, operands
    377   auto input01 = model->addOperand(&type2);
    378   auto input11 = model->addOperand(&type15);
    379   auto input21 = model->addOperand(&type15);
    380   auto output01 = model->addOperand(&type21);
    381   // Phase 2, operations
    382   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    383   // Phase 3, inputs and outputs
    384   model->identifyInputsAndOutputs(
    385     {input01, input11, input21},
    386     {output01});
    387   assert(model->isValid());
    388 }
    389 
    390 inline bool is_ignored_dynamic_output_shape_int32_2(int i) {
    391   static std::set<int> ignore = {};
    392   return ignore.find(i) != ignore.end();
    393 }
    394 
    395 void CreateModel_dynamic_output_shape_float16_2(Model *model) {
    396   OperandType type16(Type::TENSOR_FLOAT16, {2, 2});
    397   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    398   OperandType type22(Type::TENSOR_FLOAT16, {0, 0});
    399   // Phase 1, operands
    400   auto input01 = model->addOperand(&type2);
    401   auto input11 = model->addOperand(&type16);
    402   auto input21 = model->addOperand(&type16);
    403   auto output01 = model->addOperand(&type22);
    404   // Phase 2, operations
    405   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    406   // Phase 3, inputs and outputs
    407   model->identifyInputsAndOutputs(
    408     {input01, input11, input21},
    409     {output01});
    410   assert(model->isValid());
    411 }
    412 
    413 inline bool is_ignored_dynamic_output_shape_float16_2(int i) {
    414   static std::set<int> ignore = {};
    415   return ignore.find(i) != ignore.end();
    416 }
    417 
    418 void CreateModel_dynamic_output_shape_relaxed_2(Model *model) {
    419   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    420   OperandType type20(Type::TENSOR_FLOAT32, {0, 0});
    421   OperandType type3(Type::TENSOR_FLOAT32, {2, 2});
    422   // Phase 1, operands
    423   auto input01 = model->addOperand(&type2);
    424   auto input11 = model->addOperand(&type3);
    425   auto input21 = model->addOperand(&type3);
    426   auto output01 = model->addOperand(&type20);
    427   // Phase 2, operations
    428   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    429   // Phase 3, inputs and outputs
    430   model->identifyInputsAndOutputs(
    431     {input01, input11, input21},
    432     {output01});
    433   // Phase 4: set relaxed execution
    434   model->relaxComputationFloat32toFloat16(true);
    435   assert(model->isValid());
    436 }
    437 
    438 inline bool is_ignored_dynamic_output_shape_relaxed_2(int i) {
    439   static std::set<int> ignore = {};
    440   return ignore.find(i) != ignore.end();
    441 }
    442 
    443 void CreateModel_dynamic_output_shape_quant8_2(Model *model) {
    444   OperandType type17(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 1.5f, 129);
    445   OperandType type18(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 0.5f, 127);
    446   OperandType type2(Type::TENSOR_BOOL8, {2, 2});
    447   OperandType type23(Type::TENSOR_QUANT8_ASYMM, {0, 0}, 1.0f, 128);
    448   // Phase 1, operands
    449   auto input01 = model->addOperand(&type2);
    450   auto input11 = model->addOperand(&type17);
    451   auto input21 = model->addOperand(&type18);
    452   auto output01 = model->addOperand(&type23);
    453   // Phase 2, operations
    454   model->addOperation(ANEURALNETWORKS_SELECT, {input01, input11, input21}, {output01});
    455   // Phase 3, inputs and outputs
    456   model->identifyInputsAndOutputs(
    457     {input01, input11, input21},
    458     {output01});
    459   assert(model->isValid());
    460 }
    461 
    462 inline bool is_ignored_dynamic_output_shape_quant8_2(int i) {
    463   static std::set<int> ignore = {};
    464   return ignore.find(i) != ignore.end();
    465 }
    466 
    467 void CreateModel_3(Model *model) {
    468   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    469   OperandType type5(Type::TENSOR_FLOAT32, {2, 1, 2, 1, 2});
    470   // Phase 1, operands
    471   auto input02 = model->addOperand(&type4);
    472   auto input12 = model->addOperand(&type5);
    473   auto input22 = model->addOperand(&type5);
    474   auto output02 = model->addOperand(&type5);
    475   // Phase 2, operations
    476   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    477   // Phase 3, inputs and outputs
    478   model->identifyInputsAndOutputs(
    479     {input02, input12, input22},
    480     {output02});
    481   assert(model->isValid());
    482 }
    483 
    484 inline bool is_ignored_3(int i) {
    485   static std::set<int> ignore = {};
    486   return ignore.find(i) != ignore.end();
    487 }
    488 
    489 void CreateModel_int32_3(Model *model) {
    490   OperandType type24(Type::TENSOR_INT32, {2, 1, 2, 1, 2});
    491   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    492   // Phase 1, operands
    493   auto input02 = model->addOperand(&type4);
    494   auto input12 = model->addOperand(&type24);
    495   auto input22 = model->addOperand(&type24);
    496   auto output02 = model->addOperand(&type24);
    497   // Phase 2, operations
    498   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    499   // Phase 3, inputs and outputs
    500   model->identifyInputsAndOutputs(
    501     {input02, input12, input22},
    502     {output02});
    503   assert(model->isValid());
    504 }
    505 
    506 inline bool is_ignored_int32_3(int i) {
    507   static std::set<int> ignore = {};
    508   return ignore.find(i) != ignore.end();
    509 }
    510 
    511 void CreateModel_float16_3(Model *model) {
    512   OperandType type25(Type::TENSOR_FLOAT16, {2, 1, 2, 1, 2});
    513   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    514   // Phase 1, operands
    515   auto input02 = model->addOperand(&type4);
    516   auto input12 = model->addOperand(&type25);
    517   auto input22 = model->addOperand(&type25);
    518   auto output02 = model->addOperand(&type25);
    519   // Phase 2, operations
    520   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    521   // Phase 3, inputs and outputs
    522   model->identifyInputsAndOutputs(
    523     {input02, input12, input22},
    524     {output02});
    525   assert(model->isValid());
    526 }
    527 
    528 inline bool is_ignored_float16_3(int i) {
    529   static std::set<int> ignore = {};
    530   return ignore.find(i) != ignore.end();
    531 }
    532 
    533 void CreateModel_relaxed_3(Model *model) {
    534   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    535   OperandType type5(Type::TENSOR_FLOAT32, {2, 1, 2, 1, 2});
    536   // Phase 1, operands
    537   auto input02 = model->addOperand(&type4);
    538   auto input12 = model->addOperand(&type5);
    539   auto input22 = model->addOperand(&type5);
    540   auto output02 = model->addOperand(&type5);
    541   // Phase 2, operations
    542   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    543   // Phase 3, inputs and outputs
    544   model->identifyInputsAndOutputs(
    545     {input02, input12, input22},
    546     {output02});
    547   // Phase 4: set relaxed execution
    548   model->relaxComputationFloat32toFloat16(true);
    549   assert(model->isValid());
    550 }
    551 
    552 inline bool is_ignored_relaxed_3(int i) {
    553   static std::set<int> ignore = {};
    554   return ignore.find(i) != ignore.end();
    555 }
    556 
    557 void CreateModel_quant8_3(Model *model) {
    558   OperandType type26(Type::TENSOR_QUANT8_ASYMM, {2, 1, 2, 1, 2}, 1.5f, 129);
    559   OperandType type27(Type::TENSOR_QUANT8_ASYMM, {2, 1, 2, 1, 2}, 0.5f, 127);
    560   OperandType type28(Type::TENSOR_QUANT8_ASYMM, {2, 1, 2, 1, 2}, 1.0f, 128);
    561   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    562   // Phase 1, operands
    563   auto input02 = model->addOperand(&type4);
    564   auto input12 = model->addOperand(&type26);
    565   auto input22 = model->addOperand(&type27);
    566   auto output02 = model->addOperand(&type28);
    567   // Phase 2, operations
    568   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    569   // Phase 3, inputs and outputs
    570   model->identifyInputsAndOutputs(
    571     {input02, input12, input22},
    572     {output02});
    573   assert(model->isValid());
    574 }
    575 
    576 inline bool is_ignored_quant8_3(int i) {
    577   static std::set<int> ignore = {};
    578   return ignore.find(i) != ignore.end();
    579 }
    580 
    581 void CreateModel_dynamic_output_shape_3(Model *model) {
    582   OperandType type29(Type::TENSOR_FLOAT32, {0, 0, 0, 0, 0});
    583   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    584   OperandType type5(Type::TENSOR_FLOAT32, {2, 1, 2, 1, 2});
    585   // Phase 1, operands
    586   auto input02 = model->addOperand(&type4);
    587   auto input12 = model->addOperand(&type5);
    588   auto input22 = model->addOperand(&type5);
    589   auto output02 = model->addOperand(&type29);
    590   // Phase 2, operations
    591   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    592   // Phase 3, inputs and outputs
    593   model->identifyInputsAndOutputs(
    594     {input02, input12, input22},
    595     {output02});
    596   assert(model->isValid());
    597 }
    598 
    599 inline bool is_ignored_dynamic_output_shape_3(int i) {
    600   static std::set<int> ignore = {};
    601   return ignore.find(i) != ignore.end();
    602 }
    603 
    604 void CreateModel_dynamic_output_shape_int32_3(Model *model) {
    605   OperandType type24(Type::TENSOR_INT32, {2, 1, 2, 1, 2});
    606   OperandType type30(Type::TENSOR_INT32, {0, 0, 0, 0, 0});
    607   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    608   // Phase 1, operands
    609   auto input02 = model->addOperand(&type4);
    610   auto input12 = model->addOperand(&type24);
    611   auto input22 = model->addOperand(&type24);
    612   auto output02 = model->addOperand(&type30);
    613   // Phase 2, operations
    614   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    615   // Phase 3, inputs and outputs
    616   model->identifyInputsAndOutputs(
    617     {input02, input12, input22},
    618     {output02});
    619   assert(model->isValid());
    620 }
    621 
    622 inline bool is_ignored_dynamic_output_shape_int32_3(int i) {
    623   static std::set<int> ignore = {};
    624   return ignore.find(i) != ignore.end();
    625 }
    626 
    627 void CreateModel_dynamic_output_shape_float16_3(Model *model) {
    628   OperandType type25(Type::TENSOR_FLOAT16, {2, 1, 2, 1, 2});
    629   OperandType type31(Type::TENSOR_FLOAT16, {0, 0, 0, 0, 0});
    630   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    631   // Phase 1, operands
    632   auto input02 = model->addOperand(&type4);
    633   auto input12 = model->addOperand(&type25);
    634   auto input22 = model->addOperand(&type25);
    635   auto output02 = model->addOperand(&type31);
    636   // Phase 2, operations
    637   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    638   // Phase 3, inputs and outputs
    639   model->identifyInputsAndOutputs(
    640     {input02, input12, input22},
    641     {output02});
    642   assert(model->isValid());
    643 }
    644 
    645 inline bool is_ignored_dynamic_output_shape_float16_3(int i) {
    646   static std::set<int> ignore = {};
    647   return ignore.find(i) != ignore.end();
    648 }
    649 
    650 void CreateModel_dynamic_output_shape_relaxed_3(Model *model) {
    651   OperandType type29(Type::TENSOR_FLOAT32, {0, 0, 0, 0, 0});
    652   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    653   OperandType type5(Type::TENSOR_FLOAT32, {2, 1, 2, 1, 2});
    654   // Phase 1, operands
    655   auto input02 = model->addOperand(&type4);
    656   auto input12 = model->addOperand(&type5);
    657   auto input22 = model->addOperand(&type5);
    658   auto output02 = model->addOperand(&type29);
    659   // Phase 2, operations
    660   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    661   // Phase 3, inputs and outputs
    662   model->identifyInputsAndOutputs(
    663     {input02, input12, input22},
    664     {output02});
    665   // Phase 4: set relaxed execution
    666   model->relaxComputationFloat32toFloat16(true);
    667   assert(model->isValid());
    668 }
    669 
    670 inline bool is_ignored_dynamic_output_shape_relaxed_3(int i) {
    671   static std::set<int> ignore = {};
    672   return ignore.find(i) != ignore.end();
    673 }
    674 
    675 void CreateModel_dynamic_output_shape_quant8_3(Model *model) {
    676   OperandType type26(Type::TENSOR_QUANT8_ASYMM, {2, 1, 2, 1, 2}, 1.5f, 129);
    677   OperandType type27(Type::TENSOR_QUANT8_ASYMM, {2, 1, 2, 1, 2}, 0.5f, 127);
    678   OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0, 0}, 1.0f, 128);
    679   OperandType type4(Type::TENSOR_BOOL8, {2, 1, 2, 1, 2});
    680   // Phase 1, operands
    681   auto input02 = model->addOperand(&type4);
    682   auto input12 = model->addOperand(&type26);
    683   auto input22 = model->addOperand(&type27);
    684   auto output02 = model->addOperand(&type32);
    685   // Phase 2, operations
    686   model->addOperation(ANEURALNETWORKS_SELECT, {input02, input12, input22}, {output02});
    687   // Phase 3, inputs and outputs
    688   model->identifyInputsAndOutputs(
    689     {input02, input12, input22},
    690     {output02});
    691   assert(model->isValid());
    692 }
    693 
    694 inline bool is_ignored_dynamic_output_shape_quant8_3(int i) {
    695   static std::set<int> ignore = {};
    696   return ignore.find(i) != ignore.end();
    697 }
    698 
    699