Home | History | Annotate | Download | only in vts_models
      1 // clang-format off
      2 // Generated file (from: expand_dims.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 = {2, 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::INT32,
     17             .dimensions = {},
     18             .numberOfConsumers = 1,
     19             .scale = 0.0f,
     20             .zeroPoint = 0,
     21             .lifetime = OperandLifeTime::CONSTANT_COPY,
     22             .location = {.poolIndex = 0, .offset = 0, .length = 4},
     23         },
     24         {
     25             .type = OperandType::TENSOR_FLOAT32,
     26             .dimensions = {1, 2, 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::EXPAND_DIMS,
     38             .inputs = {0, 1},
     39             .outputs = {2},
     40         }
     41     };
     42 
     43     const std::vector<uint32_t> inputIndexes = {0};
     44     const std::vector<uint32_t> outputIndexes = {2};
     45     std::vector<uint8_t> operandValues = {
     46       0, 0, 0, 0
     47     };
     48     const std::vector<hidl_memory> pools = {};
     49 
     50     return {
     51         .operands = operands,
     52         .operations = operations,
     53         .inputIndexes = inputIndexes,
     54         .outputIndexes = outputIndexes,
     55         .operandValues = operandValues,
     56         .pools = pools,
     57     };
     58 }
     59 
     60 inline bool is_ignored(int i) {
     61   static std::set<int> ignore = {};
     62   return ignore.find(i) != ignore.end();
     63 }
     64 
     65 // Create the model
     66 Model createTestModel_relaxed() {
     67     const std::vector<Operand> operands = {
     68         {
     69             .type = OperandType::TENSOR_FLOAT32,
     70             .dimensions = {2, 2},
     71             .numberOfConsumers = 1,
     72             .scale = 0.0f,
     73             .zeroPoint = 0,
     74             .lifetime = OperandLifeTime::MODEL_INPUT,
     75             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     76         },
     77         {
     78             .type = OperandType::INT32,
     79             .dimensions = {},
     80             .numberOfConsumers = 1,
     81             .scale = 0.0f,
     82             .zeroPoint = 0,
     83             .lifetime = OperandLifeTime::CONSTANT_COPY,
     84             .location = {.poolIndex = 0, .offset = 0, .length = 4},
     85         },
     86         {
     87             .type = OperandType::TENSOR_FLOAT32,
     88             .dimensions = {1, 2, 2},
     89             .numberOfConsumers = 0,
     90             .scale = 0.0f,
     91             .zeroPoint = 0,
     92             .lifetime = OperandLifeTime::MODEL_OUTPUT,
     93             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     94         }
     95     };
     96 
     97     const std::vector<Operation> operations = {
     98         {
     99             .type = OperationType::EXPAND_DIMS,
    100             .inputs = {0, 1},
    101             .outputs = {2},
    102         }
    103     };
    104 
    105     const std::vector<uint32_t> inputIndexes = {0};
    106     const std::vector<uint32_t> outputIndexes = {2};
    107     std::vector<uint8_t> operandValues = {
    108       0, 0, 0, 0
    109     };
    110     const std::vector<hidl_memory> pools = {};
    111 
    112     return {
    113         .operands = operands,
    114         .operations = operations,
    115         .inputIndexes = inputIndexes,
    116         .outputIndexes = outputIndexes,
    117         .operandValues = operandValues,
    118         .pools = pools,
    119         .relaxComputationFloat32toFloat16 = true,
    120     };
    121 }
    122 
    123 inline bool is_ignored_relaxed(int i) {
    124   static std::set<int> ignore = {};
    125   return ignore.find(i) != ignore.end();
    126 }
    127 
    128 // Create the model
    129 Model createTestModel_quant8() {
    130     const std::vector<Operand> operands = {
    131         {
    132             .type = OperandType::TENSOR_QUANT8_ASYMM,
    133             .dimensions = {2, 2},
    134             .numberOfConsumers = 1,
    135             .scale = 0.5f,
    136             .zeroPoint = 127,
    137             .lifetime = OperandLifeTime::MODEL_INPUT,
    138             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    139         },
    140         {
    141             .type = OperandType::INT32,
    142             .dimensions = {},
    143             .numberOfConsumers = 1,
    144             .scale = 0.0f,
    145             .zeroPoint = 0,
    146             .lifetime = OperandLifeTime::CONSTANT_COPY,
    147             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    148         },
    149         {
    150             .type = OperandType::TENSOR_QUANT8_ASYMM,
    151             .dimensions = {1, 2, 2},
    152             .numberOfConsumers = 0,
    153             .scale = 0.5f,
    154             .zeroPoint = 127,
    155             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    156             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    157         }
    158     };
    159 
    160     const std::vector<Operation> operations = {
    161         {
    162             .type = OperationType::EXPAND_DIMS,
    163             .inputs = {0, 1},
    164             .outputs = {2},
    165         }
    166     };
    167 
    168     const std::vector<uint32_t> inputIndexes = {0};
    169     const std::vector<uint32_t> outputIndexes = {2};
    170     std::vector<uint8_t> operandValues = {
    171       0, 0, 0, 0
    172     };
    173     const std::vector<hidl_memory> pools = {};
    174 
    175     return {
    176         .operands = operands,
    177         .operations = operations,
    178         .inputIndexes = inputIndexes,
    179         .outputIndexes = outputIndexes,
    180         .operandValues = operandValues,
    181         .pools = pools,
    182     };
    183 }
    184 
    185 inline bool is_ignored_quant8(int i) {
    186   static std::set<int> ignore = {};
    187   return ignore.find(i) != ignore.end();
    188 }
    189 
    190 // Create the model
    191 Model createTestModel_int32() {
    192     const std::vector<Operand> operands = {
    193         {
    194             .type = OperandType::TENSOR_INT32,
    195             .dimensions = {2, 2},
    196             .numberOfConsumers = 1,
    197             .scale = 0.0f,
    198             .zeroPoint = 0,
    199             .lifetime = OperandLifeTime::MODEL_INPUT,
    200             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    201         },
    202         {
    203             .type = OperandType::INT32,
    204             .dimensions = {},
    205             .numberOfConsumers = 1,
    206             .scale = 0.0f,
    207             .zeroPoint = 0,
    208             .lifetime = OperandLifeTime::CONSTANT_COPY,
    209             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    210         },
    211         {
    212             .type = OperandType::TENSOR_INT32,
    213             .dimensions = {1, 2, 2},
    214             .numberOfConsumers = 0,
    215             .scale = 0.0f,
    216             .zeroPoint = 0,
    217             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    218             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    219         }
    220     };
    221 
    222     const std::vector<Operation> operations = {
    223         {
    224             .type = OperationType::EXPAND_DIMS,
    225             .inputs = {0, 1},
    226             .outputs = {2},
    227         }
    228     };
    229 
    230     const std::vector<uint32_t> inputIndexes = {0};
    231     const std::vector<uint32_t> outputIndexes = {2};
    232     std::vector<uint8_t> operandValues = {
    233       0, 0, 0, 0
    234     };
    235     const std::vector<hidl_memory> pools = {};
    236 
    237     return {
    238         .operands = operands,
    239         .operations = operations,
    240         .inputIndexes = inputIndexes,
    241         .outputIndexes = outputIndexes,
    242         .operandValues = operandValues,
    243         .pools = pools,
    244     };
    245 }
    246 
    247 inline bool is_ignored_int32(int i) {
    248   static std::set<int> ignore = {};
    249   return ignore.find(i) != ignore.end();
    250 }
    251 
    252 // Create the model
    253 Model createTestModel_float16() {
    254     const std::vector<Operand> operands = {
    255         {
    256             .type = OperandType::TENSOR_FLOAT16,
    257             .dimensions = {2, 2},
    258             .numberOfConsumers = 1,
    259             .scale = 0.0f,
    260             .zeroPoint = 0,
    261             .lifetime = OperandLifeTime::MODEL_INPUT,
    262             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    263         },
    264         {
    265             .type = OperandType::INT32,
    266             .dimensions = {},
    267             .numberOfConsumers = 1,
    268             .scale = 0.0f,
    269             .zeroPoint = 0,
    270             .lifetime = OperandLifeTime::CONSTANT_COPY,
    271             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    272         },
    273         {
    274             .type = OperandType::TENSOR_FLOAT16,
    275             .dimensions = {1, 2, 2},
    276             .numberOfConsumers = 0,
    277             .scale = 0.0f,
    278             .zeroPoint = 0,
    279             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    280             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    281         }
    282     };
    283 
    284     const std::vector<Operation> operations = {
    285         {
    286             .type = OperationType::EXPAND_DIMS,
    287             .inputs = {0, 1},
    288             .outputs = {2},
    289         }
    290     };
    291 
    292     const std::vector<uint32_t> inputIndexes = {0};
    293     const std::vector<uint32_t> outputIndexes = {2};
    294     std::vector<uint8_t> operandValues = {
    295       0, 0, 0, 0
    296     };
    297     const std::vector<hidl_memory> pools = {};
    298 
    299     return {
    300         .operands = operands,
    301         .operations = operations,
    302         .inputIndexes = inputIndexes,
    303         .outputIndexes = outputIndexes,
    304         .operandValues = operandValues,
    305         .pools = pools,
    306     };
    307 }
    308 
    309 inline bool is_ignored_float16(int i) {
    310   static std::set<int> ignore = {};
    311   return ignore.find(i) != ignore.end();
    312 }
    313 
    314 // Create the model
    315 Model createTestModel_dynamic_output_shape() {
    316     const std::vector<Operand> operands = {
    317         {
    318             .type = OperandType::TENSOR_FLOAT32,
    319             .dimensions = {2, 2},
    320             .numberOfConsumers = 1,
    321             .scale = 0.0f,
    322             .zeroPoint = 0,
    323             .lifetime = OperandLifeTime::MODEL_INPUT,
    324             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    325         },
    326         {
    327             .type = OperandType::INT32,
    328             .dimensions = {},
    329             .numberOfConsumers = 1,
    330             .scale = 0.0f,
    331             .zeroPoint = 0,
    332             .lifetime = OperandLifeTime::CONSTANT_COPY,
    333             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    334         },
    335         {
    336             .type = OperandType::TENSOR_FLOAT32,
    337             .dimensions = {0, 0, 0},
    338             .numberOfConsumers = 0,
    339             .scale = 0.0f,
    340             .zeroPoint = 0,
    341             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    342             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    343         }
    344     };
    345 
    346     const std::vector<Operation> operations = {
    347         {
    348             .type = OperationType::EXPAND_DIMS,
    349             .inputs = {0, 1},
    350             .outputs = {2},
    351         }
    352     };
    353 
    354     const std::vector<uint32_t> inputIndexes = {0};
    355     const std::vector<uint32_t> outputIndexes = {2};
    356     std::vector<uint8_t> operandValues = {
    357       0, 0, 0, 0
    358     };
    359     const std::vector<hidl_memory> pools = {};
    360 
    361     return {
    362         .operands = operands,
    363         .operations = operations,
    364         .inputIndexes = inputIndexes,
    365         .outputIndexes = outputIndexes,
    366         .operandValues = operandValues,
    367         .pools = pools,
    368     };
    369 }
    370 
    371 inline bool is_ignored_dynamic_output_shape(int i) {
    372   static std::set<int> ignore = {};
    373   return ignore.find(i) != ignore.end();
    374 }
    375 
    376 // Create the model
    377 Model createTestModel_dynamic_output_shape_relaxed() {
    378     const std::vector<Operand> operands = {
    379         {
    380             .type = OperandType::TENSOR_FLOAT32,
    381             .dimensions = {2, 2},
    382             .numberOfConsumers = 1,
    383             .scale = 0.0f,
    384             .zeroPoint = 0,
    385             .lifetime = OperandLifeTime::MODEL_INPUT,
    386             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    387         },
    388         {
    389             .type = OperandType::INT32,
    390             .dimensions = {},
    391             .numberOfConsumers = 1,
    392             .scale = 0.0f,
    393             .zeroPoint = 0,
    394             .lifetime = OperandLifeTime::CONSTANT_COPY,
    395             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    396         },
    397         {
    398             .type = OperandType::TENSOR_FLOAT32,
    399             .dimensions = {0, 0, 0},
    400             .numberOfConsumers = 0,
    401             .scale = 0.0f,
    402             .zeroPoint = 0,
    403             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    404             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    405         }
    406     };
    407 
    408     const std::vector<Operation> operations = {
    409         {
    410             .type = OperationType::EXPAND_DIMS,
    411             .inputs = {0, 1},
    412             .outputs = {2},
    413         }
    414     };
    415 
    416     const std::vector<uint32_t> inputIndexes = {0};
    417     const std::vector<uint32_t> outputIndexes = {2};
    418     std::vector<uint8_t> operandValues = {
    419       0, 0, 0, 0
    420     };
    421     const std::vector<hidl_memory> pools = {};
    422 
    423     return {
    424         .operands = operands,
    425         .operations = operations,
    426         .inputIndexes = inputIndexes,
    427         .outputIndexes = outputIndexes,
    428         .operandValues = operandValues,
    429         .pools = pools,
    430         .relaxComputationFloat32toFloat16 = true,
    431     };
    432 }
    433 
    434 inline bool is_ignored_dynamic_output_shape_relaxed(int i) {
    435   static std::set<int> ignore = {};
    436   return ignore.find(i) != ignore.end();
    437 }
    438 
    439 // Create the model
    440 Model createTestModel_dynamic_output_shape_quant8() {
    441     const std::vector<Operand> operands = {
    442         {
    443             .type = OperandType::TENSOR_QUANT8_ASYMM,
    444             .dimensions = {2, 2},
    445             .numberOfConsumers = 1,
    446             .scale = 0.5f,
    447             .zeroPoint = 127,
    448             .lifetime = OperandLifeTime::MODEL_INPUT,
    449             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    450         },
    451         {
    452             .type = OperandType::INT32,
    453             .dimensions = {},
    454             .numberOfConsumers = 1,
    455             .scale = 0.0f,
    456             .zeroPoint = 0,
    457             .lifetime = OperandLifeTime::CONSTANT_COPY,
    458             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    459         },
    460         {
    461             .type = OperandType::TENSOR_QUANT8_ASYMM,
    462             .dimensions = {0, 0, 0},
    463             .numberOfConsumers = 0,
    464             .scale = 0.5f,
    465             .zeroPoint = 127,
    466             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    467             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    468         }
    469     };
    470 
    471     const std::vector<Operation> operations = {
    472         {
    473             .type = OperationType::EXPAND_DIMS,
    474             .inputs = {0, 1},
    475             .outputs = {2},
    476         }
    477     };
    478 
    479     const std::vector<uint32_t> inputIndexes = {0};
    480     const std::vector<uint32_t> outputIndexes = {2};
    481     std::vector<uint8_t> operandValues = {
    482       0, 0, 0, 0
    483     };
    484     const std::vector<hidl_memory> pools = {};
    485 
    486     return {
    487         .operands = operands,
    488         .operations = operations,
    489         .inputIndexes = inputIndexes,
    490         .outputIndexes = outputIndexes,
    491         .operandValues = operandValues,
    492         .pools = pools,
    493     };
    494 }
    495 
    496 inline bool is_ignored_dynamic_output_shape_quant8(int i) {
    497   static std::set<int> ignore = {};
    498   return ignore.find(i) != ignore.end();
    499 }
    500 
    501 // Create the model
    502 Model createTestModel_dynamic_output_shape_int32() {
    503     const std::vector<Operand> operands = {
    504         {
    505             .type = OperandType::TENSOR_INT32,
    506             .dimensions = {2, 2},
    507             .numberOfConsumers = 1,
    508             .scale = 0.0f,
    509             .zeroPoint = 0,
    510             .lifetime = OperandLifeTime::MODEL_INPUT,
    511             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    512         },
    513         {
    514             .type = OperandType::INT32,
    515             .dimensions = {},
    516             .numberOfConsumers = 1,
    517             .scale = 0.0f,
    518             .zeroPoint = 0,
    519             .lifetime = OperandLifeTime::CONSTANT_COPY,
    520             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    521         },
    522         {
    523             .type = OperandType::TENSOR_INT32,
    524             .dimensions = {0, 0, 0},
    525             .numberOfConsumers = 0,
    526             .scale = 0.0f,
    527             .zeroPoint = 0,
    528             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    529             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    530         }
    531     };
    532 
    533     const std::vector<Operation> operations = {
    534         {
    535             .type = OperationType::EXPAND_DIMS,
    536             .inputs = {0, 1},
    537             .outputs = {2},
    538         }
    539     };
    540 
    541     const std::vector<uint32_t> inputIndexes = {0};
    542     const std::vector<uint32_t> outputIndexes = {2};
    543     std::vector<uint8_t> operandValues = {
    544       0, 0, 0, 0
    545     };
    546     const std::vector<hidl_memory> pools = {};
    547 
    548     return {
    549         .operands = operands,
    550         .operations = operations,
    551         .inputIndexes = inputIndexes,
    552         .outputIndexes = outputIndexes,
    553         .operandValues = operandValues,
    554         .pools = pools,
    555     };
    556 }
    557 
    558 inline bool is_ignored_dynamic_output_shape_int32(int i) {
    559   static std::set<int> ignore = {};
    560   return ignore.find(i) != ignore.end();
    561 }
    562 
    563 // Create the model
    564 Model createTestModel_dynamic_output_shape_float16() {
    565     const std::vector<Operand> operands = {
    566         {
    567             .type = OperandType::TENSOR_FLOAT16,
    568             .dimensions = {2, 2},
    569             .numberOfConsumers = 1,
    570             .scale = 0.0f,
    571             .zeroPoint = 0,
    572             .lifetime = OperandLifeTime::MODEL_INPUT,
    573             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    574         },
    575         {
    576             .type = OperandType::INT32,
    577             .dimensions = {},
    578             .numberOfConsumers = 1,
    579             .scale = 0.0f,
    580             .zeroPoint = 0,
    581             .lifetime = OperandLifeTime::CONSTANT_COPY,
    582             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    583         },
    584         {
    585             .type = OperandType::TENSOR_FLOAT16,
    586             .dimensions = {0, 0, 0},
    587             .numberOfConsumers = 0,
    588             .scale = 0.0f,
    589             .zeroPoint = 0,
    590             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    591             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    592         }
    593     };
    594 
    595     const std::vector<Operation> operations = {
    596         {
    597             .type = OperationType::EXPAND_DIMS,
    598             .inputs = {0, 1},
    599             .outputs = {2},
    600         }
    601     };
    602 
    603     const std::vector<uint32_t> inputIndexes = {0};
    604     const std::vector<uint32_t> outputIndexes = {2};
    605     std::vector<uint8_t> operandValues = {
    606       0, 0, 0, 0
    607     };
    608     const std::vector<hidl_memory> pools = {};
    609 
    610     return {
    611         .operands = operands,
    612         .operations = operations,
    613         .inputIndexes = inputIndexes,
    614         .outputIndexes = outputIndexes,
    615         .operandValues = operandValues,
    616         .pools = pools,
    617     };
    618 }
    619 
    620 inline bool is_ignored_dynamic_output_shape_float16(int i) {
    621   static std::set<int> ignore = {};
    622   return ignore.find(i) != ignore.end();
    623 }
    624 
    625 // Create the model
    626 Model createTestModel_2() {
    627     const std::vector<Operand> operands = {
    628         {
    629             .type = OperandType::TENSOR_FLOAT32,
    630             .dimensions = {2, 2},
    631             .numberOfConsumers = 1,
    632             .scale = 0.0f,
    633             .zeroPoint = 0,
    634             .lifetime = OperandLifeTime::MODEL_INPUT,
    635             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    636         },
    637         {
    638             .type = OperandType::INT32,
    639             .dimensions = {},
    640             .numberOfConsumers = 1,
    641             .scale = 0.0f,
    642             .zeroPoint = 0,
    643             .lifetime = OperandLifeTime::CONSTANT_COPY,
    644             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    645         },
    646         {
    647             .type = OperandType::TENSOR_FLOAT32,
    648             .dimensions = {2, 1, 2},
    649             .numberOfConsumers = 0,
    650             .scale = 0.0f,
    651             .zeroPoint = 0,
    652             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    653             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    654         }
    655     };
    656 
    657     const std::vector<Operation> operations = {
    658         {
    659             .type = OperationType::EXPAND_DIMS,
    660             .inputs = {0, 1},
    661             .outputs = {2},
    662         }
    663     };
    664 
    665     const std::vector<uint32_t> inputIndexes = {0};
    666     const std::vector<uint32_t> outputIndexes = {2};
    667     std::vector<uint8_t> operandValues = {
    668       1, 0, 0, 0
    669     };
    670     const std::vector<hidl_memory> pools = {};
    671 
    672     return {
    673         .operands = operands,
    674         .operations = operations,
    675         .inputIndexes = inputIndexes,
    676         .outputIndexes = outputIndexes,
    677         .operandValues = operandValues,
    678         .pools = pools,
    679     };
    680 }
    681 
    682 inline bool is_ignored_2(int i) {
    683   static std::set<int> ignore = {};
    684   return ignore.find(i) != ignore.end();
    685 }
    686 
    687 // Create the model
    688 Model createTestModel_relaxed_2() {
    689     const std::vector<Operand> operands = {
    690         {
    691             .type = OperandType::TENSOR_FLOAT32,
    692             .dimensions = {2, 2},
    693             .numberOfConsumers = 1,
    694             .scale = 0.0f,
    695             .zeroPoint = 0,
    696             .lifetime = OperandLifeTime::MODEL_INPUT,
    697             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    698         },
    699         {
    700             .type = OperandType::INT32,
    701             .dimensions = {},
    702             .numberOfConsumers = 1,
    703             .scale = 0.0f,
    704             .zeroPoint = 0,
    705             .lifetime = OperandLifeTime::CONSTANT_COPY,
    706             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    707         },
    708         {
    709             .type = OperandType::TENSOR_FLOAT32,
    710             .dimensions = {2, 1, 2},
    711             .numberOfConsumers = 0,
    712             .scale = 0.0f,
    713             .zeroPoint = 0,
    714             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    715             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    716         }
    717     };
    718 
    719     const std::vector<Operation> operations = {
    720         {
    721             .type = OperationType::EXPAND_DIMS,
    722             .inputs = {0, 1},
    723             .outputs = {2},
    724         }
    725     };
    726 
    727     const std::vector<uint32_t> inputIndexes = {0};
    728     const std::vector<uint32_t> outputIndexes = {2};
    729     std::vector<uint8_t> operandValues = {
    730       1, 0, 0, 0
    731     };
    732     const std::vector<hidl_memory> pools = {};
    733 
    734     return {
    735         .operands = operands,
    736         .operations = operations,
    737         .inputIndexes = inputIndexes,
    738         .outputIndexes = outputIndexes,
    739         .operandValues = operandValues,
    740         .pools = pools,
    741         .relaxComputationFloat32toFloat16 = true,
    742     };
    743 }
    744 
    745 inline bool is_ignored_relaxed_2(int i) {
    746   static std::set<int> ignore = {};
    747   return ignore.find(i) != ignore.end();
    748 }
    749 
    750 // Create the model
    751 Model createTestModel_quant8_2() {
    752     const std::vector<Operand> operands = {
    753         {
    754             .type = OperandType::TENSOR_QUANT8_ASYMM,
    755             .dimensions = {2, 2},
    756             .numberOfConsumers = 1,
    757             .scale = 0.5f,
    758             .zeroPoint = 127,
    759             .lifetime = OperandLifeTime::MODEL_INPUT,
    760             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    761         },
    762         {
    763             .type = OperandType::INT32,
    764             .dimensions = {},
    765             .numberOfConsumers = 1,
    766             .scale = 0.0f,
    767             .zeroPoint = 0,
    768             .lifetime = OperandLifeTime::CONSTANT_COPY,
    769             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    770         },
    771         {
    772             .type = OperandType::TENSOR_QUANT8_ASYMM,
    773             .dimensions = {2, 1, 2},
    774             .numberOfConsumers = 0,
    775             .scale = 0.5f,
    776             .zeroPoint = 127,
    777             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    778             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    779         }
    780     };
    781 
    782     const std::vector<Operation> operations = {
    783         {
    784             .type = OperationType::EXPAND_DIMS,
    785             .inputs = {0, 1},
    786             .outputs = {2},
    787         }
    788     };
    789 
    790     const std::vector<uint32_t> inputIndexes = {0};
    791     const std::vector<uint32_t> outputIndexes = {2};
    792     std::vector<uint8_t> operandValues = {
    793       1, 0, 0, 0
    794     };
    795     const std::vector<hidl_memory> pools = {};
    796 
    797     return {
    798         .operands = operands,
    799         .operations = operations,
    800         .inputIndexes = inputIndexes,
    801         .outputIndexes = outputIndexes,
    802         .operandValues = operandValues,
    803         .pools = pools,
    804     };
    805 }
    806 
    807 inline bool is_ignored_quant8_2(int i) {
    808   static std::set<int> ignore = {};
    809   return ignore.find(i) != ignore.end();
    810 }
    811 
    812 // Create the model
    813 Model createTestModel_int32_2() {
    814     const std::vector<Operand> operands = {
    815         {
    816             .type = OperandType::TENSOR_INT32,
    817             .dimensions = {2, 2},
    818             .numberOfConsumers = 1,
    819             .scale = 0.0f,
    820             .zeroPoint = 0,
    821             .lifetime = OperandLifeTime::MODEL_INPUT,
    822             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    823         },
    824         {
    825             .type = OperandType::INT32,
    826             .dimensions = {},
    827             .numberOfConsumers = 1,
    828             .scale = 0.0f,
    829             .zeroPoint = 0,
    830             .lifetime = OperandLifeTime::CONSTANT_COPY,
    831             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    832         },
    833         {
    834             .type = OperandType::TENSOR_INT32,
    835             .dimensions = {2, 1, 2},
    836             .numberOfConsumers = 0,
    837             .scale = 0.0f,
    838             .zeroPoint = 0,
    839             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    840             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    841         }
    842     };
    843 
    844     const std::vector<Operation> operations = {
    845         {
    846             .type = OperationType::EXPAND_DIMS,
    847             .inputs = {0, 1},
    848             .outputs = {2},
    849         }
    850     };
    851 
    852     const std::vector<uint32_t> inputIndexes = {0};
    853     const std::vector<uint32_t> outputIndexes = {2};
    854     std::vector<uint8_t> operandValues = {
    855       1, 0, 0, 0
    856     };
    857     const std::vector<hidl_memory> pools = {};
    858 
    859     return {
    860         .operands = operands,
    861         .operations = operations,
    862         .inputIndexes = inputIndexes,
    863         .outputIndexes = outputIndexes,
    864         .operandValues = operandValues,
    865         .pools = pools,
    866     };
    867 }
    868 
    869 inline bool is_ignored_int32_2(int i) {
    870   static std::set<int> ignore = {};
    871   return ignore.find(i) != ignore.end();
    872 }
    873 
    874 // Create the model
    875 Model createTestModel_float16_2() {
    876     const std::vector<Operand> operands = {
    877         {
    878             .type = OperandType::TENSOR_FLOAT16,
    879             .dimensions = {2, 2},
    880             .numberOfConsumers = 1,
    881             .scale = 0.0f,
    882             .zeroPoint = 0,
    883             .lifetime = OperandLifeTime::MODEL_INPUT,
    884             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    885         },
    886         {
    887             .type = OperandType::INT32,
    888             .dimensions = {},
    889             .numberOfConsumers = 1,
    890             .scale = 0.0f,
    891             .zeroPoint = 0,
    892             .lifetime = OperandLifeTime::CONSTANT_COPY,
    893             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    894         },
    895         {
    896             .type = OperandType::TENSOR_FLOAT16,
    897             .dimensions = {2, 1, 2},
    898             .numberOfConsumers = 0,
    899             .scale = 0.0f,
    900             .zeroPoint = 0,
    901             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    902             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    903         }
    904     };
    905 
    906     const std::vector<Operation> operations = {
    907         {
    908             .type = OperationType::EXPAND_DIMS,
    909             .inputs = {0, 1},
    910             .outputs = {2},
    911         }
    912     };
    913 
    914     const std::vector<uint32_t> inputIndexes = {0};
    915     const std::vector<uint32_t> outputIndexes = {2};
    916     std::vector<uint8_t> operandValues = {
    917       1, 0, 0, 0
    918     };
    919     const std::vector<hidl_memory> pools = {};
    920 
    921     return {
    922         .operands = operands,
    923         .operations = operations,
    924         .inputIndexes = inputIndexes,
    925         .outputIndexes = outputIndexes,
    926         .operandValues = operandValues,
    927         .pools = pools,
    928     };
    929 }
    930 
    931 inline bool is_ignored_float16_2(int i) {
    932   static std::set<int> ignore = {};
    933   return ignore.find(i) != ignore.end();
    934 }
    935 
    936 // Create the model
    937 Model createTestModel_dynamic_output_shape_2() {
    938     const std::vector<Operand> operands = {
    939         {
    940             .type = OperandType::TENSOR_FLOAT32,
    941             .dimensions = {2, 2},
    942             .numberOfConsumers = 1,
    943             .scale = 0.0f,
    944             .zeroPoint = 0,
    945             .lifetime = OperandLifeTime::MODEL_INPUT,
    946             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    947         },
    948         {
    949             .type = OperandType::INT32,
    950             .dimensions = {},
    951             .numberOfConsumers = 1,
    952             .scale = 0.0f,
    953             .zeroPoint = 0,
    954             .lifetime = OperandLifeTime::CONSTANT_COPY,
    955             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    956         },
    957         {
    958             .type = OperandType::TENSOR_FLOAT32,
    959             .dimensions = {0, 0, 0},
    960             .numberOfConsumers = 0,
    961             .scale = 0.0f,
    962             .zeroPoint = 0,
    963             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    964             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    965         }
    966     };
    967 
    968     const std::vector<Operation> operations = {
    969         {
    970             .type = OperationType::EXPAND_DIMS,
    971             .inputs = {0, 1},
    972             .outputs = {2},
    973         }
    974     };
    975 
    976     const std::vector<uint32_t> inputIndexes = {0};
    977     const std::vector<uint32_t> outputIndexes = {2};
    978     std::vector<uint8_t> operandValues = {
    979       1, 0, 0, 0
    980     };
    981     const std::vector<hidl_memory> pools = {};
    982 
    983     return {
    984         .operands = operands,
    985         .operations = operations,
    986         .inputIndexes = inputIndexes,
    987         .outputIndexes = outputIndexes,
    988         .operandValues = operandValues,
    989         .pools = pools,
    990     };
    991 }
    992 
    993 inline bool is_ignored_dynamic_output_shape_2(int i) {
    994   static std::set<int> ignore = {};
    995   return ignore.find(i) != ignore.end();
    996 }
    997 
    998 // Create the model
    999 Model createTestModel_dynamic_output_shape_relaxed_2() {
   1000     const std::vector<Operand> operands = {
   1001         {
   1002             .type = OperandType::TENSOR_FLOAT32,
   1003             .dimensions = {2, 2},
   1004             .numberOfConsumers = 1,
   1005             .scale = 0.0f,
   1006             .zeroPoint = 0,
   1007             .lifetime = OperandLifeTime::MODEL_INPUT,
   1008             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1009         },
   1010         {
   1011             .type = OperandType::INT32,
   1012             .dimensions = {},
   1013             .numberOfConsumers = 1,
   1014             .scale = 0.0f,
   1015             .zeroPoint = 0,
   1016             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1017             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1018         },
   1019         {
   1020             .type = OperandType::TENSOR_FLOAT32,
   1021             .dimensions = {0, 0, 0},
   1022             .numberOfConsumers = 0,
   1023             .scale = 0.0f,
   1024             .zeroPoint = 0,
   1025             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1026             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1027         }
   1028     };
   1029 
   1030     const std::vector<Operation> operations = {
   1031         {
   1032             .type = OperationType::EXPAND_DIMS,
   1033             .inputs = {0, 1},
   1034             .outputs = {2},
   1035         }
   1036     };
   1037 
   1038     const std::vector<uint32_t> inputIndexes = {0};
   1039     const std::vector<uint32_t> outputIndexes = {2};
   1040     std::vector<uint8_t> operandValues = {
   1041       1, 0, 0, 0
   1042     };
   1043     const std::vector<hidl_memory> pools = {};
   1044 
   1045     return {
   1046         .operands = operands,
   1047         .operations = operations,
   1048         .inputIndexes = inputIndexes,
   1049         .outputIndexes = outputIndexes,
   1050         .operandValues = operandValues,
   1051         .pools = pools,
   1052         .relaxComputationFloat32toFloat16 = true,
   1053     };
   1054 }
   1055 
   1056 inline bool is_ignored_dynamic_output_shape_relaxed_2(int i) {
   1057   static std::set<int> ignore = {};
   1058   return ignore.find(i) != ignore.end();
   1059 }
   1060 
   1061 // Create the model
   1062 Model createTestModel_dynamic_output_shape_quant8_2() {
   1063     const std::vector<Operand> operands = {
   1064         {
   1065             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1066             .dimensions = {2, 2},
   1067             .numberOfConsumers = 1,
   1068             .scale = 0.5f,
   1069             .zeroPoint = 127,
   1070             .lifetime = OperandLifeTime::MODEL_INPUT,
   1071             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1072         },
   1073         {
   1074             .type = OperandType::INT32,
   1075             .dimensions = {},
   1076             .numberOfConsumers = 1,
   1077             .scale = 0.0f,
   1078             .zeroPoint = 0,
   1079             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1080             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1081         },
   1082         {
   1083             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1084             .dimensions = {0, 0, 0},
   1085             .numberOfConsumers = 0,
   1086             .scale = 0.5f,
   1087             .zeroPoint = 127,
   1088             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1089             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1090         }
   1091     };
   1092 
   1093     const std::vector<Operation> operations = {
   1094         {
   1095             .type = OperationType::EXPAND_DIMS,
   1096             .inputs = {0, 1},
   1097             .outputs = {2},
   1098         }
   1099     };
   1100 
   1101     const std::vector<uint32_t> inputIndexes = {0};
   1102     const std::vector<uint32_t> outputIndexes = {2};
   1103     std::vector<uint8_t> operandValues = {
   1104       1, 0, 0, 0
   1105     };
   1106     const std::vector<hidl_memory> pools = {};
   1107 
   1108     return {
   1109         .operands = operands,
   1110         .operations = operations,
   1111         .inputIndexes = inputIndexes,
   1112         .outputIndexes = outputIndexes,
   1113         .operandValues = operandValues,
   1114         .pools = pools,
   1115     };
   1116 }
   1117 
   1118 inline bool is_ignored_dynamic_output_shape_quant8_2(int i) {
   1119   static std::set<int> ignore = {};
   1120   return ignore.find(i) != ignore.end();
   1121 }
   1122 
   1123 // Create the model
   1124 Model createTestModel_dynamic_output_shape_int32_2() {
   1125     const std::vector<Operand> operands = {
   1126         {
   1127             .type = OperandType::TENSOR_INT32,
   1128             .dimensions = {2, 2},
   1129             .numberOfConsumers = 1,
   1130             .scale = 0.0f,
   1131             .zeroPoint = 0,
   1132             .lifetime = OperandLifeTime::MODEL_INPUT,
   1133             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1134         },
   1135         {
   1136             .type = OperandType::INT32,
   1137             .dimensions = {},
   1138             .numberOfConsumers = 1,
   1139             .scale = 0.0f,
   1140             .zeroPoint = 0,
   1141             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1142             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1143         },
   1144         {
   1145             .type = OperandType::TENSOR_INT32,
   1146             .dimensions = {0, 0, 0},
   1147             .numberOfConsumers = 0,
   1148             .scale = 0.0f,
   1149             .zeroPoint = 0,
   1150             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1151             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1152         }
   1153     };
   1154 
   1155     const std::vector<Operation> operations = {
   1156         {
   1157             .type = OperationType::EXPAND_DIMS,
   1158             .inputs = {0, 1},
   1159             .outputs = {2},
   1160         }
   1161     };
   1162 
   1163     const std::vector<uint32_t> inputIndexes = {0};
   1164     const std::vector<uint32_t> outputIndexes = {2};
   1165     std::vector<uint8_t> operandValues = {
   1166       1, 0, 0, 0
   1167     };
   1168     const std::vector<hidl_memory> pools = {};
   1169 
   1170     return {
   1171         .operands = operands,
   1172         .operations = operations,
   1173         .inputIndexes = inputIndexes,
   1174         .outputIndexes = outputIndexes,
   1175         .operandValues = operandValues,
   1176         .pools = pools,
   1177     };
   1178 }
   1179 
   1180 inline bool is_ignored_dynamic_output_shape_int32_2(int i) {
   1181   static std::set<int> ignore = {};
   1182   return ignore.find(i) != ignore.end();
   1183 }
   1184 
   1185 // Create the model
   1186 Model createTestModel_dynamic_output_shape_float16_2() {
   1187     const std::vector<Operand> operands = {
   1188         {
   1189             .type = OperandType::TENSOR_FLOAT16,
   1190             .dimensions = {2, 2},
   1191             .numberOfConsumers = 1,
   1192             .scale = 0.0f,
   1193             .zeroPoint = 0,
   1194             .lifetime = OperandLifeTime::MODEL_INPUT,
   1195             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1196         },
   1197         {
   1198             .type = OperandType::INT32,
   1199             .dimensions = {},
   1200             .numberOfConsumers = 1,
   1201             .scale = 0.0f,
   1202             .zeroPoint = 0,
   1203             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1204             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1205         },
   1206         {
   1207             .type = OperandType::TENSOR_FLOAT16,
   1208             .dimensions = {0, 0, 0},
   1209             .numberOfConsumers = 0,
   1210             .scale = 0.0f,
   1211             .zeroPoint = 0,
   1212             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1213             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1214         }
   1215     };
   1216 
   1217     const std::vector<Operation> operations = {
   1218         {
   1219             .type = OperationType::EXPAND_DIMS,
   1220             .inputs = {0, 1},
   1221             .outputs = {2},
   1222         }
   1223     };
   1224 
   1225     const std::vector<uint32_t> inputIndexes = {0};
   1226     const std::vector<uint32_t> outputIndexes = {2};
   1227     std::vector<uint8_t> operandValues = {
   1228       1, 0, 0, 0
   1229     };
   1230     const std::vector<hidl_memory> pools = {};
   1231 
   1232     return {
   1233         .operands = operands,
   1234         .operations = operations,
   1235         .inputIndexes = inputIndexes,
   1236         .outputIndexes = outputIndexes,
   1237         .operandValues = operandValues,
   1238         .pools = pools,
   1239     };
   1240 }
   1241 
   1242 inline bool is_ignored_dynamic_output_shape_float16_2(int i) {
   1243   static std::set<int> ignore = {};
   1244   return ignore.find(i) != ignore.end();
   1245 }
   1246 
   1247 // Create the model
   1248 Model createTestModel_3() {
   1249     const std::vector<Operand> operands = {
   1250         {
   1251             .type = OperandType::TENSOR_FLOAT32,
   1252             .dimensions = {2, 2},
   1253             .numberOfConsumers = 1,
   1254             .scale = 0.0f,
   1255             .zeroPoint = 0,
   1256             .lifetime = OperandLifeTime::MODEL_INPUT,
   1257             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1258         },
   1259         {
   1260             .type = OperandType::INT32,
   1261             .dimensions = {},
   1262             .numberOfConsumers = 1,
   1263             .scale = 0.0f,
   1264             .zeroPoint = 0,
   1265             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1266             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1267         },
   1268         {
   1269             .type = OperandType::TENSOR_FLOAT32,
   1270             .dimensions = {2, 2, 1},
   1271             .numberOfConsumers = 0,
   1272             .scale = 0.0f,
   1273             .zeroPoint = 0,
   1274             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1275             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1276         }
   1277     };
   1278 
   1279     const std::vector<Operation> operations = {
   1280         {
   1281             .type = OperationType::EXPAND_DIMS,
   1282             .inputs = {0, 1},
   1283             .outputs = {2},
   1284         }
   1285     };
   1286 
   1287     const std::vector<uint32_t> inputIndexes = {0};
   1288     const std::vector<uint32_t> outputIndexes = {2};
   1289     std::vector<uint8_t> operandValues = {
   1290       2, 0, 0, 0
   1291     };
   1292     const std::vector<hidl_memory> pools = {};
   1293 
   1294     return {
   1295         .operands = operands,
   1296         .operations = operations,
   1297         .inputIndexes = inputIndexes,
   1298         .outputIndexes = outputIndexes,
   1299         .operandValues = operandValues,
   1300         .pools = pools,
   1301     };
   1302 }
   1303 
   1304 inline bool is_ignored_3(int i) {
   1305   static std::set<int> ignore = {};
   1306   return ignore.find(i) != ignore.end();
   1307 }
   1308 
   1309 // Create the model
   1310 Model createTestModel_relaxed_3() {
   1311     const std::vector<Operand> operands = {
   1312         {
   1313             .type = OperandType::TENSOR_FLOAT32,
   1314             .dimensions = {2, 2},
   1315             .numberOfConsumers = 1,
   1316             .scale = 0.0f,
   1317             .zeroPoint = 0,
   1318             .lifetime = OperandLifeTime::MODEL_INPUT,
   1319             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1320         },
   1321         {
   1322             .type = OperandType::INT32,
   1323             .dimensions = {},
   1324             .numberOfConsumers = 1,
   1325             .scale = 0.0f,
   1326             .zeroPoint = 0,
   1327             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1328             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1329         },
   1330         {
   1331             .type = OperandType::TENSOR_FLOAT32,
   1332             .dimensions = {2, 2, 1},
   1333             .numberOfConsumers = 0,
   1334             .scale = 0.0f,
   1335             .zeroPoint = 0,
   1336             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1337             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1338         }
   1339     };
   1340 
   1341     const std::vector<Operation> operations = {
   1342         {
   1343             .type = OperationType::EXPAND_DIMS,
   1344             .inputs = {0, 1},
   1345             .outputs = {2},
   1346         }
   1347     };
   1348 
   1349     const std::vector<uint32_t> inputIndexes = {0};
   1350     const std::vector<uint32_t> outputIndexes = {2};
   1351     std::vector<uint8_t> operandValues = {
   1352       2, 0, 0, 0
   1353     };
   1354     const std::vector<hidl_memory> pools = {};
   1355 
   1356     return {
   1357         .operands = operands,
   1358         .operations = operations,
   1359         .inputIndexes = inputIndexes,
   1360         .outputIndexes = outputIndexes,
   1361         .operandValues = operandValues,
   1362         .pools = pools,
   1363         .relaxComputationFloat32toFloat16 = true,
   1364     };
   1365 }
   1366 
   1367 inline bool is_ignored_relaxed_3(int i) {
   1368   static std::set<int> ignore = {};
   1369   return ignore.find(i) != ignore.end();
   1370 }
   1371 
   1372 // Create the model
   1373 Model createTestModel_quant8_3() {
   1374     const std::vector<Operand> operands = {
   1375         {
   1376             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1377             .dimensions = {2, 2},
   1378             .numberOfConsumers = 1,
   1379             .scale = 0.5f,
   1380             .zeroPoint = 127,
   1381             .lifetime = OperandLifeTime::MODEL_INPUT,
   1382             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1383         },
   1384         {
   1385             .type = OperandType::INT32,
   1386             .dimensions = {},
   1387             .numberOfConsumers = 1,
   1388             .scale = 0.0f,
   1389             .zeroPoint = 0,
   1390             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1391             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1392         },
   1393         {
   1394             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1395             .dimensions = {2, 2, 1},
   1396             .numberOfConsumers = 0,
   1397             .scale = 0.5f,
   1398             .zeroPoint = 127,
   1399             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1400             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1401         }
   1402     };
   1403 
   1404     const std::vector<Operation> operations = {
   1405         {
   1406             .type = OperationType::EXPAND_DIMS,
   1407             .inputs = {0, 1},
   1408             .outputs = {2},
   1409         }
   1410     };
   1411 
   1412     const std::vector<uint32_t> inputIndexes = {0};
   1413     const std::vector<uint32_t> outputIndexes = {2};
   1414     std::vector<uint8_t> operandValues = {
   1415       2, 0, 0, 0
   1416     };
   1417     const std::vector<hidl_memory> pools = {};
   1418 
   1419     return {
   1420         .operands = operands,
   1421         .operations = operations,
   1422         .inputIndexes = inputIndexes,
   1423         .outputIndexes = outputIndexes,
   1424         .operandValues = operandValues,
   1425         .pools = pools,
   1426     };
   1427 }
   1428 
   1429 inline bool is_ignored_quant8_3(int i) {
   1430   static std::set<int> ignore = {};
   1431   return ignore.find(i) != ignore.end();
   1432 }
   1433 
   1434 // Create the model
   1435 Model createTestModel_int32_3() {
   1436     const std::vector<Operand> operands = {
   1437         {
   1438             .type = OperandType::TENSOR_INT32,
   1439             .dimensions = {2, 2},
   1440             .numberOfConsumers = 1,
   1441             .scale = 0.0f,
   1442             .zeroPoint = 0,
   1443             .lifetime = OperandLifeTime::MODEL_INPUT,
   1444             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1445         },
   1446         {
   1447             .type = OperandType::INT32,
   1448             .dimensions = {},
   1449             .numberOfConsumers = 1,
   1450             .scale = 0.0f,
   1451             .zeroPoint = 0,
   1452             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1453             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1454         },
   1455         {
   1456             .type = OperandType::TENSOR_INT32,
   1457             .dimensions = {2, 2, 1},
   1458             .numberOfConsumers = 0,
   1459             .scale = 0.0f,
   1460             .zeroPoint = 0,
   1461             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1462             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1463         }
   1464     };
   1465 
   1466     const std::vector<Operation> operations = {
   1467         {
   1468             .type = OperationType::EXPAND_DIMS,
   1469             .inputs = {0, 1},
   1470             .outputs = {2},
   1471         }
   1472     };
   1473 
   1474     const std::vector<uint32_t> inputIndexes = {0};
   1475     const std::vector<uint32_t> outputIndexes = {2};
   1476     std::vector<uint8_t> operandValues = {
   1477       2, 0, 0, 0
   1478     };
   1479     const std::vector<hidl_memory> pools = {};
   1480 
   1481     return {
   1482         .operands = operands,
   1483         .operations = operations,
   1484         .inputIndexes = inputIndexes,
   1485         .outputIndexes = outputIndexes,
   1486         .operandValues = operandValues,
   1487         .pools = pools,
   1488     };
   1489 }
   1490 
   1491 inline bool is_ignored_int32_3(int i) {
   1492   static std::set<int> ignore = {};
   1493   return ignore.find(i) != ignore.end();
   1494 }
   1495 
   1496 // Create the model
   1497 Model createTestModel_float16_3() {
   1498     const std::vector<Operand> operands = {
   1499         {
   1500             .type = OperandType::TENSOR_FLOAT16,
   1501             .dimensions = {2, 2},
   1502             .numberOfConsumers = 1,
   1503             .scale = 0.0f,
   1504             .zeroPoint = 0,
   1505             .lifetime = OperandLifeTime::MODEL_INPUT,
   1506             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1507         },
   1508         {
   1509             .type = OperandType::INT32,
   1510             .dimensions = {},
   1511             .numberOfConsumers = 1,
   1512             .scale = 0.0f,
   1513             .zeroPoint = 0,
   1514             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1515             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1516         },
   1517         {
   1518             .type = OperandType::TENSOR_FLOAT16,
   1519             .dimensions = {2, 2, 1},
   1520             .numberOfConsumers = 0,
   1521             .scale = 0.0f,
   1522             .zeroPoint = 0,
   1523             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1524             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1525         }
   1526     };
   1527 
   1528     const std::vector<Operation> operations = {
   1529         {
   1530             .type = OperationType::EXPAND_DIMS,
   1531             .inputs = {0, 1},
   1532             .outputs = {2},
   1533         }
   1534     };
   1535 
   1536     const std::vector<uint32_t> inputIndexes = {0};
   1537     const std::vector<uint32_t> outputIndexes = {2};
   1538     std::vector<uint8_t> operandValues = {
   1539       2, 0, 0, 0
   1540     };
   1541     const std::vector<hidl_memory> pools = {};
   1542 
   1543     return {
   1544         .operands = operands,
   1545         .operations = operations,
   1546         .inputIndexes = inputIndexes,
   1547         .outputIndexes = outputIndexes,
   1548         .operandValues = operandValues,
   1549         .pools = pools,
   1550     };
   1551 }
   1552 
   1553 inline bool is_ignored_float16_3(int i) {
   1554   static std::set<int> ignore = {};
   1555   return ignore.find(i) != ignore.end();
   1556 }
   1557 
   1558 // Create the model
   1559 Model createTestModel_dynamic_output_shape_3() {
   1560     const std::vector<Operand> operands = {
   1561         {
   1562             .type = OperandType::TENSOR_FLOAT32,
   1563             .dimensions = {2, 2},
   1564             .numberOfConsumers = 1,
   1565             .scale = 0.0f,
   1566             .zeroPoint = 0,
   1567             .lifetime = OperandLifeTime::MODEL_INPUT,
   1568             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1569         },
   1570         {
   1571             .type = OperandType::INT32,
   1572             .dimensions = {},
   1573             .numberOfConsumers = 1,
   1574             .scale = 0.0f,
   1575             .zeroPoint = 0,
   1576             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1577             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1578         },
   1579         {
   1580             .type = OperandType::TENSOR_FLOAT32,
   1581             .dimensions = {0, 0, 0},
   1582             .numberOfConsumers = 0,
   1583             .scale = 0.0f,
   1584             .zeroPoint = 0,
   1585             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1586             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1587         }
   1588     };
   1589 
   1590     const std::vector<Operation> operations = {
   1591         {
   1592             .type = OperationType::EXPAND_DIMS,
   1593             .inputs = {0, 1},
   1594             .outputs = {2},
   1595         }
   1596     };
   1597 
   1598     const std::vector<uint32_t> inputIndexes = {0};
   1599     const std::vector<uint32_t> outputIndexes = {2};
   1600     std::vector<uint8_t> operandValues = {
   1601       2, 0, 0, 0
   1602     };
   1603     const std::vector<hidl_memory> pools = {};
   1604 
   1605     return {
   1606         .operands = operands,
   1607         .operations = operations,
   1608         .inputIndexes = inputIndexes,
   1609         .outputIndexes = outputIndexes,
   1610         .operandValues = operandValues,
   1611         .pools = pools,
   1612     };
   1613 }
   1614 
   1615 inline bool is_ignored_dynamic_output_shape_3(int i) {
   1616   static std::set<int> ignore = {};
   1617   return ignore.find(i) != ignore.end();
   1618 }
   1619 
   1620 // Create the model
   1621 Model createTestModel_dynamic_output_shape_relaxed_3() {
   1622     const std::vector<Operand> operands = {
   1623         {
   1624             .type = OperandType::TENSOR_FLOAT32,
   1625             .dimensions = {2, 2},
   1626             .numberOfConsumers = 1,
   1627             .scale = 0.0f,
   1628             .zeroPoint = 0,
   1629             .lifetime = OperandLifeTime::MODEL_INPUT,
   1630             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1631         },
   1632         {
   1633             .type = OperandType::INT32,
   1634             .dimensions = {},
   1635             .numberOfConsumers = 1,
   1636             .scale = 0.0f,
   1637             .zeroPoint = 0,
   1638             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1639             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1640         },
   1641         {
   1642             .type = OperandType::TENSOR_FLOAT32,
   1643             .dimensions = {0, 0, 0},
   1644             .numberOfConsumers = 0,
   1645             .scale = 0.0f,
   1646             .zeroPoint = 0,
   1647             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1648             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1649         }
   1650     };
   1651 
   1652     const std::vector<Operation> operations = {
   1653         {
   1654             .type = OperationType::EXPAND_DIMS,
   1655             .inputs = {0, 1},
   1656             .outputs = {2},
   1657         }
   1658     };
   1659 
   1660     const std::vector<uint32_t> inputIndexes = {0};
   1661     const std::vector<uint32_t> outputIndexes = {2};
   1662     std::vector<uint8_t> operandValues = {
   1663       2, 0, 0, 0
   1664     };
   1665     const std::vector<hidl_memory> pools = {};
   1666 
   1667     return {
   1668         .operands = operands,
   1669         .operations = operations,
   1670         .inputIndexes = inputIndexes,
   1671         .outputIndexes = outputIndexes,
   1672         .operandValues = operandValues,
   1673         .pools = pools,
   1674         .relaxComputationFloat32toFloat16 = true,
   1675     };
   1676 }
   1677 
   1678 inline bool is_ignored_dynamic_output_shape_relaxed_3(int i) {
   1679   static std::set<int> ignore = {};
   1680   return ignore.find(i) != ignore.end();
   1681 }
   1682 
   1683 // Create the model
   1684 Model createTestModel_dynamic_output_shape_quant8_3() {
   1685     const std::vector<Operand> operands = {
   1686         {
   1687             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1688             .dimensions = {2, 2},
   1689             .numberOfConsumers = 1,
   1690             .scale = 0.5f,
   1691             .zeroPoint = 127,
   1692             .lifetime = OperandLifeTime::MODEL_INPUT,
   1693             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1694         },
   1695         {
   1696             .type = OperandType::INT32,
   1697             .dimensions = {},
   1698             .numberOfConsumers = 1,
   1699             .scale = 0.0f,
   1700             .zeroPoint = 0,
   1701             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1702             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1703         },
   1704         {
   1705             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1706             .dimensions = {0, 0, 0},
   1707             .numberOfConsumers = 0,
   1708             .scale = 0.5f,
   1709             .zeroPoint = 127,
   1710             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1711             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1712         }
   1713     };
   1714 
   1715     const std::vector<Operation> operations = {
   1716         {
   1717             .type = OperationType::EXPAND_DIMS,
   1718             .inputs = {0, 1},
   1719             .outputs = {2},
   1720         }
   1721     };
   1722 
   1723     const std::vector<uint32_t> inputIndexes = {0};
   1724     const std::vector<uint32_t> outputIndexes = {2};
   1725     std::vector<uint8_t> operandValues = {
   1726       2, 0, 0, 0
   1727     };
   1728     const std::vector<hidl_memory> pools = {};
   1729 
   1730     return {
   1731         .operands = operands,
   1732         .operations = operations,
   1733         .inputIndexes = inputIndexes,
   1734         .outputIndexes = outputIndexes,
   1735         .operandValues = operandValues,
   1736         .pools = pools,
   1737     };
   1738 }
   1739 
   1740 inline bool is_ignored_dynamic_output_shape_quant8_3(int i) {
   1741   static std::set<int> ignore = {};
   1742   return ignore.find(i) != ignore.end();
   1743 }
   1744 
   1745 // Create the model
   1746 Model createTestModel_dynamic_output_shape_int32_3() {
   1747     const std::vector<Operand> operands = {
   1748         {
   1749             .type = OperandType::TENSOR_INT32,
   1750             .dimensions = {2, 2},
   1751             .numberOfConsumers = 1,
   1752             .scale = 0.0f,
   1753             .zeroPoint = 0,
   1754             .lifetime = OperandLifeTime::MODEL_INPUT,
   1755             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1756         },
   1757         {
   1758             .type = OperandType::INT32,
   1759             .dimensions = {},
   1760             .numberOfConsumers = 1,
   1761             .scale = 0.0f,
   1762             .zeroPoint = 0,
   1763             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1764             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1765         },
   1766         {
   1767             .type = OperandType::TENSOR_INT32,
   1768             .dimensions = {0, 0, 0},
   1769             .numberOfConsumers = 0,
   1770             .scale = 0.0f,
   1771             .zeroPoint = 0,
   1772             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1773             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1774         }
   1775     };
   1776 
   1777     const std::vector<Operation> operations = {
   1778         {
   1779             .type = OperationType::EXPAND_DIMS,
   1780             .inputs = {0, 1},
   1781             .outputs = {2},
   1782         }
   1783     };
   1784 
   1785     const std::vector<uint32_t> inputIndexes = {0};
   1786     const std::vector<uint32_t> outputIndexes = {2};
   1787     std::vector<uint8_t> operandValues = {
   1788       2, 0, 0, 0
   1789     };
   1790     const std::vector<hidl_memory> pools = {};
   1791 
   1792     return {
   1793         .operands = operands,
   1794         .operations = operations,
   1795         .inputIndexes = inputIndexes,
   1796         .outputIndexes = outputIndexes,
   1797         .operandValues = operandValues,
   1798         .pools = pools,
   1799     };
   1800 }
   1801 
   1802 inline bool is_ignored_dynamic_output_shape_int32_3(int i) {
   1803   static std::set<int> ignore = {};
   1804   return ignore.find(i) != ignore.end();
   1805 }
   1806 
   1807 // Create the model
   1808 Model createTestModel_dynamic_output_shape_float16_3() {
   1809     const std::vector<Operand> operands = {
   1810         {
   1811             .type = OperandType::TENSOR_FLOAT16,
   1812             .dimensions = {2, 2},
   1813             .numberOfConsumers = 1,
   1814             .scale = 0.0f,
   1815             .zeroPoint = 0,
   1816             .lifetime = OperandLifeTime::MODEL_INPUT,
   1817             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1818         },
   1819         {
   1820             .type = OperandType::INT32,
   1821             .dimensions = {},
   1822             .numberOfConsumers = 1,
   1823             .scale = 0.0f,
   1824             .zeroPoint = 0,
   1825             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1826             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1827         },
   1828         {
   1829             .type = OperandType::TENSOR_FLOAT16,
   1830             .dimensions = {0, 0, 0},
   1831             .numberOfConsumers = 0,
   1832             .scale = 0.0f,
   1833             .zeroPoint = 0,
   1834             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1835             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1836         }
   1837     };
   1838 
   1839     const std::vector<Operation> operations = {
   1840         {
   1841             .type = OperationType::EXPAND_DIMS,
   1842             .inputs = {0, 1},
   1843             .outputs = {2},
   1844         }
   1845     };
   1846 
   1847     const std::vector<uint32_t> inputIndexes = {0};
   1848     const std::vector<uint32_t> outputIndexes = {2};
   1849     std::vector<uint8_t> operandValues = {
   1850       2, 0, 0, 0
   1851     };
   1852     const std::vector<hidl_memory> pools = {};
   1853 
   1854     return {
   1855         .operands = operands,
   1856         .operations = operations,
   1857         .inputIndexes = inputIndexes,
   1858         .outputIndexes = outputIndexes,
   1859         .operandValues = operandValues,
   1860         .pools = pools,
   1861     };
   1862 }
   1863 
   1864 inline bool is_ignored_dynamic_output_shape_float16_3(int i) {
   1865   static std::set<int> ignore = {};
   1866   return ignore.find(i) != ignore.end();
   1867 }
   1868 
   1869 // Create the model
   1870 Model createTestModel_4() {
   1871     const std::vector<Operand> operands = {
   1872         {
   1873             .type = OperandType::TENSOR_FLOAT32,
   1874             .dimensions = {2, 2},
   1875             .numberOfConsumers = 1,
   1876             .scale = 0.0f,
   1877             .zeroPoint = 0,
   1878             .lifetime = OperandLifeTime::MODEL_INPUT,
   1879             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1880         },
   1881         {
   1882             .type = OperandType::INT32,
   1883             .dimensions = {},
   1884             .numberOfConsumers = 1,
   1885             .scale = 0.0f,
   1886             .zeroPoint = 0,
   1887             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1888             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1889         },
   1890         {
   1891             .type = OperandType::TENSOR_FLOAT32,
   1892             .dimensions = {2, 2, 1},
   1893             .numberOfConsumers = 0,
   1894             .scale = 0.0f,
   1895             .zeroPoint = 0,
   1896             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1897             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1898         }
   1899     };
   1900 
   1901     const std::vector<Operation> operations = {
   1902         {
   1903             .type = OperationType::EXPAND_DIMS,
   1904             .inputs = {0, 1},
   1905             .outputs = {2},
   1906         }
   1907     };
   1908 
   1909     const std::vector<uint32_t> inputIndexes = {0};
   1910     const std::vector<uint32_t> outputIndexes = {2};
   1911     std::vector<uint8_t> operandValues = {
   1912       255, 255, 255, 255
   1913     };
   1914     const std::vector<hidl_memory> pools = {};
   1915 
   1916     return {
   1917         .operands = operands,
   1918         .operations = operations,
   1919         .inputIndexes = inputIndexes,
   1920         .outputIndexes = outputIndexes,
   1921         .operandValues = operandValues,
   1922         .pools = pools,
   1923     };
   1924 }
   1925 
   1926 inline bool is_ignored_4(int i) {
   1927   static std::set<int> ignore = {};
   1928   return ignore.find(i) != ignore.end();
   1929 }
   1930 
   1931 // Create the model
   1932 Model createTestModel_relaxed_4() {
   1933     const std::vector<Operand> operands = {
   1934         {
   1935             .type = OperandType::TENSOR_FLOAT32,
   1936             .dimensions = {2, 2},
   1937             .numberOfConsumers = 1,
   1938             .scale = 0.0f,
   1939             .zeroPoint = 0,
   1940             .lifetime = OperandLifeTime::MODEL_INPUT,
   1941             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1942         },
   1943         {
   1944             .type = OperandType::INT32,
   1945             .dimensions = {},
   1946             .numberOfConsumers = 1,
   1947             .scale = 0.0f,
   1948             .zeroPoint = 0,
   1949             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1950             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1951         },
   1952         {
   1953             .type = OperandType::TENSOR_FLOAT32,
   1954             .dimensions = {2, 2, 1},
   1955             .numberOfConsumers = 0,
   1956             .scale = 0.0f,
   1957             .zeroPoint = 0,
   1958             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1959             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1960         }
   1961     };
   1962 
   1963     const std::vector<Operation> operations = {
   1964         {
   1965             .type = OperationType::EXPAND_DIMS,
   1966             .inputs = {0, 1},
   1967             .outputs = {2},
   1968         }
   1969     };
   1970 
   1971     const std::vector<uint32_t> inputIndexes = {0};
   1972     const std::vector<uint32_t> outputIndexes = {2};
   1973     std::vector<uint8_t> operandValues = {
   1974       255, 255, 255, 255
   1975     };
   1976     const std::vector<hidl_memory> pools = {};
   1977 
   1978     return {
   1979         .operands = operands,
   1980         .operations = operations,
   1981         .inputIndexes = inputIndexes,
   1982         .outputIndexes = outputIndexes,
   1983         .operandValues = operandValues,
   1984         .pools = pools,
   1985         .relaxComputationFloat32toFloat16 = true,
   1986     };
   1987 }
   1988 
   1989 inline bool is_ignored_relaxed_4(int i) {
   1990   static std::set<int> ignore = {};
   1991   return ignore.find(i) != ignore.end();
   1992 }
   1993 
   1994 // Create the model
   1995 Model createTestModel_quant8_4() {
   1996     const std::vector<Operand> operands = {
   1997         {
   1998             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1999             .dimensions = {2, 2},
   2000             .numberOfConsumers = 1,
   2001             .scale = 0.5f,
   2002             .zeroPoint = 127,
   2003             .lifetime = OperandLifeTime::MODEL_INPUT,
   2004             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2005         },
   2006         {
   2007             .type = OperandType::INT32,
   2008             .dimensions = {},
   2009             .numberOfConsumers = 1,
   2010             .scale = 0.0f,
   2011             .zeroPoint = 0,
   2012             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2013             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2014         },
   2015         {
   2016             .type = OperandType::TENSOR_QUANT8_ASYMM,
   2017             .dimensions = {2, 2, 1},
   2018             .numberOfConsumers = 0,
   2019             .scale = 0.5f,
   2020             .zeroPoint = 127,
   2021             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2022             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2023         }
   2024     };
   2025 
   2026     const std::vector<Operation> operations = {
   2027         {
   2028             .type = OperationType::EXPAND_DIMS,
   2029             .inputs = {0, 1},
   2030             .outputs = {2},
   2031         }
   2032     };
   2033 
   2034     const std::vector<uint32_t> inputIndexes = {0};
   2035     const std::vector<uint32_t> outputIndexes = {2};
   2036     std::vector<uint8_t> operandValues = {
   2037       255, 255, 255, 255
   2038     };
   2039     const std::vector<hidl_memory> pools = {};
   2040 
   2041     return {
   2042         .operands = operands,
   2043         .operations = operations,
   2044         .inputIndexes = inputIndexes,
   2045         .outputIndexes = outputIndexes,
   2046         .operandValues = operandValues,
   2047         .pools = pools,
   2048     };
   2049 }
   2050 
   2051 inline bool is_ignored_quant8_4(int i) {
   2052   static std::set<int> ignore = {};
   2053   return ignore.find(i) != ignore.end();
   2054 }
   2055 
   2056 // Create the model
   2057 Model createTestModel_int32_4() {
   2058     const std::vector<Operand> operands = {
   2059         {
   2060             .type = OperandType::TENSOR_INT32,
   2061             .dimensions = {2, 2},
   2062             .numberOfConsumers = 1,
   2063             .scale = 0.0f,
   2064             .zeroPoint = 0,
   2065             .lifetime = OperandLifeTime::MODEL_INPUT,
   2066             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2067         },
   2068         {
   2069             .type = OperandType::INT32,
   2070             .dimensions = {},
   2071             .numberOfConsumers = 1,
   2072             .scale = 0.0f,
   2073             .zeroPoint = 0,
   2074             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2075             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2076         },
   2077         {
   2078             .type = OperandType::TENSOR_INT32,
   2079             .dimensions = {2, 2, 1},
   2080             .numberOfConsumers = 0,
   2081             .scale = 0.0f,
   2082             .zeroPoint = 0,
   2083             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2084             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2085         }
   2086     };
   2087 
   2088     const std::vector<Operation> operations = {
   2089         {
   2090             .type = OperationType::EXPAND_DIMS,
   2091             .inputs = {0, 1},
   2092             .outputs = {2},
   2093         }
   2094     };
   2095 
   2096     const std::vector<uint32_t> inputIndexes = {0};
   2097     const std::vector<uint32_t> outputIndexes = {2};
   2098     std::vector<uint8_t> operandValues = {
   2099       255, 255, 255, 255
   2100     };
   2101     const std::vector<hidl_memory> pools = {};
   2102 
   2103     return {
   2104         .operands = operands,
   2105         .operations = operations,
   2106         .inputIndexes = inputIndexes,
   2107         .outputIndexes = outputIndexes,
   2108         .operandValues = operandValues,
   2109         .pools = pools,
   2110     };
   2111 }
   2112 
   2113 inline bool is_ignored_int32_4(int i) {
   2114   static std::set<int> ignore = {};
   2115   return ignore.find(i) != ignore.end();
   2116 }
   2117 
   2118 // Create the model
   2119 Model createTestModel_float16_4() {
   2120     const std::vector<Operand> operands = {
   2121         {
   2122             .type = OperandType::TENSOR_FLOAT16,
   2123             .dimensions = {2, 2},
   2124             .numberOfConsumers = 1,
   2125             .scale = 0.0f,
   2126             .zeroPoint = 0,
   2127             .lifetime = OperandLifeTime::MODEL_INPUT,
   2128             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2129         },
   2130         {
   2131             .type = OperandType::INT32,
   2132             .dimensions = {},
   2133             .numberOfConsumers = 1,
   2134             .scale = 0.0f,
   2135             .zeroPoint = 0,
   2136             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2137             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2138         },
   2139         {
   2140             .type = OperandType::TENSOR_FLOAT16,
   2141             .dimensions = {2, 2, 1},
   2142             .numberOfConsumers = 0,
   2143             .scale = 0.0f,
   2144             .zeroPoint = 0,
   2145             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2146             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2147         }
   2148     };
   2149 
   2150     const std::vector<Operation> operations = {
   2151         {
   2152             .type = OperationType::EXPAND_DIMS,
   2153             .inputs = {0, 1},
   2154             .outputs = {2},
   2155         }
   2156     };
   2157 
   2158     const std::vector<uint32_t> inputIndexes = {0};
   2159     const std::vector<uint32_t> outputIndexes = {2};
   2160     std::vector<uint8_t> operandValues = {
   2161       255, 255, 255, 255
   2162     };
   2163     const std::vector<hidl_memory> pools = {};
   2164 
   2165     return {
   2166         .operands = operands,
   2167         .operations = operations,
   2168         .inputIndexes = inputIndexes,
   2169         .outputIndexes = outputIndexes,
   2170         .operandValues = operandValues,
   2171         .pools = pools,
   2172     };
   2173 }
   2174 
   2175 inline bool is_ignored_float16_4(int i) {
   2176   static std::set<int> ignore = {};
   2177   return ignore.find(i) != ignore.end();
   2178 }
   2179 
   2180 // Create the model
   2181 Model createTestModel_dynamic_output_shape_4() {
   2182     const std::vector<Operand> operands = {
   2183         {
   2184             .type = OperandType::TENSOR_FLOAT32,
   2185             .dimensions = {2, 2},
   2186             .numberOfConsumers = 1,
   2187             .scale = 0.0f,
   2188             .zeroPoint = 0,
   2189             .lifetime = OperandLifeTime::MODEL_INPUT,
   2190             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2191         },
   2192         {
   2193             .type = OperandType::INT32,
   2194             .dimensions = {},
   2195             .numberOfConsumers = 1,
   2196             .scale = 0.0f,
   2197             .zeroPoint = 0,
   2198             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2199             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2200         },
   2201         {
   2202             .type = OperandType::TENSOR_FLOAT32,
   2203             .dimensions = {0, 0, 0},
   2204             .numberOfConsumers = 0,
   2205             .scale = 0.0f,
   2206             .zeroPoint = 0,
   2207             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2208             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2209         }
   2210     };
   2211 
   2212     const std::vector<Operation> operations = {
   2213         {
   2214             .type = OperationType::EXPAND_DIMS,
   2215             .inputs = {0, 1},
   2216             .outputs = {2},
   2217         }
   2218     };
   2219 
   2220     const std::vector<uint32_t> inputIndexes = {0};
   2221     const std::vector<uint32_t> outputIndexes = {2};
   2222     std::vector<uint8_t> operandValues = {
   2223       255, 255, 255, 255
   2224     };
   2225     const std::vector<hidl_memory> pools = {};
   2226 
   2227     return {
   2228         .operands = operands,
   2229         .operations = operations,
   2230         .inputIndexes = inputIndexes,
   2231         .outputIndexes = outputIndexes,
   2232         .operandValues = operandValues,
   2233         .pools = pools,
   2234     };
   2235 }
   2236 
   2237 inline bool is_ignored_dynamic_output_shape_4(int i) {
   2238   static std::set<int> ignore = {};
   2239   return ignore.find(i) != ignore.end();
   2240 }
   2241 
   2242 // Create the model
   2243 Model createTestModel_dynamic_output_shape_relaxed_4() {
   2244     const std::vector<Operand> operands = {
   2245         {
   2246             .type = OperandType::TENSOR_FLOAT32,
   2247             .dimensions = {2, 2},
   2248             .numberOfConsumers = 1,
   2249             .scale = 0.0f,
   2250             .zeroPoint = 0,
   2251             .lifetime = OperandLifeTime::MODEL_INPUT,
   2252             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2253         },
   2254         {
   2255             .type = OperandType::INT32,
   2256             .dimensions = {},
   2257             .numberOfConsumers = 1,
   2258             .scale = 0.0f,
   2259             .zeroPoint = 0,
   2260             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2261             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2262         },
   2263         {
   2264             .type = OperandType::TENSOR_FLOAT32,
   2265             .dimensions = {0, 0, 0},
   2266             .numberOfConsumers = 0,
   2267             .scale = 0.0f,
   2268             .zeroPoint = 0,
   2269             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2270             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2271         }
   2272     };
   2273 
   2274     const std::vector<Operation> operations = {
   2275         {
   2276             .type = OperationType::EXPAND_DIMS,
   2277             .inputs = {0, 1},
   2278             .outputs = {2},
   2279         }
   2280     };
   2281 
   2282     const std::vector<uint32_t> inputIndexes = {0};
   2283     const std::vector<uint32_t> outputIndexes = {2};
   2284     std::vector<uint8_t> operandValues = {
   2285       255, 255, 255, 255
   2286     };
   2287     const std::vector<hidl_memory> pools = {};
   2288 
   2289     return {
   2290         .operands = operands,
   2291         .operations = operations,
   2292         .inputIndexes = inputIndexes,
   2293         .outputIndexes = outputIndexes,
   2294         .operandValues = operandValues,
   2295         .pools = pools,
   2296         .relaxComputationFloat32toFloat16 = true,
   2297     };
   2298 }
   2299 
   2300 inline bool is_ignored_dynamic_output_shape_relaxed_4(int i) {
   2301   static std::set<int> ignore = {};
   2302   return ignore.find(i) != ignore.end();
   2303 }
   2304 
   2305 // Create the model
   2306 Model createTestModel_dynamic_output_shape_quant8_4() {
   2307     const std::vector<Operand> operands = {
   2308         {
   2309             .type = OperandType::TENSOR_QUANT8_ASYMM,
   2310             .dimensions = {2, 2},
   2311             .numberOfConsumers = 1,
   2312             .scale = 0.5f,
   2313             .zeroPoint = 127,
   2314             .lifetime = OperandLifeTime::MODEL_INPUT,
   2315             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2316         },
   2317         {
   2318             .type = OperandType::INT32,
   2319             .dimensions = {},
   2320             .numberOfConsumers = 1,
   2321             .scale = 0.0f,
   2322             .zeroPoint = 0,
   2323             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2324             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2325         },
   2326         {
   2327             .type = OperandType::TENSOR_QUANT8_ASYMM,
   2328             .dimensions = {0, 0, 0},
   2329             .numberOfConsumers = 0,
   2330             .scale = 0.5f,
   2331             .zeroPoint = 127,
   2332             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2333             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2334         }
   2335     };
   2336 
   2337     const std::vector<Operation> operations = {
   2338         {
   2339             .type = OperationType::EXPAND_DIMS,
   2340             .inputs = {0, 1},
   2341             .outputs = {2},
   2342         }
   2343     };
   2344 
   2345     const std::vector<uint32_t> inputIndexes = {0};
   2346     const std::vector<uint32_t> outputIndexes = {2};
   2347     std::vector<uint8_t> operandValues = {
   2348       255, 255, 255, 255
   2349     };
   2350     const std::vector<hidl_memory> pools = {};
   2351 
   2352     return {
   2353         .operands = operands,
   2354         .operations = operations,
   2355         .inputIndexes = inputIndexes,
   2356         .outputIndexes = outputIndexes,
   2357         .operandValues = operandValues,
   2358         .pools = pools,
   2359     };
   2360 }
   2361 
   2362 inline bool is_ignored_dynamic_output_shape_quant8_4(int i) {
   2363   static std::set<int> ignore = {};
   2364   return ignore.find(i) != ignore.end();
   2365 }
   2366 
   2367 // Create the model
   2368 Model createTestModel_dynamic_output_shape_int32_4() {
   2369     const std::vector<Operand> operands = {
   2370         {
   2371             .type = OperandType::TENSOR_INT32,
   2372             .dimensions = {2, 2},
   2373             .numberOfConsumers = 1,
   2374             .scale = 0.0f,
   2375             .zeroPoint = 0,
   2376             .lifetime = OperandLifeTime::MODEL_INPUT,
   2377             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2378         },
   2379         {
   2380             .type = OperandType::INT32,
   2381             .dimensions = {},
   2382             .numberOfConsumers = 1,
   2383             .scale = 0.0f,
   2384             .zeroPoint = 0,
   2385             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2386             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2387         },
   2388         {
   2389             .type = OperandType::TENSOR_INT32,
   2390             .dimensions = {0, 0, 0},
   2391             .numberOfConsumers = 0,
   2392             .scale = 0.0f,
   2393             .zeroPoint = 0,
   2394             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2395             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2396         }
   2397     };
   2398 
   2399     const std::vector<Operation> operations = {
   2400         {
   2401             .type = OperationType::EXPAND_DIMS,
   2402             .inputs = {0, 1},
   2403             .outputs = {2},
   2404         }
   2405     };
   2406 
   2407     const std::vector<uint32_t> inputIndexes = {0};
   2408     const std::vector<uint32_t> outputIndexes = {2};
   2409     std::vector<uint8_t> operandValues = {
   2410       255, 255, 255, 255
   2411     };
   2412     const std::vector<hidl_memory> pools = {};
   2413 
   2414     return {
   2415         .operands = operands,
   2416         .operations = operations,
   2417         .inputIndexes = inputIndexes,
   2418         .outputIndexes = outputIndexes,
   2419         .operandValues = operandValues,
   2420         .pools = pools,
   2421     };
   2422 }
   2423 
   2424 inline bool is_ignored_dynamic_output_shape_int32_4(int i) {
   2425   static std::set<int> ignore = {};
   2426   return ignore.find(i) != ignore.end();
   2427 }
   2428 
   2429 // Create the model
   2430 Model createTestModel_dynamic_output_shape_float16_4() {
   2431     const std::vector<Operand> operands = {
   2432         {
   2433             .type = OperandType::TENSOR_FLOAT16,
   2434             .dimensions = {2, 2},
   2435             .numberOfConsumers = 1,
   2436             .scale = 0.0f,
   2437             .zeroPoint = 0,
   2438             .lifetime = OperandLifeTime::MODEL_INPUT,
   2439             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2440         },
   2441         {
   2442             .type = OperandType::INT32,
   2443             .dimensions = {},
   2444             .numberOfConsumers = 1,
   2445             .scale = 0.0f,
   2446             .zeroPoint = 0,
   2447             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2448             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2449         },
   2450         {
   2451             .type = OperandType::TENSOR_FLOAT16,
   2452             .dimensions = {0, 0, 0},
   2453             .numberOfConsumers = 0,
   2454             .scale = 0.0f,
   2455             .zeroPoint = 0,
   2456             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2457             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2458         }
   2459     };
   2460 
   2461     const std::vector<Operation> operations = {
   2462         {
   2463             .type = OperationType::EXPAND_DIMS,
   2464             .inputs = {0, 1},
   2465             .outputs = {2},
   2466         }
   2467     };
   2468 
   2469     const std::vector<uint32_t> inputIndexes = {0};
   2470     const std::vector<uint32_t> outputIndexes = {2};
   2471     std::vector<uint8_t> operandValues = {
   2472       255, 255, 255, 255
   2473     };
   2474     const std::vector<hidl_memory> pools = {};
   2475 
   2476     return {
   2477         .operands = operands,
   2478         .operations = operations,
   2479         .inputIndexes = inputIndexes,
   2480         .outputIndexes = outputIndexes,
   2481         .operandValues = operandValues,
   2482         .pools = pools,
   2483     };
   2484 }
   2485 
   2486 inline bool is_ignored_dynamic_output_shape_float16_4(int i) {
   2487   static std::set<int> ignore = {};
   2488   return ignore.find(i) != ignore.end();
   2489 }
   2490 
   2491