Home | History | Annotate | Download | only in vts_models
      1 // clang-format off
      2 // Generated file (from: minimum.mod.py). Do not edit
      3 // Create the model
      4 Model createTestModel() {
      5     const std::vector<Operand> operands = {
      6         {
      7             .type = OperandType::TENSOR_FLOAT32,
      8             .dimensions = {3, 1, 2},
      9             .numberOfConsumers = 1,
     10             .scale = 0.0f,
     11             .zeroPoint = 0,
     12             .lifetime = OperandLifeTime::MODEL_INPUT,
     13             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     14         },
     15         {
     16             .type = OperandType::TENSOR_FLOAT32,
     17             .dimensions = {3, 1, 2},
     18             .numberOfConsumers = 1,
     19             .scale = 0.0f,
     20             .zeroPoint = 0,
     21             .lifetime = OperandLifeTime::MODEL_INPUT,
     22             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     23         },
     24         {
     25             .type = OperandType::TENSOR_FLOAT32,
     26             .dimensions = {3, 1, 2},
     27             .numberOfConsumers = 0,
     28             .scale = 0.0f,
     29             .zeroPoint = 0,
     30             .lifetime = OperandLifeTime::MODEL_OUTPUT,
     31             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     32         }
     33     };
     34 
     35     const std::vector<Operation> operations = {
     36         {
     37             .type = OperationType::MINIMUM,
     38             .inputs = {0, 1},
     39             .outputs = {2},
     40         }
     41     };
     42 
     43     const std::vector<uint32_t> inputIndexes = {0, 1};
     44     const std::vector<uint32_t> outputIndexes = {2};
     45     std::vector<uint8_t> operandValues = {};
     46     const std::vector<hidl_memory> pools = {};
     47 
     48     return {
     49         .operands = operands,
     50         .operations = operations,
     51         .inputIndexes = inputIndexes,
     52         .outputIndexes = outputIndexes,
     53         .operandValues = operandValues,
     54         .pools = pools,
     55     };
     56 }
     57 
     58 inline bool is_ignored(int i) {
     59   static std::set<int> ignore = {};
     60   return ignore.find(i) != ignore.end();
     61 }
     62 
     63 // Create the model
     64 Model createTestModel_relaxed() {
     65     const std::vector<Operand> operands = {
     66         {
     67             .type = OperandType::TENSOR_FLOAT32,
     68             .dimensions = {3, 1, 2},
     69             .numberOfConsumers = 1,
     70             .scale = 0.0f,
     71             .zeroPoint = 0,
     72             .lifetime = OperandLifeTime::MODEL_INPUT,
     73             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     74         },
     75         {
     76             .type = OperandType::TENSOR_FLOAT32,
     77             .dimensions = {3, 1, 2},
     78             .numberOfConsumers = 1,
     79             .scale = 0.0f,
     80             .zeroPoint = 0,
     81             .lifetime = OperandLifeTime::MODEL_INPUT,
     82             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     83         },
     84         {
     85             .type = OperandType::TENSOR_FLOAT32,
     86             .dimensions = {3, 1, 2},
     87             .numberOfConsumers = 0,
     88             .scale = 0.0f,
     89             .zeroPoint = 0,
     90             .lifetime = OperandLifeTime::MODEL_OUTPUT,
     91             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     92         }
     93     };
     94 
     95     const std::vector<Operation> operations = {
     96         {
     97             .type = OperationType::MINIMUM,
     98             .inputs = {0, 1},
     99             .outputs = {2},
    100         }
    101     };
    102 
    103     const std::vector<uint32_t> inputIndexes = {0, 1};
    104     const std::vector<uint32_t> outputIndexes = {2};
    105     std::vector<uint8_t> operandValues = {};
    106     const std::vector<hidl_memory> pools = {};
    107 
    108     return {
    109         .operands = operands,
    110         .operations = operations,
    111         .inputIndexes = inputIndexes,
    112         .outputIndexes = outputIndexes,
    113         .operandValues = operandValues,
    114         .pools = pools,
    115         .relaxComputationFloat32toFloat16 = true,
    116     };
    117 }
    118 
    119 inline bool is_ignored_relaxed(int i) {
    120   static std::set<int> ignore = {};
    121   return ignore.find(i) != ignore.end();
    122 }
    123 
    124 // Create the model
    125 Model createTestModel_float16() {
    126     const std::vector<Operand> operands = {
    127         {
    128             .type = OperandType::TENSOR_FLOAT16,
    129             .dimensions = {3, 1, 2},
    130             .numberOfConsumers = 1,
    131             .scale = 0.0f,
    132             .zeroPoint = 0,
    133             .lifetime = OperandLifeTime::MODEL_INPUT,
    134             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    135         },
    136         {
    137             .type = OperandType::TENSOR_FLOAT16,
    138             .dimensions = {3, 1, 2},
    139             .numberOfConsumers = 1,
    140             .scale = 0.0f,
    141             .zeroPoint = 0,
    142             .lifetime = OperandLifeTime::MODEL_INPUT,
    143             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    144         },
    145         {
    146             .type = OperandType::TENSOR_FLOAT16,
    147             .dimensions = {3, 1, 2},
    148             .numberOfConsumers = 0,
    149             .scale = 0.0f,
    150             .zeroPoint = 0,
    151             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    152             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    153         }
    154     };
    155 
    156     const std::vector<Operation> operations = {
    157         {
    158             .type = OperationType::MINIMUM,
    159             .inputs = {0, 1},
    160             .outputs = {2},
    161         }
    162     };
    163 
    164     const std::vector<uint32_t> inputIndexes = {0, 1};
    165     const std::vector<uint32_t> outputIndexes = {2};
    166     std::vector<uint8_t> operandValues = {};
    167     const std::vector<hidl_memory> pools = {};
    168 
    169     return {
    170         .operands = operands,
    171         .operations = operations,
    172         .inputIndexes = inputIndexes,
    173         .outputIndexes = outputIndexes,
    174         .operandValues = operandValues,
    175         .pools = pools,
    176     };
    177 }
    178 
    179 inline bool is_ignored_float16(int i) {
    180   static std::set<int> ignore = {};
    181   return ignore.find(i) != ignore.end();
    182 }
    183 
    184 // Create the model
    185 Model createTestModel_int32() {
    186     const std::vector<Operand> operands = {
    187         {
    188             .type = OperandType::TENSOR_INT32,
    189             .dimensions = {3, 1, 2},
    190             .numberOfConsumers = 1,
    191             .scale = 0.0f,
    192             .zeroPoint = 0,
    193             .lifetime = OperandLifeTime::MODEL_INPUT,
    194             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    195         },
    196         {
    197             .type = OperandType::TENSOR_INT32,
    198             .dimensions = {3, 1, 2},
    199             .numberOfConsumers = 1,
    200             .scale = 0.0f,
    201             .zeroPoint = 0,
    202             .lifetime = OperandLifeTime::MODEL_INPUT,
    203             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    204         },
    205         {
    206             .type = OperandType::TENSOR_INT32,
    207             .dimensions = {3, 1, 2},
    208             .numberOfConsumers = 0,
    209             .scale = 0.0f,
    210             .zeroPoint = 0,
    211             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    212             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    213         }
    214     };
    215 
    216     const std::vector<Operation> operations = {
    217         {
    218             .type = OperationType::MINIMUM,
    219             .inputs = {0, 1},
    220             .outputs = {2},
    221         }
    222     };
    223 
    224     const std::vector<uint32_t> inputIndexes = {0, 1};
    225     const std::vector<uint32_t> outputIndexes = {2};
    226     std::vector<uint8_t> operandValues = {};
    227     const std::vector<hidl_memory> pools = {};
    228 
    229     return {
    230         .operands = operands,
    231         .operations = operations,
    232         .inputIndexes = inputIndexes,
    233         .outputIndexes = outputIndexes,
    234         .operandValues = operandValues,
    235         .pools = pools,
    236     };
    237 }
    238 
    239 inline bool is_ignored_int32(int i) {
    240   static std::set<int> ignore = {};
    241   return ignore.find(i) != ignore.end();
    242 }
    243 
    244 // Create the model
    245 Model createTestModel_quant8() {
    246     const std::vector<Operand> operands = {
    247         {
    248             .type = OperandType::TENSOR_QUANT8_ASYMM,
    249             .dimensions = {3, 1, 2},
    250             .numberOfConsumers = 1,
    251             .scale = 0.5f,
    252             .zeroPoint = 127,
    253             .lifetime = OperandLifeTime::MODEL_INPUT,
    254             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    255         },
    256         {
    257             .type = OperandType::TENSOR_QUANT8_ASYMM,
    258             .dimensions = {3, 1, 2},
    259             .numberOfConsumers = 1,
    260             .scale = 1.0f,
    261             .zeroPoint = 100,
    262             .lifetime = OperandLifeTime::MODEL_INPUT,
    263             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    264         },
    265         {
    266             .type = OperandType::TENSOR_QUANT8_ASYMM,
    267             .dimensions = {3, 1, 2},
    268             .numberOfConsumers = 0,
    269             .scale = 2.0f,
    270             .zeroPoint = 80,
    271             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    272             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    273         }
    274     };
    275 
    276     const std::vector<Operation> operations = {
    277         {
    278             .type = OperationType::MINIMUM,
    279             .inputs = {0, 1},
    280             .outputs = {2},
    281         }
    282     };
    283 
    284     const std::vector<uint32_t> inputIndexes = {0, 1};
    285     const std::vector<uint32_t> outputIndexes = {2};
    286     std::vector<uint8_t> operandValues = {};
    287     const std::vector<hidl_memory> pools = {};
    288 
    289     return {
    290         .operands = operands,
    291         .operations = operations,
    292         .inputIndexes = inputIndexes,
    293         .outputIndexes = outputIndexes,
    294         .operandValues = operandValues,
    295         .pools = pools,
    296     };
    297 }
    298 
    299 inline bool is_ignored_quant8(int i) {
    300   static std::set<int> ignore = {};
    301   return ignore.find(i) != ignore.end();
    302 }
    303 
    304 // Create the model
    305 Model createTestModel_dynamic_output_shape() {
    306     const std::vector<Operand> operands = {
    307         {
    308             .type = OperandType::TENSOR_FLOAT32,
    309             .dimensions = {3, 1, 2},
    310             .numberOfConsumers = 1,
    311             .scale = 0.0f,
    312             .zeroPoint = 0,
    313             .lifetime = OperandLifeTime::MODEL_INPUT,
    314             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    315         },
    316         {
    317             .type = OperandType::TENSOR_FLOAT32,
    318             .dimensions = {3, 1, 2},
    319             .numberOfConsumers = 1,
    320             .scale = 0.0f,
    321             .zeroPoint = 0,
    322             .lifetime = OperandLifeTime::MODEL_INPUT,
    323             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    324         },
    325         {
    326             .type = OperandType::TENSOR_FLOAT32,
    327             .dimensions = {0, 0, 0},
    328             .numberOfConsumers = 0,
    329             .scale = 0.0f,
    330             .zeroPoint = 0,
    331             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    332             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    333         }
    334     };
    335 
    336     const std::vector<Operation> operations = {
    337         {
    338             .type = OperationType::MINIMUM,
    339             .inputs = {0, 1},
    340             .outputs = {2},
    341         }
    342     };
    343 
    344     const std::vector<uint32_t> inputIndexes = {0, 1};
    345     const std::vector<uint32_t> outputIndexes = {2};
    346     std::vector<uint8_t> operandValues = {};
    347     const std::vector<hidl_memory> pools = {};
    348 
    349     return {
    350         .operands = operands,
    351         .operations = operations,
    352         .inputIndexes = inputIndexes,
    353         .outputIndexes = outputIndexes,
    354         .operandValues = operandValues,
    355         .pools = pools,
    356     };
    357 }
    358 
    359 inline bool is_ignored_dynamic_output_shape(int i) {
    360   static std::set<int> ignore = {};
    361   return ignore.find(i) != ignore.end();
    362 }
    363 
    364 // Create the model
    365 Model createTestModel_dynamic_output_shape_relaxed() {
    366     const std::vector<Operand> operands = {
    367         {
    368             .type = OperandType::TENSOR_FLOAT32,
    369             .dimensions = {3, 1, 2},
    370             .numberOfConsumers = 1,
    371             .scale = 0.0f,
    372             .zeroPoint = 0,
    373             .lifetime = OperandLifeTime::MODEL_INPUT,
    374             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    375         },
    376         {
    377             .type = OperandType::TENSOR_FLOAT32,
    378             .dimensions = {3, 1, 2},
    379             .numberOfConsumers = 1,
    380             .scale = 0.0f,
    381             .zeroPoint = 0,
    382             .lifetime = OperandLifeTime::MODEL_INPUT,
    383             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    384         },
    385         {
    386             .type = OperandType::TENSOR_FLOAT32,
    387             .dimensions = {0, 0, 0},
    388             .numberOfConsumers = 0,
    389             .scale = 0.0f,
    390             .zeroPoint = 0,
    391             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    392             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    393         }
    394     };
    395 
    396     const std::vector<Operation> operations = {
    397         {
    398             .type = OperationType::MINIMUM,
    399             .inputs = {0, 1},
    400             .outputs = {2},
    401         }
    402     };
    403 
    404     const std::vector<uint32_t> inputIndexes = {0, 1};
    405     const std::vector<uint32_t> outputIndexes = {2};
    406     std::vector<uint8_t> operandValues = {};
    407     const std::vector<hidl_memory> pools = {};
    408 
    409     return {
    410         .operands = operands,
    411         .operations = operations,
    412         .inputIndexes = inputIndexes,
    413         .outputIndexes = outputIndexes,
    414         .operandValues = operandValues,
    415         .pools = pools,
    416         .relaxComputationFloat32toFloat16 = true,
    417     };
    418 }
    419 
    420 inline bool is_ignored_dynamic_output_shape_relaxed(int i) {
    421   static std::set<int> ignore = {};
    422   return ignore.find(i) != ignore.end();
    423 }
    424 
    425 // Create the model
    426 Model createTestModel_dynamic_output_shape_float16() {
    427     const std::vector<Operand> operands = {
    428         {
    429             .type = OperandType::TENSOR_FLOAT16,
    430             .dimensions = {3, 1, 2},
    431             .numberOfConsumers = 1,
    432             .scale = 0.0f,
    433             .zeroPoint = 0,
    434             .lifetime = OperandLifeTime::MODEL_INPUT,
    435             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    436         },
    437         {
    438             .type = OperandType::TENSOR_FLOAT16,
    439             .dimensions = {3, 1, 2},
    440             .numberOfConsumers = 1,
    441             .scale = 0.0f,
    442             .zeroPoint = 0,
    443             .lifetime = OperandLifeTime::MODEL_INPUT,
    444             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    445         },
    446         {
    447             .type = OperandType::TENSOR_FLOAT16,
    448             .dimensions = {0, 0, 0},
    449             .numberOfConsumers = 0,
    450             .scale = 0.0f,
    451             .zeroPoint = 0,
    452             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    453             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    454         }
    455     };
    456 
    457     const std::vector<Operation> operations = {
    458         {
    459             .type = OperationType::MINIMUM,
    460             .inputs = {0, 1},
    461             .outputs = {2},
    462         }
    463     };
    464 
    465     const std::vector<uint32_t> inputIndexes = {0, 1};
    466     const std::vector<uint32_t> outputIndexes = {2};
    467     std::vector<uint8_t> operandValues = {};
    468     const std::vector<hidl_memory> pools = {};
    469 
    470     return {
    471         .operands = operands,
    472         .operations = operations,
    473         .inputIndexes = inputIndexes,
    474         .outputIndexes = outputIndexes,
    475         .operandValues = operandValues,
    476         .pools = pools,
    477     };
    478 }
    479 
    480 inline bool is_ignored_dynamic_output_shape_float16(int i) {
    481   static std::set<int> ignore = {};
    482   return ignore.find(i) != ignore.end();
    483 }
    484 
    485 // Create the model
    486 Model createTestModel_dynamic_output_shape_int32() {
    487     const std::vector<Operand> operands = {
    488         {
    489             .type = OperandType::TENSOR_INT32,
    490             .dimensions = {3, 1, 2},
    491             .numberOfConsumers = 1,
    492             .scale = 0.0f,
    493             .zeroPoint = 0,
    494             .lifetime = OperandLifeTime::MODEL_INPUT,
    495             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    496         },
    497         {
    498             .type = OperandType::TENSOR_INT32,
    499             .dimensions = {3, 1, 2},
    500             .numberOfConsumers = 1,
    501             .scale = 0.0f,
    502             .zeroPoint = 0,
    503             .lifetime = OperandLifeTime::MODEL_INPUT,
    504             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    505         },
    506         {
    507             .type = OperandType::TENSOR_INT32,
    508             .dimensions = {0, 0, 0},
    509             .numberOfConsumers = 0,
    510             .scale = 0.0f,
    511             .zeroPoint = 0,
    512             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    513             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    514         }
    515     };
    516 
    517     const std::vector<Operation> operations = {
    518         {
    519             .type = OperationType::MINIMUM,
    520             .inputs = {0, 1},
    521             .outputs = {2},
    522         }
    523     };
    524 
    525     const std::vector<uint32_t> inputIndexes = {0, 1};
    526     const std::vector<uint32_t> outputIndexes = {2};
    527     std::vector<uint8_t> operandValues = {};
    528     const std::vector<hidl_memory> pools = {};
    529 
    530     return {
    531         .operands = operands,
    532         .operations = operations,
    533         .inputIndexes = inputIndexes,
    534         .outputIndexes = outputIndexes,
    535         .operandValues = operandValues,
    536         .pools = pools,
    537     };
    538 }
    539 
    540 inline bool is_ignored_dynamic_output_shape_int32(int i) {
    541   static std::set<int> ignore = {};
    542   return ignore.find(i) != ignore.end();
    543 }
    544 
    545 // Create the model
    546 Model createTestModel_dynamic_output_shape_quant8() {
    547     const std::vector<Operand> operands = {
    548         {
    549             .type = OperandType::TENSOR_QUANT8_ASYMM,
    550             .dimensions = {3, 1, 2},
    551             .numberOfConsumers = 1,
    552             .scale = 0.5f,
    553             .zeroPoint = 127,
    554             .lifetime = OperandLifeTime::MODEL_INPUT,
    555             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    556         },
    557         {
    558             .type = OperandType::TENSOR_QUANT8_ASYMM,
    559             .dimensions = {3, 1, 2},
    560             .numberOfConsumers = 1,
    561             .scale = 1.0f,
    562             .zeroPoint = 100,
    563             .lifetime = OperandLifeTime::MODEL_INPUT,
    564             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    565         },
    566         {
    567             .type = OperandType::TENSOR_QUANT8_ASYMM,
    568             .dimensions = {0, 0, 0},
    569             .numberOfConsumers = 0,
    570             .scale = 2.0f,
    571             .zeroPoint = 80,
    572             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    573             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    574         }
    575     };
    576 
    577     const std::vector<Operation> operations = {
    578         {
    579             .type = OperationType::MINIMUM,
    580             .inputs = {0, 1},
    581             .outputs = {2},
    582         }
    583     };
    584 
    585     const std::vector<uint32_t> inputIndexes = {0, 1};
    586     const std::vector<uint32_t> outputIndexes = {2};
    587     std::vector<uint8_t> operandValues = {};
    588     const std::vector<hidl_memory> pools = {};
    589 
    590     return {
    591         .operands = operands,
    592         .operations = operations,
    593         .inputIndexes = inputIndexes,
    594         .outputIndexes = outputIndexes,
    595         .operandValues = operandValues,
    596         .pools = pools,
    597     };
    598 }
    599 
    600 inline bool is_ignored_dynamic_output_shape_quant8(int i) {
    601   static std::set<int> ignore = {};
    602   return ignore.find(i) != ignore.end();
    603 }
    604 
    605 // Create the model
    606 Model createTestModel_2() {
    607     const std::vector<Operand> operands = {
    608         {
    609             .type = OperandType::TENSOR_FLOAT32,
    610             .dimensions = {3, 1, 2},
    611             .numberOfConsumers = 1,
    612             .scale = 0.0f,
    613             .zeroPoint = 0,
    614             .lifetime = OperandLifeTime::MODEL_INPUT,
    615             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    616         },
    617         {
    618             .type = OperandType::TENSOR_FLOAT32,
    619             .dimensions = {2},
    620             .numberOfConsumers = 1,
    621             .scale = 0.0f,
    622             .zeroPoint = 0,
    623             .lifetime = OperandLifeTime::MODEL_INPUT,
    624             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    625         },
    626         {
    627             .type = OperandType::TENSOR_FLOAT32,
    628             .dimensions = {3, 1, 2},
    629             .numberOfConsumers = 0,
    630             .scale = 0.0f,
    631             .zeroPoint = 0,
    632             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    633             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    634         }
    635     };
    636 
    637     const std::vector<Operation> operations = {
    638         {
    639             .type = OperationType::MINIMUM,
    640             .inputs = {0, 1},
    641             .outputs = {2},
    642         }
    643     };
    644 
    645     const std::vector<uint32_t> inputIndexes = {0, 1};
    646     const std::vector<uint32_t> outputIndexes = {2};
    647     std::vector<uint8_t> operandValues = {};
    648     const std::vector<hidl_memory> pools = {};
    649 
    650     return {
    651         .operands = operands,
    652         .operations = operations,
    653         .inputIndexes = inputIndexes,
    654         .outputIndexes = outputIndexes,
    655         .operandValues = operandValues,
    656         .pools = pools,
    657     };
    658 }
    659 
    660 inline bool is_ignored_2(int i) {
    661   static std::set<int> ignore = {};
    662   return ignore.find(i) != ignore.end();
    663 }
    664 
    665 // Create the model
    666 Model createTestModel_relaxed_2() {
    667     const std::vector<Operand> operands = {
    668         {
    669             .type = OperandType::TENSOR_FLOAT32,
    670             .dimensions = {3, 1, 2},
    671             .numberOfConsumers = 1,
    672             .scale = 0.0f,
    673             .zeroPoint = 0,
    674             .lifetime = OperandLifeTime::MODEL_INPUT,
    675             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    676         },
    677         {
    678             .type = OperandType::TENSOR_FLOAT32,
    679             .dimensions = {2},
    680             .numberOfConsumers = 1,
    681             .scale = 0.0f,
    682             .zeroPoint = 0,
    683             .lifetime = OperandLifeTime::MODEL_INPUT,
    684             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    685         },
    686         {
    687             .type = OperandType::TENSOR_FLOAT32,
    688             .dimensions = {3, 1, 2},
    689             .numberOfConsumers = 0,
    690             .scale = 0.0f,
    691             .zeroPoint = 0,
    692             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    693             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    694         }
    695     };
    696 
    697     const std::vector<Operation> operations = {
    698         {
    699             .type = OperationType::MINIMUM,
    700             .inputs = {0, 1},
    701             .outputs = {2},
    702         }
    703     };
    704 
    705     const std::vector<uint32_t> inputIndexes = {0, 1};
    706     const std::vector<uint32_t> outputIndexes = {2};
    707     std::vector<uint8_t> operandValues = {};
    708     const std::vector<hidl_memory> pools = {};
    709 
    710     return {
    711         .operands = operands,
    712         .operations = operations,
    713         .inputIndexes = inputIndexes,
    714         .outputIndexes = outputIndexes,
    715         .operandValues = operandValues,
    716         .pools = pools,
    717         .relaxComputationFloat32toFloat16 = true,
    718     };
    719 }
    720 
    721 inline bool is_ignored_relaxed_2(int i) {
    722   static std::set<int> ignore = {};
    723   return ignore.find(i) != ignore.end();
    724 }
    725 
    726 // Create the model
    727 Model createTestModel_float16_2() {
    728     const std::vector<Operand> operands = {
    729         {
    730             .type = OperandType::TENSOR_FLOAT16,
    731             .dimensions = {3, 1, 2},
    732             .numberOfConsumers = 1,
    733             .scale = 0.0f,
    734             .zeroPoint = 0,
    735             .lifetime = OperandLifeTime::MODEL_INPUT,
    736             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    737         },
    738         {
    739             .type = OperandType::TENSOR_FLOAT16,
    740             .dimensions = {2},
    741             .numberOfConsumers = 1,
    742             .scale = 0.0f,
    743             .zeroPoint = 0,
    744             .lifetime = OperandLifeTime::MODEL_INPUT,
    745             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    746         },
    747         {
    748             .type = OperandType::TENSOR_FLOAT16,
    749             .dimensions = {3, 1, 2},
    750             .numberOfConsumers = 0,
    751             .scale = 0.0f,
    752             .zeroPoint = 0,
    753             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    754             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    755         }
    756     };
    757 
    758     const std::vector<Operation> operations = {
    759         {
    760             .type = OperationType::MINIMUM,
    761             .inputs = {0, 1},
    762             .outputs = {2},
    763         }
    764     };
    765 
    766     const std::vector<uint32_t> inputIndexes = {0, 1};
    767     const std::vector<uint32_t> outputIndexes = {2};
    768     std::vector<uint8_t> operandValues = {};
    769     const std::vector<hidl_memory> pools = {};
    770 
    771     return {
    772         .operands = operands,
    773         .operations = operations,
    774         .inputIndexes = inputIndexes,
    775         .outputIndexes = outputIndexes,
    776         .operandValues = operandValues,
    777         .pools = pools,
    778     };
    779 }
    780 
    781 inline bool is_ignored_float16_2(int i) {
    782   static std::set<int> ignore = {};
    783   return ignore.find(i) != ignore.end();
    784 }
    785 
    786 // Create the model
    787 Model createTestModel_int32_2() {
    788     const std::vector<Operand> operands = {
    789         {
    790             .type = OperandType::TENSOR_INT32,
    791             .dimensions = {3, 1, 2},
    792             .numberOfConsumers = 1,
    793             .scale = 0.0f,
    794             .zeroPoint = 0,
    795             .lifetime = OperandLifeTime::MODEL_INPUT,
    796             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    797         },
    798         {
    799             .type = OperandType::TENSOR_INT32,
    800             .dimensions = {2},
    801             .numberOfConsumers = 1,
    802             .scale = 0.0f,
    803             .zeroPoint = 0,
    804             .lifetime = OperandLifeTime::MODEL_INPUT,
    805             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    806         },
    807         {
    808             .type = OperandType::TENSOR_INT32,
    809             .dimensions = {3, 1, 2},
    810             .numberOfConsumers = 0,
    811             .scale = 0.0f,
    812             .zeroPoint = 0,
    813             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    814             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    815         }
    816     };
    817 
    818     const std::vector<Operation> operations = {
    819         {
    820             .type = OperationType::MINIMUM,
    821             .inputs = {0, 1},
    822             .outputs = {2},
    823         }
    824     };
    825 
    826     const std::vector<uint32_t> inputIndexes = {0, 1};
    827     const std::vector<uint32_t> outputIndexes = {2};
    828     std::vector<uint8_t> operandValues = {};
    829     const std::vector<hidl_memory> pools = {};
    830 
    831     return {
    832         .operands = operands,
    833         .operations = operations,
    834         .inputIndexes = inputIndexes,
    835         .outputIndexes = outputIndexes,
    836         .operandValues = operandValues,
    837         .pools = pools,
    838     };
    839 }
    840 
    841 inline bool is_ignored_int32_2(int i) {
    842   static std::set<int> ignore = {};
    843   return ignore.find(i) != ignore.end();
    844 }
    845 
    846 // Create the model
    847 Model createTestModel_quant8_2() {
    848     const std::vector<Operand> operands = {
    849         {
    850             .type = OperandType::TENSOR_QUANT8_ASYMM,
    851             .dimensions = {3, 1, 2},
    852             .numberOfConsumers = 1,
    853             .scale = 0.5f,
    854             .zeroPoint = 127,
    855             .lifetime = OperandLifeTime::MODEL_INPUT,
    856             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    857         },
    858         {
    859             .type = OperandType::TENSOR_QUANT8_ASYMM,
    860             .dimensions = {2},
    861             .numberOfConsumers = 1,
    862             .scale = 1.0f,
    863             .zeroPoint = 100,
    864             .lifetime = OperandLifeTime::MODEL_INPUT,
    865             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    866         },
    867         {
    868             .type = OperandType::TENSOR_QUANT8_ASYMM,
    869             .dimensions = {3, 1, 2},
    870             .numberOfConsumers = 0,
    871             .scale = 2.0f,
    872             .zeroPoint = 80,
    873             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    874             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    875         }
    876     };
    877 
    878     const std::vector<Operation> operations = {
    879         {
    880             .type = OperationType::MINIMUM,
    881             .inputs = {0, 1},
    882             .outputs = {2},
    883         }
    884     };
    885 
    886     const std::vector<uint32_t> inputIndexes = {0, 1};
    887     const std::vector<uint32_t> outputIndexes = {2};
    888     std::vector<uint8_t> operandValues = {};
    889     const std::vector<hidl_memory> pools = {};
    890 
    891     return {
    892         .operands = operands,
    893         .operations = operations,
    894         .inputIndexes = inputIndexes,
    895         .outputIndexes = outputIndexes,
    896         .operandValues = operandValues,
    897         .pools = pools,
    898     };
    899 }
    900 
    901 inline bool is_ignored_quant8_2(int i) {
    902   static std::set<int> ignore = {};
    903   return ignore.find(i) != ignore.end();
    904 }
    905 
    906 // Create the model
    907 Model createTestModel_dynamic_output_shape_2() {
    908     const std::vector<Operand> operands = {
    909         {
    910             .type = OperandType::TENSOR_FLOAT32,
    911             .dimensions = {3, 1, 2},
    912             .numberOfConsumers = 1,
    913             .scale = 0.0f,
    914             .zeroPoint = 0,
    915             .lifetime = OperandLifeTime::MODEL_INPUT,
    916             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    917         },
    918         {
    919             .type = OperandType::TENSOR_FLOAT32,
    920             .dimensions = {2},
    921             .numberOfConsumers = 1,
    922             .scale = 0.0f,
    923             .zeroPoint = 0,
    924             .lifetime = OperandLifeTime::MODEL_INPUT,
    925             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    926         },
    927         {
    928             .type = OperandType::TENSOR_FLOAT32,
    929             .dimensions = {0, 0, 0},
    930             .numberOfConsumers = 0,
    931             .scale = 0.0f,
    932             .zeroPoint = 0,
    933             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    934             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    935         }
    936     };
    937 
    938     const std::vector<Operation> operations = {
    939         {
    940             .type = OperationType::MINIMUM,
    941             .inputs = {0, 1},
    942             .outputs = {2},
    943         }
    944     };
    945 
    946     const std::vector<uint32_t> inputIndexes = {0, 1};
    947     const std::vector<uint32_t> outputIndexes = {2};
    948     std::vector<uint8_t> operandValues = {};
    949     const std::vector<hidl_memory> pools = {};
    950 
    951     return {
    952         .operands = operands,
    953         .operations = operations,
    954         .inputIndexes = inputIndexes,
    955         .outputIndexes = outputIndexes,
    956         .operandValues = operandValues,
    957         .pools = pools,
    958     };
    959 }
    960 
    961 inline bool is_ignored_dynamic_output_shape_2(int i) {
    962   static std::set<int> ignore = {};
    963   return ignore.find(i) != ignore.end();
    964 }
    965 
    966 // Create the model
    967 Model createTestModel_dynamic_output_shape_relaxed_2() {
    968     const std::vector<Operand> operands = {
    969         {
    970             .type = OperandType::TENSOR_FLOAT32,
    971             .dimensions = {3, 1, 2},
    972             .numberOfConsumers = 1,
    973             .scale = 0.0f,
    974             .zeroPoint = 0,
    975             .lifetime = OperandLifeTime::MODEL_INPUT,
    976             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    977         },
    978         {
    979             .type = OperandType::TENSOR_FLOAT32,
    980             .dimensions = {2},
    981             .numberOfConsumers = 1,
    982             .scale = 0.0f,
    983             .zeroPoint = 0,
    984             .lifetime = OperandLifeTime::MODEL_INPUT,
    985             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    986         },
    987         {
    988             .type = OperandType::TENSOR_FLOAT32,
    989             .dimensions = {0, 0, 0},
    990             .numberOfConsumers = 0,
    991             .scale = 0.0f,
    992             .zeroPoint = 0,
    993             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    994             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    995         }
    996     };
    997 
    998     const std::vector<Operation> operations = {
    999         {
   1000             .type = OperationType::MINIMUM,
   1001             .inputs = {0, 1},
   1002             .outputs = {2},
   1003         }
   1004     };
   1005 
   1006     const std::vector<uint32_t> inputIndexes = {0, 1};
   1007     const std::vector<uint32_t> outputIndexes = {2};
   1008     std::vector<uint8_t> operandValues = {};
   1009     const std::vector<hidl_memory> pools = {};
   1010 
   1011     return {
   1012         .operands = operands,
   1013         .operations = operations,
   1014         .inputIndexes = inputIndexes,
   1015         .outputIndexes = outputIndexes,
   1016         .operandValues = operandValues,
   1017         .pools = pools,
   1018         .relaxComputationFloat32toFloat16 = true,
   1019     };
   1020 }
   1021 
   1022 inline bool is_ignored_dynamic_output_shape_relaxed_2(int i) {
   1023   static std::set<int> ignore = {};
   1024   return ignore.find(i) != ignore.end();
   1025 }
   1026 
   1027 // Create the model
   1028 Model createTestModel_dynamic_output_shape_float16_2() {
   1029     const std::vector<Operand> operands = {
   1030         {
   1031             .type = OperandType::TENSOR_FLOAT16,
   1032             .dimensions = {3, 1, 2},
   1033             .numberOfConsumers = 1,
   1034             .scale = 0.0f,
   1035             .zeroPoint = 0,
   1036             .lifetime = OperandLifeTime::MODEL_INPUT,
   1037             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1038         },
   1039         {
   1040             .type = OperandType::TENSOR_FLOAT16,
   1041             .dimensions = {2},
   1042             .numberOfConsumers = 1,
   1043             .scale = 0.0f,
   1044             .zeroPoint = 0,
   1045             .lifetime = OperandLifeTime::MODEL_INPUT,
   1046             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1047         },
   1048         {
   1049             .type = OperandType::TENSOR_FLOAT16,
   1050             .dimensions = {0, 0, 0},
   1051             .numberOfConsumers = 0,
   1052             .scale = 0.0f,
   1053             .zeroPoint = 0,
   1054             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1055             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1056         }
   1057     };
   1058 
   1059     const std::vector<Operation> operations = {
   1060         {
   1061             .type = OperationType::MINIMUM,
   1062             .inputs = {0, 1},
   1063             .outputs = {2},
   1064         }
   1065     };
   1066 
   1067     const std::vector<uint32_t> inputIndexes = {0, 1};
   1068     const std::vector<uint32_t> outputIndexes = {2};
   1069     std::vector<uint8_t> operandValues = {};
   1070     const std::vector<hidl_memory> pools = {};
   1071 
   1072     return {
   1073         .operands = operands,
   1074         .operations = operations,
   1075         .inputIndexes = inputIndexes,
   1076         .outputIndexes = outputIndexes,
   1077         .operandValues = operandValues,
   1078         .pools = pools,
   1079     };
   1080 }
   1081 
   1082 inline bool is_ignored_dynamic_output_shape_float16_2(int i) {
   1083   static std::set<int> ignore = {};
   1084   return ignore.find(i) != ignore.end();
   1085 }
   1086 
   1087 // Create the model
   1088 Model createTestModel_dynamic_output_shape_int32_2() {
   1089     const std::vector<Operand> operands = {
   1090         {
   1091             .type = OperandType::TENSOR_INT32,
   1092             .dimensions = {3, 1, 2},
   1093             .numberOfConsumers = 1,
   1094             .scale = 0.0f,
   1095             .zeroPoint = 0,
   1096             .lifetime = OperandLifeTime::MODEL_INPUT,
   1097             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1098         },
   1099         {
   1100             .type = OperandType::TENSOR_INT32,
   1101             .dimensions = {2},
   1102             .numberOfConsumers = 1,
   1103             .scale = 0.0f,
   1104             .zeroPoint = 0,
   1105             .lifetime = OperandLifeTime::MODEL_INPUT,
   1106             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1107         },
   1108         {
   1109             .type = OperandType::TENSOR_INT32,
   1110             .dimensions = {0, 0, 0},
   1111             .numberOfConsumers = 0,
   1112             .scale = 0.0f,
   1113             .zeroPoint = 0,
   1114             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1115             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1116         }
   1117     };
   1118 
   1119     const std::vector<Operation> operations = {
   1120         {
   1121             .type = OperationType::MINIMUM,
   1122             .inputs = {0, 1},
   1123             .outputs = {2},
   1124         }
   1125     };
   1126 
   1127     const std::vector<uint32_t> inputIndexes = {0, 1};
   1128     const std::vector<uint32_t> outputIndexes = {2};
   1129     std::vector<uint8_t> operandValues = {};
   1130     const std::vector<hidl_memory> pools = {};
   1131 
   1132     return {
   1133         .operands = operands,
   1134         .operations = operations,
   1135         .inputIndexes = inputIndexes,
   1136         .outputIndexes = outputIndexes,
   1137         .operandValues = operandValues,
   1138         .pools = pools,
   1139     };
   1140 }
   1141 
   1142 inline bool is_ignored_dynamic_output_shape_int32_2(int i) {
   1143   static std::set<int> ignore = {};
   1144   return ignore.find(i) != ignore.end();
   1145 }
   1146 
   1147 // Create the model
   1148 Model createTestModel_dynamic_output_shape_quant8_2() {
   1149     const std::vector<Operand> operands = {
   1150         {
   1151             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1152             .dimensions = {3, 1, 2},
   1153             .numberOfConsumers = 1,
   1154             .scale = 0.5f,
   1155             .zeroPoint = 127,
   1156             .lifetime = OperandLifeTime::MODEL_INPUT,
   1157             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1158         },
   1159         {
   1160             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1161             .dimensions = {2},
   1162             .numberOfConsumers = 1,
   1163             .scale = 1.0f,
   1164             .zeroPoint = 100,
   1165             .lifetime = OperandLifeTime::MODEL_INPUT,
   1166             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1167         },
   1168         {
   1169             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1170             .dimensions = {0, 0, 0},
   1171             .numberOfConsumers = 0,
   1172             .scale = 2.0f,
   1173             .zeroPoint = 80,
   1174             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1175             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1176         }
   1177     };
   1178 
   1179     const std::vector<Operation> operations = {
   1180         {
   1181             .type = OperationType::MINIMUM,
   1182             .inputs = {0, 1},
   1183             .outputs = {2},
   1184         }
   1185     };
   1186 
   1187     const std::vector<uint32_t> inputIndexes = {0, 1};
   1188     const std::vector<uint32_t> outputIndexes = {2};
   1189     std::vector<uint8_t> operandValues = {};
   1190     const std::vector<hidl_memory> pools = {};
   1191 
   1192     return {
   1193         .operands = operands,
   1194         .operations = operations,
   1195         .inputIndexes = inputIndexes,
   1196         .outputIndexes = outputIndexes,
   1197         .operandValues = operandValues,
   1198         .pools = pools,
   1199     };
   1200 }
   1201 
   1202 inline bool is_ignored_dynamic_output_shape_quant8_2(int i) {
   1203   static std::set<int> ignore = {};
   1204   return ignore.find(i) != ignore.end();
   1205 }
   1206 
   1207 // Create the model
   1208 Model createTestModel_3() {
   1209     const std::vector<Operand> operands = {
   1210         {
   1211             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1212             .dimensions = {2},
   1213             .numberOfConsumers = 1,
   1214             .scale = 1.0f,
   1215             .zeroPoint = 128,
   1216             .lifetime = OperandLifeTime::MODEL_INPUT,
   1217             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1218         },
   1219         {
   1220             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1221             .dimensions = {2},
   1222             .numberOfConsumers = 1,
   1223             .scale = 1.0f,
   1224             .zeroPoint = 128,
   1225             .lifetime = OperandLifeTime::MODEL_INPUT,
   1226             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1227         },
   1228         {
   1229             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1230             .dimensions = {2},
   1231             .numberOfConsumers = 0,
   1232             .scale = 0.5f,
   1233             .zeroPoint = 128,
   1234             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1235             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1236         }
   1237     };
   1238 
   1239     const std::vector<Operation> operations = {
   1240         {
   1241             .type = OperationType::MINIMUM,
   1242             .inputs = {0, 1},
   1243             .outputs = {2},
   1244         }
   1245     };
   1246 
   1247     const std::vector<uint32_t> inputIndexes = {0, 1};
   1248     const std::vector<uint32_t> outputIndexes = {2};
   1249     std::vector<uint8_t> operandValues = {};
   1250     const std::vector<hidl_memory> pools = {};
   1251 
   1252     return {
   1253         .operands = operands,
   1254         .operations = operations,
   1255         .inputIndexes = inputIndexes,
   1256         .outputIndexes = outputIndexes,
   1257         .operandValues = operandValues,
   1258         .pools = pools,
   1259     };
   1260 }
   1261 
   1262 inline bool is_ignored_3(int i) {
   1263   static std::set<int> ignore = {};
   1264   return ignore.find(i) != ignore.end();
   1265 }
   1266 
   1267 // Create the model
   1268 Model createTestModel_dynamic_output_shape_3() {
   1269     const std::vector<Operand> operands = {
   1270         {
   1271             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1272             .dimensions = {2},
   1273             .numberOfConsumers = 1,
   1274             .scale = 1.0f,
   1275             .zeroPoint = 128,
   1276             .lifetime = OperandLifeTime::MODEL_INPUT,
   1277             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1278         },
   1279         {
   1280             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1281             .dimensions = {2},
   1282             .numberOfConsumers = 1,
   1283             .scale = 1.0f,
   1284             .zeroPoint = 128,
   1285             .lifetime = OperandLifeTime::MODEL_INPUT,
   1286             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1287         },
   1288         {
   1289             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1290             .dimensions = {0},
   1291             .numberOfConsumers = 0,
   1292             .scale = 0.5f,
   1293             .zeroPoint = 128,
   1294             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1295             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1296         }
   1297     };
   1298 
   1299     const std::vector<Operation> operations = {
   1300         {
   1301             .type = OperationType::MINIMUM,
   1302             .inputs = {0, 1},
   1303             .outputs = {2},
   1304         }
   1305     };
   1306 
   1307     const std::vector<uint32_t> inputIndexes = {0, 1};
   1308     const std::vector<uint32_t> outputIndexes = {2};
   1309     std::vector<uint8_t> operandValues = {};
   1310     const std::vector<hidl_memory> pools = {};
   1311 
   1312     return {
   1313         .operands = operands,
   1314         .operations = operations,
   1315         .inputIndexes = inputIndexes,
   1316         .outputIndexes = outputIndexes,
   1317         .operandValues = operandValues,
   1318         .pools = pools,
   1319     };
   1320 }
   1321 
   1322 inline bool is_ignored_dynamic_output_shape_3(int i) {
   1323   static std::set<int> ignore = {};
   1324   return ignore.find(i) != ignore.end();
   1325 }
   1326 
   1327