Home | History | Annotate | Download | only in vts_models
      1 // clang-format off
      2 // Generated file (from: bbox_graph.mod.py). Do not edit
      3 // Create the model
      4 Model createTestModel_zero_sized() {
      5     const std::vector<Operand> operands = {
      6         {
      7             .type = OperandType::TENSOR_FLOAT32,
      8             .dimensions = {1, 1, 1, 1},
      9             .numberOfConsumers = 1,
     10             .scale = 0.0f,
     11             .zeroPoint = 0,
     12             .lifetime = OperandLifeTime::MODEL_INPUT,
     13             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     14         },
     15         {
     16             .type = OperandType::TENSOR_FLOAT32,
     17             .dimensions = {1, 1, 1, 4},
     18             .numberOfConsumers = 1,
     19             .scale = 0.0f,
     20             .zeroPoint = 0,
     21             .lifetime = OperandLifeTime::MODEL_INPUT,
     22             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     23         },
     24         {
     25             .type = OperandType::TENSOR_FLOAT32,
     26             .dimensions = {1, 4},
     27             .numberOfConsumers = 1,
     28             .scale = 0.0f,
     29             .zeroPoint = 0,
     30             .lifetime = OperandLifeTime::MODEL_INPUT,
     31             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     32         },
     33         {
     34             .type = OperandType::TENSOR_FLOAT32,
     35             .dimensions = {1, 2},
     36             .numberOfConsumers = 2,
     37             .scale = 0.0f,
     38             .zeroPoint = 0,
     39             .lifetime = OperandLifeTime::MODEL_INPUT,
     40             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     41         },
     42         {
     43             .type = OperandType::FLOAT32,
     44             .dimensions = {},
     45             .numberOfConsumers = 1,
     46             .scale = 0.0f,
     47             .zeroPoint = 0,
     48             .lifetime = OperandLifeTime::CONSTANT_COPY,
     49             .location = {.poolIndex = 0, .offset = 0, .length = 4},
     50         },
     51         {
     52             .type = OperandType::FLOAT32,
     53             .dimensions = {},
     54             .numberOfConsumers = 1,
     55             .scale = 0.0f,
     56             .zeroPoint = 0,
     57             .lifetime = OperandLifeTime::CONSTANT_COPY,
     58             .location = {.poolIndex = 0, .offset = 4, .length = 4},
     59         },
     60         {
     61             .type = OperandType::INT32,
     62             .dimensions = {},
     63             .numberOfConsumers = 1,
     64             .scale = 0.0f,
     65             .zeroPoint = 0,
     66             .lifetime = OperandLifeTime::CONSTANT_COPY,
     67             .location = {.poolIndex = 0, .offset = 8, .length = 4},
     68         },
     69         {
     70             .type = OperandType::INT32,
     71             .dimensions = {},
     72             .numberOfConsumers = 1,
     73             .scale = 0.0f,
     74             .zeroPoint = 0,
     75             .lifetime = OperandLifeTime::CONSTANT_COPY,
     76             .location = {.poolIndex = 0, .offset = 12, .length = 4},
     77         },
     78         {
     79             .type = OperandType::FLOAT32,
     80             .dimensions = {},
     81             .numberOfConsumers = 1,
     82             .scale = 0.0f,
     83             .zeroPoint = 0,
     84             .lifetime = OperandLifeTime::CONSTANT_COPY,
     85             .location = {.poolIndex = 0, .offset = 16, .length = 4},
     86         },
     87         {
     88             .type = OperandType::FLOAT32,
     89             .dimensions = {},
     90             .numberOfConsumers = 1,
     91             .scale = 0.0f,
     92             .zeroPoint = 0,
     93             .lifetime = OperandLifeTime::CONSTANT_COPY,
     94             .location = {.poolIndex = 0, .offset = 20, .length = 4},
     95         },
     96         {
     97             .type = OperandType::BOOL,
     98             .dimensions = {},
     99             .numberOfConsumers = 2,
    100             .scale = 0.0f,
    101             .zeroPoint = 0,
    102             .lifetime = OperandLifeTime::CONSTANT_COPY,
    103             .location = {.poolIndex = 0, .offset = 24, .length = 1},
    104         },
    105         {
    106             .type = OperandType::TENSOR_FLOAT32,
    107             .dimensions = {0},
    108             .numberOfConsumers = 0,
    109             .scale = 0.0f,
    110             .zeroPoint = 0,
    111             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    112             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    113         },
    114         {
    115             .type = OperandType::TENSOR_FLOAT32,
    116             .dimensions = {0, 4},
    117             .numberOfConsumers = 2,
    118             .scale = 0.0f,
    119             .zeroPoint = 0,
    120             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    121             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    122         },
    123         {
    124             .type = OperandType::TENSOR_INT32,
    125             .dimensions = {0},
    126             .numberOfConsumers = 3,
    127             .scale = 0.0f,
    128             .zeroPoint = 0,
    129             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    130             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    131         },
    132         {
    133             .type = OperandType::TENSOR_FLOAT32,
    134             .dimensions = {1, 1, 1, 1},
    135             .numberOfConsumers = 1,
    136             .scale = 0.0f,
    137             .zeroPoint = 0,
    138             .lifetime = OperandLifeTime::MODEL_INPUT,
    139             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    140         },
    141         {
    142             .type = OperandType::INT32,
    143             .dimensions = {},
    144             .numberOfConsumers = 1,
    145             .scale = 0.0f,
    146             .zeroPoint = 0,
    147             .lifetime = OperandLifeTime::CONSTANT_COPY,
    148             .location = {.poolIndex = 0, .offset = 25, .length = 4},
    149         },
    150         {
    151             .type = OperandType::INT32,
    152             .dimensions = {},
    153             .numberOfConsumers = 1,
    154             .scale = 0.0f,
    155             .zeroPoint = 0,
    156             .lifetime = OperandLifeTime::CONSTANT_COPY,
    157             .location = {.poolIndex = 0, .offset = 29, .length = 4},
    158         },
    159         {
    160             .type = OperandType::FLOAT32,
    161             .dimensions = {},
    162             .numberOfConsumers = 1,
    163             .scale = 0.0f,
    164             .zeroPoint = 0,
    165             .lifetime = OperandLifeTime::CONSTANT_COPY,
    166             .location = {.poolIndex = 0, .offset = 33, .length = 4},
    167         },
    168         {
    169             .type = OperandType::FLOAT32,
    170             .dimensions = {},
    171             .numberOfConsumers = 1,
    172             .scale = 0.0f,
    173             .zeroPoint = 0,
    174             .lifetime = OperandLifeTime::CONSTANT_COPY,
    175             .location = {.poolIndex = 0, .offset = 37, .length = 4},
    176         },
    177         {
    178             .type = OperandType::INT32,
    179             .dimensions = {},
    180             .numberOfConsumers = 1,
    181             .scale = 0.0f,
    182             .zeroPoint = 0,
    183             .lifetime = OperandLifeTime::CONSTANT_COPY,
    184             .location = {.poolIndex = 0, .offset = 41, .length = 4},
    185         },
    186         {
    187             .type = OperandType::INT32,
    188             .dimensions = {},
    189             .numberOfConsumers = 1,
    190             .scale = 0.0f,
    191             .zeroPoint = 0,
    192             .lifetime = OperandLifeTime::CONSTANT_COPY,
    193             .location = {.poolIndex = 0, .offset = 45, .length = 4},
    194         },
    195         {
    196             .type = OperandType::TENSOR_FLOAT32,
    197             .dimensions = {0, 2, 2, 1},
    198             .numberOfConsumers = 2,
    199             .scale = 0.0f,
    200             .zeroPoint = 0,
    201             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    202             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    203         },
    204         {
    205             .type = OperandType::TENSOR_FLOAT32,
    206             .dimensions = {8, 4},
    207             .numberOfConsumers = 1,
    208             .scale = 0.0f,
    209             .zeroPoint = 0,
    210             .lifetime = OperandLifeTime::CONSTANT_COPY,
    211             .location = {.poolIndex = 0, .offset = 49, .length = 128},
    212         },
    213         {
    214             .type = OperandType::TENSOR_FLOAT32,
    215             .dimensions = {8},
    216             .numberOfConsumers = 1,
    217             .scale = 0.0f,
    218             .zeroPoint = 0,
    219             .lifetime = OperandLifeTime::CONSTANT_COPY,
    220             .location = {.poolIndex = 0, .offset = 177, .length = 32},
    221         },
    222         {
    223             .type = OperandType::INT32,
    224             .dimensions = {},
    225             .numberOfConsumers = 1,
    226             .scale = 0.0f,
    227             .zeroPoint = 0,
    228             .lifetime = OperandLifeTime::CONSTANT_COPY,
    229             .location = {.poolIndex = 0, .offset = 209, .length = 4},
    230         },
    231         {
    232             .type = OperandType::TENSOR_FLOAT32,
    233             .dimensions = {0, 8},
    234             .numberOfConsumers = 1,
    235             .scale = 0.0f,
    236             .zeroPoint = 0,
    237             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    238             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    239         },
    240         {
    241             .type = OperandType::TENSOR_FLOAT32,
    242             .dimensions = {2, 4},
    243             .numberOfConsumers = 1,
    244             .scale = 0.0f,
    245             .zeroPoint = 0,
    246             .lifetime = OperandLifeTime::CONSTANT_COPY,
    247             .location = {.poolIndex = 0, .offset = 213, .length = 32},
    248         },
    249         {
    250             .type = OperandType::TENSOR_FLOAT32,
    251             .dimensions = {2},
    252             .numberOfConsumers = 1,
    253             .scale = 0.0f,
    254             .zeroPoint = 0,
    255             .lifetime = OperandLifeTime::CONSTANT_COPY,
    256             .location = {.poolIndex = 0, .offset = 245, .length = 8},
    257         },
    258         {
    259             .type = OperandType::INT32,
    260             .dimensions = {},
    261             .numberOfConsumers = 1,
    262             .scale = 0.0f,
    263             .zeroPoint = 0,
    264             .lifetime = OperandLifeTime::CONSTANT_COPY,
    265             .location = {.poolIndex = 0, .offset = 253, .length = 4},
    266         },
    267         {
    268             .type = OperandType::TENSOR_FLOAT32,
    269             .dimensions = {0, 2},
    270             .numberOfConsumers = 1,
    271             .scale = 0.0f,
    272             .zeroPoint = 0,
    273             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    274             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    275         },
    276         {
    277             .type = OperandType::TENSOR_FLOAT32,
    278             .dimensions = {0, 8},
    279             .numberOfConsumers = 1,
    280             .scale = 0.0f,
    281             .zeroPoint = 0,
    282             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    283             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    284         },
    285         {
    286             .type = OperandType::FLOAT32,
    287             .dimensions = {},
    288             .numberOfConsumers = 1,
    289             .scale = 0.0f,
    290             .zeroPoint = 0,
    291             .lifetime = OperandLifeTime::CONSTANT_COPY,
    292             .location = {.poolIndex = 0, .offset = 257, .length = 4},
    293         },
    294         {
    295             .type = OperandType::INT32,
    296             .dimensions = {},
    297             .numberOfConsumers = 1,
    298             .scale = 0.0f,
    299             .zeroPoint = 0,
    300             .lifetime = OperandLifeTime::CONSTANT_COPY,
    301             .location = {.poolIndex = 0, .offset = 261, .length = 4},
    302         },
    303         {
    304             .type = OperandType::INT32,
    305             .dimensions = {},
    306             .numberOfConsumers = 1,
    307             .scale = 0.0f,
    308             .zeroPoint = 0,
    309             .lifetime = OperandLifeTime::CONSTANT_COPY,
    310             .location = {.poolIndex = 0, .offset = 265, .length = 4},
    311         },
    312         {
    313             .type = OperandType::FLOAT32,
    314             .dimensions = {},
    315             .numberOfConsumers = 1,
    316             .scale = 0.0f,
    317             .zeroPoint = 0,
    318             .lifetime = OperandLifeTime::CONSTANT_COPY,
    319             .location = {.poolIndex = 0, .offset = 269, .length = 4},
    320         },
    321         {
    322             .type = OperandType::FLOAT32,
    323             .dimensions = {},
    324             .numberOfConsumers = 1,
    325             .scale = 0.0f,
    326             .zeroPoint = 0,
    327             .lifetime = OperandLifeTime::CONSTANT_COPY,
    328             .location = {.poolIndex = 0, .offset = 273, .length = 4},
    329         },
    330         {
    331             .type = OperandType::FLOAT32,
    332             .dimensions = {},
    333             .numberOfConsumers = 1,
    334             .scale = 0.0f,
    335             .zeroPoint = 0,
    336             .lifetime = OperandLifeTime::CONSTANT_COPY,
    337             .location = {.poolIndex = 0, .offset = 277, .length = 4},
    338         },
    339         {
    340             .type = OperandType::TENSOR_FLOAT32,
    341             .dimensions = {0},
    342             .numberOfConsumers = 0,
    343             .scale = 0.0f,
    344             .zeroPoint = 0,
    345             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    346             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    347         },
    348         {
    349             .type = OperandType::TENSOR_FLOAT32,
    350             .dimensions = {0, 4},
    351             .numberOfConsumers = 0,
    352             .scale = 0.0f,
    353             .zeroPoint = 0,
    354             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    355             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    356         },
    357         {
    358             .type = OperandType::TENSOR_INT32,
    359             .dimensions = {0},
    360             .numberOfConsumers = 0,
    361             .scale = 0.0f,
    362             .zeroPoint = 0,
    363             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    364             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    365         },
    366         {
    367             .type = OperandType::TENSOR_INT32,
    368             .dimensions = {0},
    369             .numberOfConsumers = 0,
    370             .scale = 0.0f,
    371             .zeroPoint = 0,
    372             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    373             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    374         }
    375     };
    376 
    377     const std::vector<Operation> operations = {
    378         {
    379             .type = OperationType::GENERATE_PROPOSALS,
    380             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
    381             .outputs = {11, 12, 13},
    382         },
    383         {
    384             .type = OperationType::ROI_ALIGN,
    385             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
    386             .outputs = {21},
    387         },
    388         {
    389             .type = OperationType::FULLY_CONNECTED,
    390             .inputs = {21, 22, 23, 24},
    391             .outputs = {25},
    392         },
    393         {
    394             .type = OperationType::FULLY_CONNECTED,
    395             .inputs = {21, 26, 27, 28},
    396             .outputs = {29},
    397         },
    398         {
    399             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
    400             .inputs = {12, 25, 13, 3},
    401             .outputs = {30},
    402         },
    403         {
    404             .type = OperationType::BOX_WITH_NMS_LIMIT,
    405             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
    406             .outputs = {37, 38, 39, 40},
    407         }
    408     };
    409 
    410     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
    411     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
    412     std::vector<uint8_t> operandValues = {
    413       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
    414     };
    415     const std::vector<hidl_memory> pools = {};
    416 
    417     return {
    418         .operands = operands,
    419         .operations = operations,
    420         .inputIndexes = inputIndexes,
    421         .outputIndexes = outputIndexes,
    422         .operandValues = operandValues,
    423         .pools = pools,
    424     };
    425 }
    426 
    427 inline bool is_ignored_zero_sized(int i) {
    428   static std::set<int> ignore = {};
    429   return ignore.find(i) != ignore.end();
    430 }
    431 
    432 // Create the model
    433 Model createTestModel_zero_sized_relaxed() {
    434     const std::vector<Operand> operands = {
    435         {
    436             .type = OperandType::TENSOR_FLOAT32,
    437             .dimensions = {1, 1, 1, 1},
    438             .numberOfConsumers = 1,
    439             .scale = 0.0f,
    440             .zeroPoint = 0,
    441             .lifetime = OperandLifeTime::MODEL_INPUT,
    442             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    443         },
    444         {
    445             .type = OperandType::TENSOR_FLOAT32,
    446             .dimensions = {1, 1, 1, 4},
    447             .numberOfConsumers = 1,
    448             .scale = 0.0f,
    449             .zeroPoint = 0,
    450             .lifetime = OperandLifeTime::MODEL_INPUT,
    451             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    452         },
    453         {
    454             .type = OperandType::TENSOR_FLOAT32,
    455             .dimensions = {1, 4},
    456             .numberOfConsumers = 1,
    457             .scale = 0.0f,
    458             .zeroPoint = 0,
    459             .lifetime = OperandLifeTime::MODEL_INPUT,
    460             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    461         },
    462         {
    463             .type = OperandType::TENSOR_FLOAT32,
    464             .dimensions = {1, 2},
    465             .numberOfConsumers = 2,
    466             .scale = 0.0f,
    467             .zeroPoint = 0,
    468             .lifetime = OperandLifeTime::MODEL_INPUT,
    469             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    470         },
    471         {
    472             .type = OperandType::FLOAT32,
    473             .dimensions = {},
    474             .numberOfConsumers = 1,
    475             .scale = 0.0f,
    476             .zeroPoint = 0,
    477             .lifetime = OperandLifeTime::CONSTANT_COPY,
    478             .location = {.poolIndex = 0, .offset = 0, .length = 4},
    479         },
    480         {
    481             .type = OperandType::FLOAT32,
    482             .dimensions = {},
    483             .numberOfConsumers = 1,
    484             .scale = 0.0f,
    485             .zeroPoint = 0,
    486             .lifetime = OperandLifeTime::CONSTANT_COPY,
    487             .location = {.poolIndex = 0, .offset = 4, .length = 4},
    488         },
    489         {
    490             .type = OperandType::INT32,
    491             .dimensions = {},
    492             .numberOfConsumers = 1,
    493             .scale = 0.0f,
    494             .zeroPoint = 0,
    495             .lifetime = OperandLifeTime::CONSTANT_COPY,
    496             .location = {.poolIndex = 0, .offset = 8, .length = 4},
    497         },
    498         {
    499             .type = OperandType::INT32,
    500             .dimensions = {},
    501             .numberOfConsumers = 1,
    502             .scale = 0.0f,
    503             .zeroPoint = 0,
    504             .lifetime = OperandLifeTime::CONSTANT_COPY,
    505             .location = {.poolIndex = 0, .offset = 12, .length = 4},
    506         },
    507         {
    508             .type = OperandType::FLOAT32,
    509             .dimensions = {},
    510             .numberOfConsumers = 1,
    511             .scale = 0.0f,
    512             .zeroPoint = 0,
    513             .lifetime = OperandLifeTime::CONSTANT_COPY,
    514             .location = {.poolIndex = 0, .offset = 16, .length = 4},
    515         },
    516         {
    517             .type = OperandType::FLOAT32,
    518             .dimensions = {},
    519             .numberOfConsumers = 1,
    520             .scale = 0.0f,
    521             .zeroPoint = 0,
    522             .lifetime = OperandLifeTime::CONSTANT_COPY,
    523             .location = {.poolIndex = 0, .offset = 20, .length = 4},
    524         },
    525         {
    526             .type = OperandType::BOOL,
    527             .dimensions = {},
    528             .numberOfConsumers = 2,
    529             .scale = 0.0f,
    530             .zeroPoint = 0,
    531             .lifetime = OperandLifeTime::CONSTANT_COPY,
    532             .location = {.poolIndex = 0, .offset = 24, .length = 1},
    533         },
    534         {
    535             .type = OperandType::TENSOR_FLOAT32,
    536             .dimensions = {0},
    537             .numberOfConsumers = 0,
    538             .scale = 0.0f,
    539             .zeroPoint = 0,
    540             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    541             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    542         },
    543         {
    544             .type = OperandType::TENSOR_FLOAT32,
    545             .dimensions = {0, 4},
    546             .numberOfConsumers = 2,
    547             .scale = 0.0f,
    548             .zeroPoint = 0,
    549             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    550             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    551         },
    552         {
    553             .type = OperandType::TENSOR_INT32,
    554             .dimensions = {0},
    555             .numberOfConsumers = 3,
    556             .scale = 0.0f,
    557             .zeroPoint = 0,
    558             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    559             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    560         },
    561         {
    562             .type = OperandType::TENSOR_FLOAT32,
    563             .dimensions = {1, 1, 1, 1},
    564             .numberOfConsumers = 1,
    565             .scale = 0.0f,
    566             .zeroPoint = 0,
    567             .lifetime = OperandLifeTime::MODEL_INPUT,
    568             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    569         },
    570         {
    571             .type = OperandType::INT32,
    572             .dimensions = {},
    573             .numberOfConsumers = 1,
    574             .scale = 0.0f,
    575             .zeroPoint = 0,
    576             .lifetime = OperandLifeTime::CONSTANT_COPY,
    577             .location = {.poolIndex = 0, .offset = 25, .length = 4},
    578         },
    579         {
    580             .type = OperandType::INT32,
    581             .dimensions = {},
    582             .numberOfConsumers = 1,
    583             .scale = 0.0f,
    584             .zeroPoint = 0,
    585             .lifetime = OperandLifeTime::CONSTANT_COPY,
    586             .location = {.poolIndex = 0, .offset = 29, .length = 4},
    587         },
    588         {
    589             .type = OperandType::FLOAT32,
    590             .dimensions = {},
    591             .numberOfConsumers = 1,
    592             .scale = 0.0f,
    593             .zeroPoint = 0,
    594             .lifetime = OperandLifeTime::CONSTANT_COPY,
    595             .location = {.poolIndex = 0, .offset = 33, .length = 4},
    596         },
    597         {
    598             .type = OperandType::FLOAT32,
    599             .dimensions = {},
    600             .numberOfConsumers = 1,
    601             .scale = 0.0f,
    602             .zeroPoint = 0,
    603             .lifetime = OperandLifeTime::CONSTANT_COPY,
    604             .location = {.poolIndex = 0, .offset = 37, .length = 4},
    605         },
    606         {
    607             .type = OperandType::INT32,
    608             .dimensions = {},
    609             .numberOfConsumers = 1,
    610             .scale = 0.0f,
    611             .zeroPoint = 0,
    612             .lifetime = OperandLifeTime::CONSTANT_COPY,
    613             .location = {.poolIndex = 0, .offset = 41, .length = 4},
    614         },
    615         {
    616             .type = OperandType::INT32,
    617             .dimensions = {},
    618             .numberOfConsumers = 1,
    619             .scale = 0.0f,
    620             .zeroPoint = 0,
    621             .lifetime = OperandLifeTime::CONSTANT_COPY,
    622             .location = {.poolIndex = 0, .offset = 45, .length = 4},
    623         },
    624         {
    625             .type = OperandType::TENSOR_FLOAT32,
    626             .dimensions = {0, 2, 2, 1},
    627             .numberOfConsumers = 2,
    628             .scale = 0.0f,
    629             .zeroPoint = 0,
    630             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    631             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    632         },
    633         {
    634             .type = OperandType::TENSOR_FLOAT32,
    635             .dimensions = {8, 4},
    636             .numberOfConsumers = 1,
    637             .scale = 0.0f,
    638             .zeroPoint = 0,
    639             .lifetime = OperandLifeTime::CONSTANT_COPY,
    640             .location = {.poolIndex = 0, .offset = 49, .length = 128},
    641         },
    642         {
    643             .type = OperandType::TENSOR_FLOAT32,
    644             .dimensions = {8},
    645             .numberOfConsumers = 1,
    646             .scale = 0.0f,
    647             .zeroPoint = 0,
    648             .lifetime = OperandLifeTime::CONSTANT_COPY,
    649             .location = {.poolIndex = 0, .offset = 177, .length = 32},
    650         },
    651         {
    652             .type = OperandType::INT32,
    653             .dimensions = {},
    654             .numberOfConsumers = 1,
    655             .scale = 0.0f,
    656             .zeroPoint = 0,
    657             .lifetime = OperandLifeTime::CONSTANT_COPY,
    658             .location = {.poolIndex = 0, .offset = 209, .length = 4},
    659         },
    660         {
    661             .type = OperandType::TENSOR_FLOAT32,
    662             .dimensions = {0, 8},
    663             .numberOfConsumers = 1,
    664             .scale = 0.0f,
    665             .zeroPoint = 0,
    666             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    667             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    668         },
    669         {
    670             .type = OperandType::TENSOR_FLOAT32,
    671             .dimensions = {2, 4},
    672             .numberOfConsumers = 1,
    673             .scale = 0.0f,
    674             .zeroPoint = 0,
    675             .lifetime = OperandLifeTime::CONSTANT_COPY,
    676             .location = {.poolIndex = 0, .offset = 213, .length = 32},
    677         },
    678         {
    679             .type = OperandType::TENSOR_FLOAT32,
    680             .dimensions = {2},
    681             .numberOfConsumers = 1,
    682             .scale = 0.0f,
    683             .zeroPoint = 0,
    684             .lifetime = OperandLifeTime::CONSTANT_COPY,
    685             .location = {.poolIndex = 0, .offset = 245, .length = 8},
    686         },
    687         {
    688             .type = OperandType::INT32,
    689             .dimensions = {},
    690             .numberOfConsumers = 1,
    691             .scale = 0.0f,
    692             .zeroPoint = 0,
    693             .lifetime = OperandLifeTime::CONSTANT_COPY,
    694             .location = {.poolIndex = 0, .offset = 253, .length = 4},
    695         },
    696         {
    697             .type = OperandType::TENSOR_FLOAT32,
    698             .dimensions = {0, 2},
    699             .numberOfConsumers = 1,
    700             .scale = 0.0f,
    701             .zeroPoint = 0,
    702             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    703             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    704         },
    705         {
    706             .type = OperandType::TENSOR_FLOAT32,
    707             .dimensions = {0, 8},
    708             .numberOfConsumers = 1,
    709             .scale = 0.0f,
    710             .zeroPoint = 0,
    711             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    712             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    713         },
    714         {
    715             .type = OperandType::FLOAT32,
    716             .dimensions = {},
    717             .numberOfConsumers = 1,
    718             .scale = 0.0f,
    719             .zeroPoint = 0,
    720             .lifetime = OperandLifeTime::CONSTANT_COPY,
    721             .location = {.poolIndex = 0, .offset = 257, .length = 4},
    722         },
    723         {
    724             .type = OperandType::INT32,
    725             .dimensions = {},
    726             .numberOfConsumers = 1,
    727             .scale = 0.0f,
    728             .zeroPoint = 0,
    729             .lifetime = OperandLifeTime::CONSTANT_COPY,
    730             .location = {.poolIndex = 0, .offset = 261, .length = 4},
    731         },
    732         {
    733             .type = OperandType::INT32,
    734             .dimensions = {},
    735             .numberOfConsumers = 1,
    736             .scale = 0.0f,
    737             .zeroPoint = 0,
    738             .lifetime = OperandLifeTime::CONSTANT_COPY,
    739             .location = {.poolIndex = 0, .offset = 265, .length = 4},
    740         },
    741         {
    742             .type = OperandType::FLOAT32,
    743             .dimensions = {},
    744             .numberOfConsumers = 1,
    745             .scale = 0.0f,
    746             .zeroPoint = 0,
    747             .lifetime = OperandLifeTime::CONSTANT_COPY,
    748             .location = {.poolIndex = 0, .offset = 269, .length = 4},
    749         },
    750         {
    751             .type = OperandType::FLOAT32,
    752             .dimensions = {},
    753             .numberOfConsumers = 1,
    754             .scale = 0.0f,
    755             .zeroPoint = 0,
    756             .lifetime = OperandLifeTime::CONSTANT_COPY,
    757             .location = {.poolIndex = 0, .offset = 273, .length = 4},
    758         },
    759         {
    760             .type = OperandType::FLOAT32,
    761             .dimensions = {},
    762             .numberOfConsumers = 1,
    763             .scale = 0.0f,
    764             .zeroPoint = 0,
    765             .lifetime = OperandLifeTime::CONSTANT_COPY,
    766             .location = {.poolIndex = 0, .offset = 277, .length = 4},
    767         },
    768         {
    769             .type = OperandType::TENSOR_FLOAT32,
    770             .dimensions = {0},
    771             .numberOfConsumers = 0,
    772             .scale = 0.0f,
    773             .zeroPoint = 0,
    774             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    775             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    776         },
    777         {
    778             .type = OperandType::TENSOR_FLOAT32,
    779             .dimensions = {0, 4},
    780             .numberOfConsumers = 0,
    781             .scale = 0.0f,
    782             .zeroPoint = 0,
    783             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    784             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    785         },
    786         {
    787             .type = OperandType::TENSOR_INT32,
    788             .dimensions = {0},
    789             .numberOfConsumers = 0,
    790             .scale = 0.0f,
    791             .zeroPoint = 0,
    792             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    793             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    794         },
    795         {
    796             .type = OperandType::TENSOR_INT32,
    797             .dimensions = {0},
    798             .numberOfConsumers = 0,
    799             .scale = 0.0f,
    800             .zeroPoint = 0,
    801             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    802             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    803         }
    804     };
    805 
    806     const std::vector<Operation> operations = {
    807         {
    808             .type = OperationType::GENERATE_PROPOSALS,
    809             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
    810             .outputs = {11, 12, 13},
    811         },
    812         {
    813             .type = OperationType::ROI_ALIGN,
    814             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
    815             .outputs = {21},
    816         },
    817         {
    818             .type = OperationType::FULLY_CONNECTED,
    819             .inputs = {21, 22, 23, 24},
    820             .outputs = {25},
    821         },
    822         {
    823             .type = OperationType::FULLY_CONNECTED,
    824             .inputs = {21, 26, 27, 28},
    825             .outputs = {29},
    826         },
    827         {
    828             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
    829             .inputs = {12, 25, 13, 3},
    830             .outputs = {30},
    831         },
    832         {
    833             .type = OperationType::BOX_WITH_NMS_LIMIT,
    834             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
    835             .outputs = {37, 38, 39, 40},
    836         }
    837     };
    838 
    839     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
    840     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
    841     std::vector<uint8_t> operandValues = {
    842       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
    843     };
    844     const std::vector<hidl_memory> pools = {};
    845 
    846     return {
    847         .operands = operands,
    848         .operations = operations,
    849         .inputIndexes = inputIndexes,
    850         .outputIndexes = outputIndexes,
    851         .operandValues = operandValues,
    852         .pools = pools,
    853         .relaxComputationFloat32toFloat16 = true,
    854     };
    855 }
    856 
    857 inline bool is_ignored_zero_sized_relaxed(int i) {
    858   static std::set<int> ignore = {};
    859   return ignore.find(i) != ignore.end();
    860 }
    861 
    862 // Create the model
    863 Model createTestModel_zero_sized_float16() {
    864     const std::vector<Operand> operands = {
    865         {
    866             .type = OperandType::TENSOR_FLOAT16,
    867             .dimensions = {1, 1, 1, 1},
    868             .numberOfConsumers = 1,
    869             .scale = 0.0f,
    870             .zeroPoint = 0,
    871             .lifetime = OperandLifeTime::MODEL_INPUT,
    872             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    873         },
    874         {
    875             .type = OperandType::TENSOR_FLOAT16,
    876             .dimensions = {1, 1, 1, 4},
    877             .numberOfConsumers = 1,
    878             .scale = 0.0f,
    879             .zeroPoint = 0,
    880             .lifetime = OperandLifeTime::MODEL_INPUT,
    881             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    882         },
    883         {
    884             .type = OperandType::TENSOR_FLOAT16,
    885             .dimensions = {1, 4},
    886             .numberOfConsumers = 1,
    887             .scale = 0.0f,
    888             .zeroPoint = 0,
    889             .lifetime = OperandLifeTime::MODEL_INPUT,
    890             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    891         },
    892         {
    893             .type = OperandType::TENSOR_FLOAT16,
    894             .dimensions = {1, 2},
    895             .numberOfConsumers = 2,
    896             .scale = 0.0f,
    897             .zeroPoint = 0,
    898             .lifetime = OperandLifeTime::MODEL_INPUT,
    899             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    900         },
    901         {
    902             .type = OperandType::FLOAT16,
    903             .dimensions = {},
    904             .numberOfConsumers = 1,
    905             .scale = 0.0f,
    906             .zeroPoint = 0,
    907             .lifetime = OperandLifeTime::CONSTANT_COPY,
    908             .location = {.poolIndex = 0, .offset = 0, .length = 2},
    909         },
    910         {
    911             .type = OperandType::FLOAT16,
    912             .dimensions = {},
    913             .numberOfConsumers = 1,
    914             .scale = 0.0f,
    915             .zeroPoint = 0,
    916             .lifetime = OperandLifeTime::CONSTANT_COPY,
    917             .location = {.poolIndex = 0, .offset = 2, .length = 2},
    918         },
    919         {
    920             .type = OperandType::INT32,
    921             .dimensions = {},
    922             .numberOfConsumers = 1,
    923             .scale = 0.0f,
    924             .zeroPoint = 0,
    925             .lifetime = OperandLifeTime::CONSTANT_COPY,
    926             .location = {.poolIndex = 0, .offset = 4, .length = 4},
    927         },
    928         {
    929             .type = OperandType::INT32,
    930             .dimensions = {},
    931             .numberOfConsumers = 1,
    932             .scale = 0.0f,
    933             .zeroPoint = 0,
    934             .lifetime = OperandLifeTime::CONSTANT_COPY,
    935             .location = {.poolIndex = 0, .offset = 8, .length = 4},
    936         },
    937         {
    938             .type = OperandType::FLOAT16,
    939             .dimensions = {},
    940             .numberOfConsumers = 1,
    941             .scale = 0.0f,
    942             .zeroPoint = 0,
    943             .lifetime = OperandLifeTime::CONSTANT_COPY,
    944             .location = {.poolIndex = 0, .offset = 12, .length = 2},
    945         },
    946         {
    947             .type = OperandType::FLOAT16,
    948             .dimensions = {},
    949             .numberOfConsumers = 1,
    950             .scale = 0.0f,
    951             .zeroPoint = 0,
    952             .lifetime = OperandLifeTime::CONSTANT_COPY,
    953             .location = {.poolIndex = 0, .offset = 14, .length = 2},
    954         },
    955         {
    956             .type = OperandType::BOOL,
    957             .dimensions = {},
    958             .numberOfConsumers = 2,
    959             .scale = 0.0f,
    960             .zeroPoint = 0,
    961             .lifetime = OperandLifeTime::CONSTANT_COPY,
    962             .location = {.poolIndex = 0, .offset = 16, .length = 1},
    963         },
    964         {
    965             .type = OperandType::TENSOR_FLOAT16,
    966             .dimensions = {0},
    967             .numberOfConsumers = 0,
    968             .scale = 0.0f,
    969             .zeroPoint = 0,
    970             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    971             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    972         },
    973         {
    974             .type = OperandType::TENSOR_FLOAT16,
    975             .dimensions = {0, 4},
    976             .numberOfConsumers = 2,
    977             .scale = 0.0f,
    978             .zeroPoint = 0,
    979             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    980             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    981         },
    982         {
    983             .type = OperandType::TENSOR_INT32,
    984             .dimensions = {0},
    985             .numberOfConsumers = 3,
    986             .scale = 0.0f,
    987             .zeroPoint = 0,
    988             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
    989             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    990         },
    991         {
    992             .type = OperandType::TENSOR_FLOAT16,
    993             .dimensions = {1, 1, 1, 1},
    994             .numberOfConsumers = 1,
    995             .scale = 0.0f,
    996             .zeroPoint = 0,
    997             .lifetime = OperandLifeTime::MODEL_INPUT,
    998             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    999         },
   1000         {
   1001             .type = OperandType::INT32,
   1002             .dimensions = {},
   1003             .numberOfConsumers = 1,
   1004             .scale = 0.0f,
   1005             .zeroPoint = 0,
   1006             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1007             .location = {.poolIndex = 0, .offset = 17, .length = 4},
   1008         },
   1009         {
   1010             .type = OperandType::INT32,
   1011             .dimensions = {},
   1012             .numberOfConsumers = 1,
   1013             .scale = 0.0f,
   1014             .zeroPoint = 0,
   1015             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1016             .location = {.poolIndex = 0, .offset = 21, .length = 4},
   1017         },
   1018         {
   1019             .type = OperandType::FLOAT16,
   1020             .dimensions = {},
   1021             .numberOfConsumers = 1,
   1022             .scale = 0.0f,
   1023             .zeroPoint = 0,
   1024             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1025             .location = {.poolIndex = 0, .offset = 25, .length = 2},
   1026         },
   1027         {
   1028             .type = OperandType::FLOAT16,
   1029             .dimensions = {},
   1030             .numberOfConsumers = 1,
   1031             .scale = 0.0f,
   1032             .zeroPoint = 0,
   1033             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1034             .location = {.poolIndex = 0, .offset = 27, .length = 2},
   1035         },
   1036         {
   1037             .type = OperandType::INT32,
   1038             .dimensions = {},
   1039             .numberOfConsumers = 1,
   1040             .scale = 0.0f,
   1041             .zeroPoint = 0,
   1042             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1043             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   1044         },
   1045         {
   1046             .type = OperandType::INT32,
   1047             .dimensions = {},
   1048             .numberOfConsumers = 1,
   1049             .scale = 0.0f,
   1050             .zeroPoint = 0,
   1051             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1052             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   1053         },
   1054         {
   1055             .type = OperandType::TENSOR_FLOAT16,
   1056             .dimensions = {0, 2, 2, 1},
   1057             .numberOfConsumers = 2,
   1058             .scale = 0.0f,
   1059             .zeroPoint = 0,
   1060             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1061             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1062         },
   1063         {
   1064             .type = OperandType::TENSOR_FLOAT16,
   1065             .dimensions = {8, 4},
   1066             .numberOfConsumers = 1,
   1067             .scale = 0.0f,
   1068             .zeroPoint = 0,
   1069             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1070             .location = {.poolIndex = 0, .offset = 37, .length = 64},
   1071         },
   1072         {
   1073             .type = OperandType::TENSOR_FLOAT16,
   1074             .dimensions = {8},
   1075             .numberOfConsumers = 1,
   1076             .scale = 0.0f,
   1077             .zeroPoint = 0,
   1078             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1079             .location = {.poolIndex = 0, .offset = 101, .length = 16},
   1080         },
   1081         {
   1082             .type = OperandType::INT32,
   1083             .dimensions = {},
   1084             .numberOfConsumers = 1,
   1085             .scale = 0.0f,
   1086             .zeroPoint = 0,
   1087             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1088             .location = {.poolIndex = 0, .offset = 117, .length = 4},
   1089         },
   1090         {
   1091             .type = OperandType::TENSOR_FLOAT16,
   1092             .dimensions = {0, 8},
   1093             .numberOfConsumers = 1,
   1094             .scale = 0.0f,
   1095             .zeroPoint = 0,
   1096             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1097             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1098         },
   1099         {
   1100             .type = OperandType::TENSOR_FLOAT16,
   1101             .dimensions = {2, 4},
   1102             .numberOfConsumers = 1,
   1103             .scale = 0.0f,
   1104             .zeroPoint = 0,
   1105             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1106             .location = {.poolIndex = 0, .offset = 121, .length = 16},
   1107         },
   1108         {
   1109             .type = OperandType::TENSOR_FLOAT16,
   1110             .dimensions = {2},
   1111             .numberOfConsumers = 1,
   1112             .scale = 0.0f,
   1113             .zeroPoint = 0,
   1114             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1115             .location = {.poolIndex = 0, .offset = 137, .length = 4},
   1116         },
   1117         {
   1118             .type = OperandType::INT32,
   1119             .dimensions = {},
   1120             .numberOfConsumers = 1,
   1121             .scale = 0.0f,
   1122             .zeroPoint = 0,
   1123             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1124             .location = {.poolIndex = 0, .offset = 141, .length = 4},
   1125         },
   1126         {
   1127             .type = OperandType::TENSOR_FLOAT16,
   1128             .dimensions = {0, 2},
   1129             .numberOfConsumers = 1,
   1130             .scale = 0.0f,
   1131             .zeroPoint = 0,
   1132             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1133             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1134         },
   1135         {
   1136             .type = OperandType::TENSOR_FLOAT16,
   1137             .dimensions = {0, 8},
   1138             .numberOfConsumers = 1,
   1139             .scale = 0.0f,
   1140             .zeroPoint = 0,
   1141             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1142             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1143         },
   1144         {
   1145             .type = OperandType::FLOAT16,
   1146             .dimensions = {},
   1147             .numberOfConsumers = 1,
   1148             .scale = 0.0f,
   1149             .zeroPoint = 0,
   1150             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1151             .location = {.poolIndex = 0, .offset = 145, .length = 2},
   1152         },
   1153         {
   1154             .type = OperandType::INT32,
   1155             .dimensions = {},
   1156             .numberOfConsumers = 1,
   1157             .scale = 0.0f,
   1158             .zeroPoint = 0,
   1159             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1160             .location = {.poolIndex = 0, .offset = 147, .length = 4},
   1161         },
   1162         {
   1163             .type = OperandType::INT32,
   1164             .dimensions = {},
   1165             .numberOfConsumers = 1,
   1166             .scale = 0.0f,
   1167             .zeroPoint = 0,
   1168             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1169             .location = {.poolIndex = 0, .offset = 151, .length = 4},
   1170         },
   1171         {
   1172             .type = OperandType::FLOAT16,
   1173             .dimensions = {},
   1174             .numberOfConsumers = 1,
   1175             .scale = 0.0f,
   1176             .zeroPoint = 0,
   1177             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1178             .location = {.poolIndex = 0, .offset = 155, .length = 2},
   1179         },
   1180         {
   1181             .type = OperandType::FLOAT16,
   1182             .dimensions = {},
   1183             .numberOfConsumers = 1,
   1184             .scale = 0.0f,
   1185             .zeroPoint = 0,
   1186             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1187             .location = {.poolIndex = 0, .offset = 157, .length = 2},
   1188         },
   1189         {
   1190             .type = OperandType::FLOAT16,
   1191             .dimensions = {},
   1192             .numberOfConsumers = 1,
   1193             .scale = 0.0f,
   1194             .zeroPoint = 0,
   1195             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1196             .location = {.poolIndex = 0, .offset = 159, .length = 2},
   1197         },
   1198         {
   1199             .type = OperandType::TENSOR_FLOAT16,
   1200             .dimensions = {0},
   1201             .numberOfConsumers = 0,
   1202             .scale = 0.0f,
   1203             .zeroPoint = 0,
   1204             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1205             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1206         },
   1207         {
   1208             .type = OperandType::TENSOR_FLOAT16,
   1209             .dimensions = {0, 4},
   1210             .numberOfConsumers = 0,
   1211             .scale = 0.0f,
   1212             .zeroPoint = 0,
   1213             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1214             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1215         },
   1216         {
   1217             .type = OperandType::TENSOR_INT32,
   1218             .dimensions = {0},
   1219             .numberOfConsumers = 0,
   1220             .scale = 0.0f,
   1221             .zeroPoint = 0,
   1222             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1223             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1224         },
   1225         {
   1226             .type = OperandType::TENSOR_INT32,
   1227             .dimensions = {0},
   1228             .numberOfConsumers = 0,
   1229             .scale = 0.0f,
   1230             .zeroPoint = 0,
   1231             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1232             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1233         }
   1234     };
   1235 
   1236     const std::vector<Operation> operations = {
   1237         {
   1238             .type = OperationType::GENERATE_PROPOSALS,
   1239             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   1240             .outputs = {11, 12, 13},
   1241         },
   1242         {
   1243             .type = OperationType::ROI_ALIGN,
   1244             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   1245             .outputs = {21},
   1246         },
   1247         {
   1248             .type = OperationType::FULLY_CONNECTED,
   1249             .inputs = {21, 22, 23, 24},
   1250             .outputs = {25},
   1251         },
   1252         {
   1253             .type = OperationType::FULLY_CONNECTED,
   1254             .inputs = {21, 26, 27, 28},
   1255             .outputs = {29},
   1256         },
   1257         {
   1258             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   1259             .inputs = {12, 25, 13, 3},
   1260             .outputs = {30},
   1261         },
   1262         {
   1263             .type = OperationType::BOX_WITH_NMS_LIMIT,
   1264             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   1265             .outputs = {37, 38, 39, 40},
   1266         }
   1267     };
   1268 
   1269     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   1270     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   1271     std::vector<uint8_t> operandValues = {
   1272       0, 60, 0, 60, 255, 255, 255, 255, 255, 255, 255, 255, 205, 52, 0, 73, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 60, 0, 60, 4, 0, 0, 0, 4, 0, 0, 0, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 0, 0, 0, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 0, 0, 0, 102, 46, 255, 255, 255, 255, 0, 0, 0, 0, 205, 52, 0, 60, 102, 46
   1273     };
   1274     const std::vector<hidl_memory> pools = {};
   1275 
   1276     return {
   1277         .operands = operands,
   1278         .operations = operations,
   1279         .inputIndexes = inputIndexes,
   1280         .outputIndexes = outputIndexes,
   1281         .operandValues = operandValues,
   1282         .pools = pools,
   1283     };
   1284 }
   1285 
   1286 inline bool is_ignored_zero_sized_float16(int i) {
   1287   static std::set<int> ignore = {};
   1288   return ignore.find(i) != ignore.end();
   1289 }
   1290 
   1291 // Create the model
   1292 Model createTestModel_zero_sized_quant8() {
   1293     const std::vector<Operand> operands = {
   1294         {
   1295             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1296             .dimensions = {1, 1, 1, 1},
   1297             .numberOfConsumers = 1,
   1298             .scale = 0.1f,
   1299             .zeroPoint = 128,
   1300             .lifetime = OperandLifeTime::MODEL_INPUT,
   1301             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1302         },
   1303         {
   1304             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1305             .dimensions = {1, 1, 1, 4},
   1306             .numberOfConsumers = 1,
   1307             .scale = 0.1f,
   1308             .zeroPoint = 128,
   1309             .lifetime = OperandLifeTime::MODEL_INPUT,
   1310             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1311         },
   1312         {
   1313             .type = OperandType::TENSOR_QUANT16_SYMM,
   1314             .dimensions = {1, 4},
   1315             .numberOfConsumers = 1,
   1316             .scale = 0.125f,
   1317             .zeroPoint = 0,
   1318             .lifetime = OperandLifeTime::MODEL_INPUT,
   1319             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1320         },
   1321         {
   1322             .type = OperandType::TENSOR_QUANT16_ASYMM,
   1323             .dimensions = {1, 2},
   1324             .numberOfConsumers = 2,
   1325             .scale = 0.125f,
   1326             .zeroPoint = 0,
   1327             .lifetime = OperandLifeTime::MODEL_INPUT,
   1328             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1329         },
   1330         {
   1331             .type = OperandType::FLOAT32,
   1332             .dimensions = {},
   1333             .numberOfConsumers = 1,
   1334             .scale = 0.0f,
   1335             .zeroPoint = 0,
   1336             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1337             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1338         },
   1339         {
   1340             .type = OperandType::FLOAT32,
   1341             .dimensions = {},
   1342             .numberOfConsumers = 1,
   1343             .scale = 0.0f,
   1344             .zeroPoint = 0,
   1345             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1346             .location = {.poolIndex = 0, .offset = 4, .length = 4},
   1347         },
   1348         {
   1349             .type = OperandType::INT32,
   1350             .dimensions = {},
   1351             .numberOfConsumers = 1,
   1352             .scale = 0.0f,
   1353             .zeroPoint = 0,
   1354             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1355             .location = {.poolIndex = 0, .offset = 8, .length = 4},
   1356         },
   1357         {
   1358             .type = OperandType::INT32,
   1359             .dimensions = {},
   1360             .numberOfConsumers = 1,
   1361             .scale = 0.0f,
   1362             .zeroPoint = 0,
   1363             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1364             .location = {.poolIndex = 0, .offset = 12, .length = 4},
   1365         },
   1366         {
   1367             .type = OperandType::FLOAT32,
   1368             .dimensions = {},
   1369             .numberOfConsumers = 1,
   1370             .scale = 0.0f,
   1371             .zeroPoint = 0,
   1372             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1373             .location = {.poolIndex = 0, .offset = 16, .length = 4},
   1374         },
   1375         {
   1376             .type = OperandType::FLOAT32,
   1377             .dimensions = {},
   1378             .numberOfConsumers = 1,
   1379             .scale = 0.0f,
   1380             .zeroPoint = 0,
   1381             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1382             .location = {.poolIndex = 0, .offset = 20, .length = 4},
   1383         },
   1384         {
   1385             .type = OperandType::BOOL,
   1386             .dimensions = {},
   1387             .numberOfConsumers = 2,
   1388             .scale = 0.0f,
   1389             .zeroPoint = 0,
   1390             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1391             .location = {.poolIndex = 0, .offset = 24, .length = 1},
   1392         },
   1393         {
   1394             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1395             .dimensions = {0},
   1396             .numberOfConsumers = 0,
   1397             .scale = 0.1f,
   1398             .zeroPoint = 128,
   1399             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1400             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1401         },
   1402         {
   1403             .type = OperandType::TENSOR_QUANT16_ASYMM,
   1404             .dimensions = {0, 4},
   1405             .numberOfConsumers = 2,
   1406             .scale = 0.125f,
   1407             .zeroPoint = 0,
   1408             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1409             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1410         },
   1411         {
   1412             .type = OperandType::TENSOR_INT32,
   1413             .dimensions = {0},
   1414             .numberOfConsumers = 3,
   1415             .scale = 0.0f,
   1416             .zeroPoint = 0,
   1417             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1418             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1419         },
   1420         {
   1421             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1422             .dimensions = {1, 1, 1, 1},
   1423             .numberOfConsumers = 1,
   1424             .scale = 0.1f,
   1425             .zeroPoint = 128,
   1426             .lifetime = OperandLifeTime::MODEL_INPUT,
   1427             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1428         },
   1429         {
   1430             .type = OperandType::INT32,
   1431             .dimensions = {},
   1432             .numberOfConsumers = 1,
   1433             .scale = 0.0f,
   1434             .zeroPoint = 0,
   1435             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1436             .location = {.poolIndex = 0, .offset = 25, .length = 4},
   1437         },
   1438         {
   1439             .type = OperandType::INT32,
   1440             .dimensions = {},
   1441             .numberOfConsumers = 1,
   1442             .scale = 0.0f,
   1443             .zeroPoint = 0,
   1444             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1445             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   1446         },
   1447         {
   1448             .type = OperandType::FLOAT32,
   1449             .dimensions = {},
   1450             .numberOfConsumers = 1,
   1451             .scale = 0.0f,
   1452             .zeroPoint = 0,
   1453             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1454             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   1455         },
   1456         {
   1457             .type = OperandType::FLOAT32,
   1458             .dimensions = {},
   1459             .numberOfConsumers = 1,
   1460             .scale = 0.0f,
   1461             .zeroPoint = 0,
   1462             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1463             .location = {.poolIndex = 0, .offset = 37, .length = 4},
   1464         },
   1465         {
   1466             .type = OperandType::INT32,
   1467             .dimensions = {},
   1468             .numberOfConsumers = 1,
   1469             .scale = 0.0f,
   1470             .zeroPoint = 0,
   1471             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1472             .location = {.poolIndex = 0, .offset = 41, .length = 4},
   1473         },
   1474         {
   1475             .type = OperandType::INT32,
   1476             .dimensions = {},
   1477             .numberOfConsumers = 1,
   1478             .scale = 0.0f,
   1479             .zeroPoint = 0,
   1480             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1481             .location = {.poolIndex = 0, .offset = 45, .length = 4},
   1482         },
   1483         {
   1484             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1485             .dimensions = {0, 2, 2, 1},
   1486             .numberOfConsumers = 2,
   1487             .scale = 0.1f,
   1488             .zeroPoint = 128,
   1489             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1490             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1491         },
   1492         {
   1493             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1494             .dimensions = {8, 4},
   1495             .numberOfConsumers = 1,
   1496             .scale = 0.1f,
   1497             .zeroPoint = 128,
   1498             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1499             .location = {.poolIndex = 0, .offset = 49, .length = 32},
   1500         },
   1501         {
   1502             .type = OperandType::TENSOR_INT32,
   1503             .dimensions = {8},
   1504             .numberOfConsumers = 1,
   1505             .scale = 0.01f,
   1506             .zeroPoint = 0,
   1507             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1508             .location = {.poolIndex = 0, .offset = 81, .length = 32},
   1509         },
   1510         {
   1511             .type = OperandType::INT32,
   1512             .dimensions = {},
   1513             .numberOfConsumers = 1,
   1514             .scale = 0.0f,
   1515             .zeroPoint = 0,
   1516             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1517             .location = {.poolIndex = 0, .offset = 113, .length = 4},
   1518         },
   1519         {
   1520             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1521             .dimensions = {0, 8},
   1522             .numberOfConsumers = 1,
   1523             .scale = 0.1f,
   1524             .zeroPoint = 128,
   1525             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1526             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1527         },
   1528         {
   1529             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1530             .dimensions = {2, 4},
   1531             .numberOfConsumers = 1,
   1532             .scale = 0.1f,
   1533             .zeroPoint = 128,
   1534             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1535             .location = {.poolIndex = 0, .offset = 117, .length = 8},
   1536         },
   1537         {
   1538             .type = OperandType::TENSOR_INT32,
   1539             .dimensions = {2},
   1540             .numberOfConsumers = 1,
   1541             .scale = 0.01f,
   1542             .zeroPoint = 0,
   1543             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1544             .location = {.poolIndex = 0, .offset = 125, .length = 8},
   1545         },
   1546         {
   1547             .type = OperandType::INT32,
   1548             .dimensions = {},
   1549             .numberOfConsumers = 1,
   1550             .scale = 0.0f,
   1551             .zeroPoint = 0,
   1552             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1553             .location = {.poolIndex = 0, .offset = 133, .length = 4},
   1554         },
   1555         {
   1556             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1557             .dimensions = {0, 2},
   1558             .numberOfConsumers = 1,
   1559             .scale = 0.1f,
   1560             .zeroPoint = 128,
   1561             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1562             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1563         },
   1564         {
   1565             .type = OperandType::TENSOR_QUANT16_ASYMM,
   1566             .dimensions = {0, 8},
   1567             .numberOfConsumers = 1,
   1568             .scale = 0.125f,
   1569             .zeroPoint = 0,
   1570             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1571             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1572         },
   1573         {
   1574             .type = OperandType::FLOAT32,
   1575             .dimensions = {},
   1576             .numberOfConsumers = 1,
   1577             .scale = 0.0f,
   1578             .zeroPoint = 0,
   1579             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1580             .location = {.poolIndex = 0, .offset = 137, .length = 4},
   1581         },
   1582         {
   1583             .type = OperandType::INT32,
   1584             .dimensions = {},
   1585             .numberOfConsumers = 1,
   1586             .scale = 0.0f,
   1587             .zeroPoint = 0,
   1588             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1589             .location = {.poolIndex = 0, .offset = 141, .length = 4},
   1590         },
   1591         {
   1592             .type = OperandType::INT32,
   1593             .dimensions = {},
   1594             .numberOfConsumers = 1,
   1595             .scale = 0.0f,
   1596             .zeroPoint = 0,
   1597             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1598             .location = {.poolIndex = 0, .offset = 145, .length = 4},
   1599         },
   1600         {
   1601             .type = OperandType::FLOAT32,
   1602             .dimensions = {},
   1603             .numberOfConsumers = 1,
   1604             .scale = 0.0f,
   1605             .zeroPoint = 0,
   1606             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1607             .location = {.poolIndex = 0, .offset = 149, .length = 4},
   1608         },
   1609         {
   1610             .type = OperandType::FLOAT32,
   1611             .dimensions = {},
   1612             .numberOfConsumers = 1,
   1613             .scale = 0.0f,
   1614             .zeroPoint = 0,
   1615             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1616             .location = {.poolIndex = 0, .offset = 153, .length = 4},
   1617         },
   1618         {
   1619             .type = OperandType::FLOAT32,
   1620             .dimensions = {},
   1621             .numberOfConsumers = 1,
   1622             .scale = 0.0f,
   1623             .zeroPoint = 0,
   1624             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1625             .location = {.poolIndex = 0, .offset = 157, .length = 4},
   1626         },
   1627         {
   1628             .type = OperandType::TENSOR_QUANT8_ASYMM,
   1629             .dimensions = {0},
   1630             .numberOfConsumers = 0,
   1631             .scale = 0.1f,
   1632             .zeroPoint = 128,
   1633             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1634             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1635         },
   1636         {
   1637             .type = OperandType::TENSOR_QUANT16_ASYMM,
   1638             .dimensions = {0, 4},
   1639             .numberOfConsumers = 0,
   1640             .scale = 0.125f,
   1641             .zeroPoint = 0,
   1642             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1643             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1644         },
   1645         {
   1646             .type = OperandType::TENSOR_INT32,
   1647             .dimensions = {0},
   1648             .numberOfConsumers = 0,
   1649             .scale = 0.0f,
   1650             .zeroPoint = 0,
   1651             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1652             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1653         },
   1654         {
   1655             .type = OperandType::TENSOR_INT32,
   1656             .dimensions = {0},
   1657             .numberOfConsumers = 0,
   1658             .scale = 0.0f,
   1659             .zeroPoint = 0,
   1660             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1661             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1662         }
   1663     };
   1664 
   1665     const std::vector<Operation> operations = {
   1666         {
   1667             .type = OperationType::GENERATE_PROPOSALS,
   1668             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   1669             .outputs = {11, 12, 13},
   1670         },
   1671         {
   1672             .type = OperationType::ROI_ALIGN,
   1673             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   1674             .outputs = {21},
   1675         },
   1676         {
   1677             .type = OperationType::FULLY_CONNECTED,
   1678             .inputs = {21, 22, 23, 24},
   1679             .outputs = {25},
   1680         },
   1681         {
   1682             .type = OperationType::FULLY_CONNECTED,
   1683             .inputs = {21, 26, 27, 28},
   1684             .outputs = {29},
   1685         },
   1686         {
   1687             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   1688             .inputs = {12, 25, 13, 3},
   1689             .outputs = {30},
   1690         },
   1691         {
   1692             .type = OperationType::BOX_WITH_NMS_LIMIT,
   1693             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   1694             .outputs = {37, 38, 39, 40},
   1695         }
   1696     };
   1697 
   1698     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   1699     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   1700     std::vector<uint8_t> operandValues = {
   1701       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 100, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
   1702     };
   1703     const std::vector<hidl_memory> pools = {};
   1704 
   1705     return {
   1706         .operands = operands,
   1707         .operations = operations,
   1708         .inputIndexes = inputIndexes,
   1709         .outputIndexes = outputIndexes,
   1710         .operandValues = operandValues,
   1711         .pools = pools,
   1712     };
   1713 }
   1714 
   1715 inline bool is_ignored_zero_sized_quant8(int i) {
   1716   static std::set<int> ignore = {};
   1717   return ignore.find(i) != ignore.end();
   1718 }
   1719 
   1720 // Create the model
   1721 Model createTestModel_zero_sized_dynamic_output_shape() {
   1722     const std::vector<Operand> operands = {
   1723         {
   1724             .type = OperandType::TENSOR_FLOAT32,
   1725             .dimensions = {1, 1, 1, 1},
   1726             .numberOfConsumers = 1,
   1727             .scale = 0.0f,
   1728             .zeroPoint = 0,
   1729             .lifetime = OperandLifeTime::MODEL_INPUT,
   1730             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1731         },
   1732         {
   1733             .type = OperandType::TENSOR_FLOAT32,
   1734             .dimensions = {1, 1, 1, 4},
   1735             .numberOfConsumers = 1,
   1736             .scale = 0.0f,
   1737             .zeroPoint = 0,
   1738             .lifetime = OperandLifeTime::MODEL_INPUT,
   1739             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1740         },
   1741         {
   1742             .type = OperandType::TENSOR_FLOAT32,
   1743             .dimensions = {1, 4},
   1744             .numberOfConsumers = 1,
   1745             .scale = 0.0f,
   1746             .zeroPoint = 0,
   1747             .lifetime = OperandLifeTime::MODEL_INPUT,
   1748             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1749         },
   1750         {
   1751             .type = OperandType::TENSOR_FLOAT32,
   1752             .dimensions = {1, 2},
   1753             .numberOfConsumers = 2,
   1754             .scale = 0.0f,
   1755             .zeroPoint = 0,
   1756             .lifetime = OperandLifeTime::MODEL_INPUT,
   1757             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1758         },
   1759         {
   1760             .type = OperandType::FLOAT32,
   1761             .dimensions = {},
   1762             .numberOfConsumers = 1,
   1763             .scale = 0.0f,
   1764             .zeroPoint = 0,
   1765             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1766             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   1767         },
   1768         {
   1769             .type = OperandType::FLOAT32,
   1770             .dimensions = {},
   1771             .numberOfConsumers = 1,
   1772             .scale = 0.0f,
   1773             .zeroPoint = 0,
   1774             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1775             .location = {.poolIndex = 0, .offset = 4, .length = 4},
   1776         },
   1777         {
   1778             .type = OperandType::INT32,
   1779             .dimensions = {},
   1780             .numberOfConsumers = 1,
   1781             .scale = 0.0f,
   1782             .zeroPoint = 0,
   1783             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1784             .location = {.poolIndex = 0, .offset = 8, .length = 4},
   1785         },
   1786         {
   1787             .type = OperandType::INT32,
   1788             .dimensions = {},
   1789             .numberOfConsumers = 1,
   1790             .scale = 0.0f,
   1791             .zeroPoint = 0,
   1792             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1793             .location = {.poolIndex = 0, .offset = 12, .length = 4},
   1794         },
   1795         {
   1796             .type = OperandType::FLOAT32,
   1797             .dimensions = {},
   1798             .numberOfConsumers = 1,
   1799             .scale = 0.0f,
   1800             .zeroPoint = 0,
   1801             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1802             .location = {.poolIndex = 0, .offset = 16, .length = 4},
   1803         },
   1804         {
   1805             .type = OperandType::FLOAT32,
   1806             .dimensions = {},
   1807             .numberOfConsumers = 1,
   1808             .scale = 0.0f,
   1809             .zeroPoint = 0,
   1810             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1811             .location = {.poolIndex = 0, .offset = 20, .length = 4},
   1812         },
   1813         {
   1814             .type = OperandType::BOOL,
   1815             .dimensions = {},
   1816             .numberOfConsumers = 2,
   1817             .scale = 0.0f,
   1818             .zeroPoint = 0,
   1819             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1820             .location = {.poolIndex = 0, .offset = 24, .length = 1},
   1821         },
   1822         {
   1823             .type = OperandType::TENSOR_FLOAT32,
   1824             .dimensions = {0},
   1825             .numberOfConsumers = 0,
   1826             .scale = 0.0f,
   1827             .zeroPoint = 0,
   1828             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   1829             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1830         },
   1831         {
   1832             .type = OperandType::TENSOR_FLOAT32,
   1833             .dimensions = {0, 4},
   1834             .numberOfConsumers = 2,
   1835             .scale = 0.0f,
   1836             .zeroPoint = 0,
   1837             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1838             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1839         },
   1840         {
   1841             .type = OperandType::TENSOR_INT32,
   1842             .dimensions = {0},
   1843             .numberOfConsumers = 3,
   1844             .scale = 0.0f,
   1845             .zeroPoint = 0,
   1846             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1847             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1848         },
   1849         {
   1850             .type = OperandType::TENSOR_FLOAT32,
   1851             .dimensions = {1, 1, 1, 1},
   1852             .numberOfConsumers = 1,
   1853             .scale = 0.0f,
   1854             .zeroPoint = 0,
   1855             .lifetime = OperandLifeTime::MODEL_INPUT,
   1856             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1857         },
   1858         {
   1859             .type = OperandType::INT32,
   1860             .dimensions = {},
   1861             .numberOfConsumers = 1,
   1862             .scale = 0.0f,
   1863             .zeroPoint = 0,
   1864             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1865             .location = {.poolIndex = 0, .offset = 25, .length = 4},
   1866         },
   1867         {
   1868             .type = OperandType::INT32,
   1869             .dimensions = {},
   1870             .numberOfConsumers = 1,
   1871             .scale = 0.0f,
   1872             .zeroPoint = 0,
   1873             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1874             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   1875         },
   1876         {
   1877             .type = OperandType::FLOAT32,
   1878             .dimensions = {},
   1879             .numberOfConsumers = 1,
   1880             .scale = 0.0f,
   1881             .zeroPoint = 0,
   1882             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1883             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   1884         },
   1885         {
   1886             .type = OperandType::FLOAT32,
   1887             .dimensions = {},
   1888             .numberOfConsumers = 1,
   1889             .scale = 0.0f,
   1890             .zeroPoint = 0,
   1891             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1892             .location = {.poolIndex = 0, .offset = 37, .length = 4},
   1893         },
   1894         {
   1895             .type = OperandType::INT32,
   1896             .dimensions = {},
   1897             .numberOfConsumers = 1,
   1898             .scale = 0.0f,
   1899             .zeroPoint = 0,
   1900             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1901             .location = {.poolIndex = 0, .offset = 41, .length = 4},
   1902         },
   1903         {
   1904             .type = OperandType::INT32,
   1905             .dimensions = {},
   1906             .numberOfConsumers = 1,
   1907             .scale = 0.0f,
   1908             .zeroPoint = 0,
   1909             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1910             .location = {.poolIndex = 0, .offset = 45, .length = 4},
   1911         },
   1912         {
   1913             .type = OperandType::TENSOR_FLOAT32,
   1914             .dimensions = {0, 2, 2, 1},
   1915             .numberOfConsumers = 2,
   1916             .scale = 0.0f,
   1917             .zeroPoint = 0,
   1918             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1919             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1920         },
   1921         {
   1922             .type = OperandType::TENSOR_FLOAT32,
   1923             .dimensions = {8, 4},
   1924             .numberOfConsumers = 1,
   1925             .scale = 0.0f,
   1926             .zeroPoint = 0,
   1927             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1928             .location = {.poolIndex = 0, .offset = 49, .length = 128},
   1929         },
   1930         {
   1931             .type = OperandType::TENSOR_FLOAT32,
   1932             .dimensions = {8},
   1933             .numberOfConsumers = 1,
   1934             .scale = 0.0f,
   1935             .zeroPoint = 0,
   1936             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1937             .location = {.poolIndex = 0, .offset = 177, .length = 32},
   1938         },
   1939         {
   1940             .type = OperandType::INT32,
   1941             .dimensions = {},
   1942             .numberOfConsumers = 1,
   1943             .scale = 0.0f,
   1944             .zeroPoint = 0,
   1945             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1946             .location = {.poolIndex = 0, .offset = 209, .length = 4},
   1947         },
   1948         {
   1949             .type = OperandType::TENSOR_FLOAT32,
   1950             .dimensions = {0, 8},
   1951             .numberOfConsumers = 1,
   1952             .scale = 0.0f,
   1953             .zeroPoint = 0,
   1954             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1955             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1956         },
   1957         {
   1958             .type = OperandType::TENSOR_FLOAT32,
   1959             .dimensions = {2, 4},
   1960             .numberOfConsumers = 1,
   1961             .scale = 0.0f,
   1962             .zeroPoint = 0,
   1963             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1964             .location = {.poolIndex = 0, .offset = 213, .length = 32},
   1965         },
   1966         {
   1967             .type = OperandType::TENSOR_FLOAT32,
   1968             .dimensions = {2},
   1969             .numberOfConsumers = 1,
   1970             .scale = 0.0f,
   1971             .zeroPoint = 0,
   1972             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1973             .location = {.poolIndex = 0, .offset = 245, .length = 8},
   1974         },
   1975         {
   1976             .type = OperandType::INT32,
   1977             .dimensions = {},
   1978             .numberOfConsumers = 1,
   1979             .scale = 0.0f,
   1980             .zeroPoint = 0,
   1981             .lifetime = OperandLifeTime::CONSTANT_COPY,
   1982             .location = {.poolIndex = 0, .offset = 253, .length = 4},
   1983         },
   1984         {
   1985             .type = OperandType::TENSOR_FLOAT32,
   1986             .dimensions = {0, 2},
   1987             .numberOfConsumers = 1,
   1988             .scale = 0.0f,
   1989             .zeroPoint = 0,
   1990             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   1991             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   1992         },
   1993         {
   1994             .type = OperandType::TENSOR_FLOAT32,
   1995             .dimensions = {0, 8},
   1996             .numberOfConsumers = 1,
   1997             .scale = 0.0f,
   1998             .zeroPoint = 0,
   1999             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2000             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2001         },
   2002         {
   2003             .type = OperandType::FLOAT32,
   2004             .dimensions = {},
   2005             .numberOfConsumers = 1,
   2006             .scale = 0.0f,
   2007             .zeroPoint = 0,
   2008             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2009             .location = {.poolIndex = 0, .offset = 257, .length = 4},
   2010         },
   2011         {
   2012             .type = OperandType::INT32,
   2013             .dimensions = {},
   2014             .numberOfConsumers = 1,
   2015             .scale = 0.0f,
   2016             .zeroPoint = 0,
   2017             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2018             .location = {.poolIndex = 0, .offset = 261, .length = 4},
   2019         },
   2020         {
   2021             .type = OperandType::INT32,
   2022             .dimensions = {},
   2023             .numberOfConsumers = 1,
   2024             .scale = 0.0f,
   2025             .zeroPoint = 0,
   2026             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2027             .location = {.poolIndex = 0, .offset = 265, .length = 4},
   2028         },
   2029         {
   2030             .type = OperandType::FLOAT32,
   2031             .dimensions = {},
   2032             .numberOfConsumers = 1,
   2033             .scale = 0.0f,
   2034             .zeroPoint = 0,
   2035             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2036             .location = {.poolIndex = 0, .offset = 269, .length = 4},
   2037         },
   2038         {
   2039             .type = OperandType::FLOAT32,
   2040             .dimensions = {},
   2041             .numberOfConsumers = 1,
   2042             .scale = 0.0f,
   2043             .zeroPoint = 0,
   2044             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2045             .location = {.poolIndex = 0, .offset = 273, .length = 4},
   2046         },
   2047         {
   2048             .type = OperandType::FLOAT32,
   2049             .dimensions = {},
   2050             .numberOfConsumers = 1,
   2051             .scale = 0.0f,
   2052             .zeroPoint = 0,
   2053             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2054             .location = {.poolIndex = 0, .offset = 277, .length = 4},
   2055         },
   2056         {
   2057             .type = OperandType::TENSOR_FLOAT32,
   2058             .dimensions = {0},
   2059             .numberOfConsumers = 0,
   2060             .scale = 0.0f,
   2061             .zeroPoint = 0,
   2062             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2063             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2064         },
   2065         {
   2066             .type = OperandType::TENSOR_FLOAT32,
   2067             .dimensions = {0, 0},
   2068             .numberOfConsumers = 0,
   2069             .scale = 0.0f,
   2070             .zeroPoint = 0,
   2071             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2072             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2073         },
   2074         {
   2075             .type = OperandType::TENSOR_INT32,
   2076             .dimensions = {0},
   2077             .numberOfConsumers = 0,
   2078             .scale = 0.0f,
   2079             .zeroPoint = 0,
   2080             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2081             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2082         },
   2083         {
   2084             .type = OperandType::TENSOR_INT32,
   2085             .dimensions = {0},
   2086             .numberOfConsumers = 0,
   2087             .scale = 0.0f,
   2088             .zeroPoint = 0,
   2089             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2090             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2091         }
   2092     };
   2093 
   2094     const std::vector<Operation> operations = {
   2095         {
   2096             .type = OperationType::GENERATE_PROPOSALS,
   2097             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   2098             .outputs = {11, 12, 13},
   2099         },
   2100         {
   2101             .type = OperationType::ROI_ALIGN,
   2102             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   2103             .outputs = {21},
   2104         },
   2105         {
   2106             .type = OperationType::FULLY_CONNECTED,
   2107             .inputs = {21, 22, 23, 24},
   2108             .outputs = {25},
   2109         },
   2110         {
   2111             .type = OperationType::FULLY_CONNECTED,
   2112             .inputs = {21, 26, 27, 28},
   2113             .outputs = {29},
   2114         },
   2115         {
   2116             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   2117             .inputs = {12, 25, 13, 3},
   2118             .outputs = {30},
   2119         },
   2120         {
   2121             .type = OperationType::BOX_WITH_NMS_LIMIT,
   2122             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   2123             .outputs = {37, 38, 39, 40},
   2124         }
   2125     };
   2126 
   2127     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   2128     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   2129     std::vector<uint8_t> operandValues = {
   2130       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
   2131     };
   2132     const std::vector<hidl_memory> pools = {};
   2133 
   2134     return {
   2135         .operands = operands,
   2136         .operations = operations,
   2137         .inputIndexes = inputIndexes,
   2138         .outputIndexes = outputIndexes,
   2139         .operandValues = operandValues,
   2140         .pools = pools,
   2141     };
   2142 }
   2143 
   2144 inline bool is_ignored_zero_sized_dynamic_output_shape(int i) {
   2145   static std::set<int> ignore = {};
   2146   return ignore.find(i) != ignore.end();
   2147 }
   2148 
   2149 // Create the model
   2150 Model createTestModel_zero_sized_dynamic_output_shape_relaxed() {
   2151     const std::vector<Operand> operands = {
   2152         {
   2153             .type = OperandType::TENSOR_FLOAT32,
   2154             .dimensions = {1, 1, 1, 1},
   2155             .numberOfConsumers = 1,
   2156             .scale = 0.0f,
   2157             .zeroPoint = 0,
   2158             .lifetime = OperandLifeTime::MODEL_INPUT,
   2159             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2160         },
   2161         {
   2162             .type = OperandType::TENSOR_FLOAT32,
   2163             .dimensions = {1, 1, 1, 4},
   2164             .numberOfConsumers = 1,
   2165             .scale = 0.0f,
   2166             .zeroPoint = 0,
   2167             .lifetime = OperandLifeTime::MODEL_INPUT,
   2168             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2169         },
   2170         {
   2171             .type = OperandType::TENSOR_FLOAT32,
   2172             .dimensions = {1, 4},
   2173             .numberOfConsumers = 1,
   2174             .scale = 0.0f,
   2175             .zeroPoint = 0,
   2176             .lifetime = OperandLifeTime::MODEL_INPUT,
   2177             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2178         },
   2179         {
   2180             .type = OperandType::TENSOR_FLOAT32,
   2181             .dimensions = {1, 2},
   2182             .numberOfConsumers = 2,
   2183             .scale = 0.0f,
   2184             .zeroPoint = 0,
   2185             .lifetime = OperandLifeTime::MODEL_INPUT,
   2186             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2187         },
   2188         {
   2189             .type = OperandType::FLOAT32,
   2190             .dimensions = {},
   2191             .numberOfConsumers = 1,
   2192             .scale = 0.0f,
   2193             .zeroPoint = 0,
   2194             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2195             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   2196         },
   2197         {
   2198             .type = OperandType::FLOAT32,
   2199             .dimensions = {},
   2200             .numberOfConsumers = 1,
   2201             .scale = 0.0f,
   2202             .zeroPoint = 0,
   2203             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2204             .location = {.poolIndex = 0, .offset = 4, .length = 4},
   2205         },
   2206         {
   2207             .type = OperandType::INT32,
   2208             .dimensions = {},
   2209             .numberOfConsumers = 1,
   2210             .scale = 0.0f,
   2211             .zeroPoint = 0,
   2212             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2213             .location = {.poolIndex = 0, .offset = 8, .length = 4},
   2214         },
   2215         {
   2216             .type = OperandType::INT32,
   2217             .dimensions = {},
   2218             .numberOfConsumers = 1,
   2219             .scale = 0.0f,
   2220             .zeroPoint = 0,
   2221             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2222             .location = {.poolIndex = 0, .offset = 12, .length = 4},
   2223         },
   2224         {
   2225             .type = OperandType::FLOAT32,
   2226             .dimensions = {},
   2227             .numberOfConsumers = 1,
   2228             .scale = 0.0f,
   2229             .zeroPoint = 0,
   2230             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2231             .location = {.poolIndex = 0, .offset = 16, .length = 4},
   2232         },
   2233         {
   2234             .type = OperandType::FLOAT32,
   2235             .dimensions = {},
   2236             .numberOfConsumers = 1,
   2237             .scale = 0.0f,
   2238             .zeroPoint = 0,
   2239             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2240             .location = {.poolIndex = 0, .offset = 20, .length = 4},
   2241         },
   2242         {
   2243             .type = OperandType::BOOL,
   2244             .dimensions = {},
   2245             .numberOfConsumers = 2,
   2246             .scale = 0.0f,
   2247             .zeroPoint = 0,
   2248             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2249             .location = {.poolIndex = 0, .offset = 24, .length = 1},
   2250         },
   2251         {
   2252             .type = OperandType::TENSOR_FLOAT32,
   2253             .dimensions = {0},
   2254             .numberOfConsumers = 0,
   2255             .scale = 0.0f,
   2256             .zeroPoint = 0,
   2257             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2258             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2259         },
   2260         {
   2261             .type = OperandType::TENSOR_FLOAT32,
   2262             .dimensions = {0, 4},
   2263             .numberOfConsumers = 2,
   2264             .scale = 0.0f,
   2265             .zeroPoint = 0,
   2266             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2267             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2268         },
   2269         {
   2270             .type = OperandType::TENSOR_INT32,
   2271             .dimensions = {0},
   2272             .numberOfConsumers = 3,
   2273             .scale = 0.0f,
   2274             .zeroPoint = 0,
   2275             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2276             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2277         },
   2278         {
   2279             .type = OperandType::TENSOR_FLOAT32,
   2280             .dimensions = {1, 1, 1, 1},
   2281             .numberOfConsumers = 1,
   2282             .scale = 0.0f,
   2283             .zeroPoint = 0,
   2284             .lifetime = OperandLifeTime::MODEL_INPUT,
   2285             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2286         },
   2287         {
   2288             .type = OperandType::INT32,
   2289             .dimensions = {},
   2290             .numberOfConsumers = 1,
   2291             .scale = 0.0f,
   2292             .zeroPoint = 0,
   2293             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2294             .location = {.poolIndex = 0, .offset = 25, .length = 4},
   2295         },
   2296         {
   2297             .type = OperandType::INT32,
   2298             .dimensions = {},
   2299             .numberOfConsumers = 1,
   2300             .scale = 0.0f,
   2301             .zeroPoint = 0,
   2302             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2303             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   2304         },
   2305         {
   2306             .type = OperandType::FLOAT32,
   2307             .dimensions = {},
   2308             .numberOfConsumers = 1,
   2309             .scale = 0.0f,
   2310             .zeroPoint = 0,
   2311             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2312             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   2313         },
   2314         {
   2315             .type = OperandType::FLOAT32,
   2316             .dimensions = {},
   2317             .numberOfConsumers = 1,
   2318             .scale = 0.0f,
   2319             .zeroPoint = 0,
   2320             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2321             .location = {.poolIndex = 0, .offset = 37, .length = 4},
   2322         },
   2323         {
   2324             .type = OperandType::INT32,
   2325             .dimensions = {},
   2326             .numberOfConsumers = 1,
   2327             .scale = 0.0f,
   2328             .zeroPoint = 0,
   2329             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2330             .location = {.poolIndex = 0, .offset = 41, .length = 4},
   2331         },
   2332         {
   2333             .type = OperandType::INT32,
   2334             .dimensions = {},
   2335             .numberOfConsumers = 1,
   2336             .scale = 0.0f,
   2337             .zeroPoint = 0,
   2338             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2339             .location = {.poolIndex = 0, .offset = 45, .length = 4},
   2340         },
   2341         {
   2342             .type = OperandType::TENSOR_FLOAT32,
   2343             .dimensions = {0, 2, 2, 1},
   2344             .numberOfConsumers = 2,
   2345             .scale = 0.0f,
   2346             .zeroPoint = 0,
   2347             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2348             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2349         },
   2350         {
   2351             .type = OperandType::TENSOR_FLOAT32,
   2352             .dimensions = {8, 4},
   2353             .numberOfConsumers = 1,
   2354             .scale = 0.0f,
   2355             .zeroPoint = 0,
   2356             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2357             .location = {.poolIndex = 0, .offset = 49, .length = 128},
   2358         },
   2359         {
   2360             .type = OperandType::TENSOR_FLOAT32,
   2361             .dimensions = {8},
   2362             .numberOfConsumers = 1,
   2363             .scale = 0.0f,
   2364             .zeroPoint = 0,
   2365             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2366             .location = {.poolIndex = 0, .offset = 177, .length = 32},
   2367         },
   2368         {
   2369             .type = OperandType::INT32,
   2370             .dimensions = {},
   2371             .numberOfConsumers = 1,
   2372             .scale = 0.0f,
   2373             .zeroPoint = 0,
   2374             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2375             .location = {.poolIndex = 0, .offset = 209, .length = 4},
   2376         },
   2377         {
   2378             .type = OperandType::TENSOR_FLOAT32,
   2379             .dimensions = {0, 8},
   2380             .numberOfConsumers = 1,
   2381             .scale = 0.0f,
   2382             .zeroPoint = 0,
   2383             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2384             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2385         },
   2386         {
   2387             .type = OperandType::TENSOR_FLOAT32,
   2388             .dimensions = {2, 4},
   2389             .numberOfConsumers = 1,
   2390             .scale = 0.0f,
   2391             .zeroPoint = 0,
   2392             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2393             .location = {.poolIndex = 0, .offset = 213, .length = 32},
   2394         },
   2395         {
   2396             .type = OperandType::TENSOR_FLOAT32,
   2397             .dimensions = {2},
   2398             .numberOfConsumers = 1,
   2399             .scale = 0.0f,
   2400             .zeroPoint = 0,
   2401             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2402             .location = {.poolIndex = 0, .offset = 245, .length = 8},
   2403         },
   2404         {
   2405             .type = OperandType::INT32,
   2406             .dimensions = {},
   2407             .numberOfConsumers = 1,
   2408             .scale = 0.0f,
   2409             .zeroPoint = 0,
   2410             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2411             .location = {.poolIndex = 0, .offset = 253, .length = 4},
   2412         },
   2413         {
   2414             .type = OperandType::TENSOR_FLOAT32,
   2415             .dimensions = {0, 2},
   2416             .numberOfConsumers = 1,
   2417             .scale = 0.0f,
   2418             .zeroPoint = 0,
   2419             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2420             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2421         },
   2422         {
   2423             .type = OperandType::TENSOR_FLOAT32,
   2424             .dimensions = {0, 8},
   2425             .numberOfConsumers = 1,
   2426             .scale = 0.0f,
   2427             .zeroPoint = 0,
   2428             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2429             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2430         },
   2431         {
   2432             .type = OperandType::FLOAT32,
   2433             .dimensions = {},
   2434             .numberOfConsumers = 1,
   2435             .scale = 0.0f,
   2436             .zeroPoint = 0,
   2437             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2438             .location = {.poolIndex = 0, .offset = 257, .length = 4},
   2439         },
   2440         {
   2441             .type = OperandType::INT32,
   2442             .dimensions = {},
   2443             .numberOfConsumers = 1,
   2444             .scale = 0.0f,
   2445             .zeroPoint = 0,
   2446             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2447             .location = {.poolIndex = 0, .offset = 261, .length = 4},
   2448         },
   2449         {
   2450             .type = OperandType::INT32,
   2451             .dimensions = {},
   2452             .numberOfConsumers = 1,
   2453             .scale = 0.0f,
   2454             .zeroPoint = 0,
   2455             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2456             .location = {.poolIndex = 0, .offset = 265, .length = 4},
   2457         },
   2458         {
   2459             .type = OperandType::FLOAT32,
   2460             .dimensions = {},
   2461             .numberOfConsumers = 1,
   2462             .scale = 0.0f,
   2463             .zeroPoint = 0,
   2464             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2465             .location = {.poolIndex = 0, .offset = 269, .length = 4},
   2466         },
   2467         {
   2468             .type = OperandType::FLOAT32,
   2469             .dimensions = {},
   2470             .numberOfConsumers = 1,
   2471             .scale = 0.0f,
   2472             .zeroPoint = 0,
   2473             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2474             .location = {.poolIndex = 0, .offset = 273, .length = 4},
   2475         },
   2476         {
   2477             .type = OperandType::FLOAT32,
   2478             .dimensions = {},
   2479             .numberOfConsumers = 1,
   2480             .scale = 0.0f,
   2481             .zeroPoint = 0,
   2482             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2483             .location = {.poolIndex = 0, .offset = 277, .length = 4},
   2484         },
   2485         {
   2486             .type = OperandType::TENSOR_FLOAT32,
   2487             .dimensions = {0},
   2488             .numberOfConsumers = 0,
   2489             .scale = 0.0f,
   2490             .zeroPoint = 0,
   2491             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2492             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2493         },
   2494         {
   2495             .type = OperandType::TENSOR_FLOAT32,
   2496             .dimensions = {0, 0},
   2497             .numberOfConsumers = 0,
   2498             .scale = 0.0f,
   2499             .zeroPoint = 0,
   2500             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2501             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2502         },
   2503         {
   2504             .type = OperandType::TENSOR_INT32,
   2505             .dimensions = {0},
   2506             .numberOfConsumers = 0,
   2507             .scale = 0.0f,
   2508             .zeroPoint = 0,
   2509             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2510             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2511         },
   2512         {
   2513             .type = OperandType::TENSOR_INT32,
   2514             .dimensions = {0},
   2515             .numberOfConsumers = 0,
   2516             .scale = 0.0f,
   2517             .zeroPoint = 0,
   2518             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2519             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2520         }
   2521     };
   2522 
   2523     const std::vector<Operation> operations = {
   2524         {
   2525             .type = OperationType::GENERATE_PROPOSALS,
   2526             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   2527             .outputs = {11, 12, 13},
   2528         },
   2529         {
   2530             .type = OperationType::ROI_ALIGN,
   2531             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   2532             .outputs = {21},
   2533         },
   2534         {
   2535             .type = OperationType::FULLY_CONNECTED,
   2536             .inputs = {21, 22, 23, 24},
   2537             .outputs = {25},
   2538         },
   2539         {
   2540             .type = OperationType::FULLY_CONNECTED,
   2541             .inputs = {21, 26, 27, 28},
   2542             .outputs = {29},
   2543         },
   2544         {
   2545             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   2546             .inputs = {12, 25, 13, 3},
   2547             .outputs = {30},
   2548         },
   2549         {
   2550             .type = OperationType::BOX_WITH_NMS_LIMIT,
   2551             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   2552             .outputs = {37, 38, 39, 40},
   2553         }
   2554     };
   2555 
   2556     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   2557     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   2558     std::vector<uint8_t> operandValues = {
   2559       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
   2560     };
   2561     const std::vector<hidl_memory> pools = {};
   2562 
   2563     return {
   2564         .operands = operands,
   2565         .operations = operations,
   2566         .inputIndexes = inputIndexes,
   2567         .outputIndexes = outputIndexes,
   2568         .operandValues = operandValues,
   2569         .pools = pools,
   2570         .relaxComputationFloat32toFloat16 = true,
   2571     };
   2572 }
   2573 
   2574 inline bool is_ignored_zero_sized_dynamic_output_shape_relaxed(int i) {
   2575   static std::set<int> ignore = {};
   2576   return ignore.find(i) != ignore.end();
   2577 }
   2578 
   2579 // Create the model
   2580 Model createTestModel_zero_sized_dynamic_output_shape_float16() {
   2581     const std::vector<Operand> operands = {
   2582         {
   2583             .type = OperandType::TENSOR_FLOAT16,
   2584             .dimensions = {1, 1, 1, 1},
   2585             .numberOfConsumers = 1,
   2586             .scale = 0.0f,
   2587             .zeroPoint = 0,
   2588             .lifetime = OperandLifeTime::MODEL_INPUT,
   2589             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2590         },
   2591         {
   2592             .type = OperandType::TENSOR_FLOAT16,
   2593             .dimensions = {1, 1, 1, 4},
   2594             .numberOfConsumers = 1,
   2595             .scale = 0.0f,
   2596             .zeroPoint = 0,
   2597             .lifetime = OperandLifeTime::MODEL_INPUT,
   2598             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2599         },
   2600         {
   2601             .type = OperandType::TENSOR_FLOAT16,
   2602             .dimensions = {1, 4},
   2603             .numberOfConsumers = 1,
   2604             .scale = 0.0f,
   2605             .zeroPoint = 0,
   2606             .lifetime = OperandLifeTime::MODEL_INPUT,
   2607             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2608         },
   2609         {
   2610             .type = OperandType::TENSOR_FLOAT16,
   2611             .dimensions = {1, 2},
   2612             .numberOfConsumers = 2,
   2613             .scale = 0.0f,
   2614             .zeroPoint = 0,
   2615             .lifetime = OperandLifeTime::MODEL_INPUT,
   2616             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2617         },
   2618         {
   2619             .type = OperandType::FLOAT16,
   2620             .dimensions = {},
   2621             .numberOfConsumers = 1,
   2622             .scale = 0.0f,
   2623             .zeroPoint = 0,
   2624             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2625             .location = {.poolIndex = 0, .offset = 0, .length = 2},
   2626         },
   2627         {
   2628             .type = OperandType::FLOAT16,
   2629             .dimensions = {},
   2630             .numberOfConsumers = 1,
   2631             .scale = 0.0f,
   2632             .zeroPoint = 0,
   2633             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2634             .location = {.poolIndex = 0, .offset = 2, .length = 2},
   2635         },
   2636         {
   2637             .type = OperandType::INT32,
   2638             .dimensions = {},
   2639             .numberOfConsumers = 1,
   2640             .scale = 0.0f,
   2641             .zeroPoint = 0,
   2642             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2643             .location = {.poolIndex = 0, .offset = 4, .length = 4},
   2644         },
   2645         {
   2646             .type = OperandType::INT32,
   2647             .dimensions = {},
   2648             .numberOfConsumers = 1,
   2649             .scale = 0.0f,
   2650             .zeroPoint = 0,
   2651             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2652             .location = {.poolIndex = 0, .offset = 8, .length = 4},
   2653         },
   2654         {
   2655             .type = OperandType::FLOAT16,
   2656             .dimensions = {},
   2657             .numberOfConsumers = 1,
   2658             .scale = 0.0f,
   2659             .zeroPoint = 0,
   2660             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2661             .location = {.poolIndex = 0, .offset = 12, .length = 2},
   2662         },
   2663         {
   2664             .type = OperandType::FLOAT16,
   2665             .dimensions = {},
   2666             .numberOfConsumers = 1,
   2667             .scale = 0.0f,
   2668             .zeroPoint = 0,
   2669             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2670             .location = {.poolIndex = 0, .offset = 14, .length = 2},
   2671         },
   2672         {
   2673             .type = OperandType::BOOL,
   2674             .dimensions = {},
   2675             .numberOfConsumers = 2,
   2676             .scale = 0.0f,
   2677             .zeroPoint = 0,
   2678             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2679             .location = {.poolIndex = 0, .offset = 16, .length = 1},
   2680         },
   2681         {
   2682             .type = OperandType::TENSOR_FLOAT16,
   2683             .dimensions = {0},
   2684             .numberOfConsumers = 0,
   2685             .scale = 0.0f,
   2686             .zeroPoint = 0,
   2687             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2688             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2689         },
   2690         {
   2691             .type = OperandType::TENSOR_FLOAT16,
   2692             .dimensions = {0, 4},
   2693             .numberOfConsumers = 2,
   2694             .scale = 0.0f,
   2695             .zeroPoint = 0,
   2696             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2697             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2698         },
   2699         {
   2700             .type = OperandType::TENSOR_INT32,
   2701             .dimensions = {0},
   2702             .numberOfConsumers = 3,
   2703             .scale = 0.0f,
   2704             .zeroPoint = 0,
   2705             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2706             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2707         },
   2708         {
   2709             .type = OperandType::TENSOR_FLOAT16,
   2710             .dimensions = {1, 1, 1, 1},
   2711             .numberOfConsumers = 1,
   2712             .scale = 0.0f,
   2713             .zeroPoint = 0,
   2714             .lifetime = OperandLifeTime::MODEL_INPUT,
   2715             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2716         },
   2717         {
   2718             .type = OperandType::INT32,
   2719             .dimensions = {},
   2720             .numberOfConsumers = 1,
   2721             .scale = 0.0f,
   2722             .zeroPoint = 0,
   2723             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2724             .location = {.poolIndex = 0, .offset = 17, .length = 4},
   2725         },
   2726         {
   2727             .type = OperandType::INT32,
   2728             .dimensions = {},
   2729             .numberOfConsumers = 1,
   2730             .scale = 0.0f,
   2731             .zeroPoint = 0,
   2732             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2733             .location = {.poolIndex = 0, .offset = 21, .length = 4},
   2734         },
   2735         {
   2736             .type = OperandType::FLOAT16,
   2737             .dimensions = {},
   2738             .numberOfConsumers = 1,
   2739             .scale = 0.0f,
   2740             .zeroPoint = 0,
   2741             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2742             .location = {.poolIndex = 0, .offset = 25, .length = 2},
   2743         },
   2744         {
   2745             .type = OperandType::FLOAT16,
   2746             .dimensions = {},
   2747             .numberOfConsumers = 1,
   2748             .scale = 0.0f,
   2749             .zeroPoint = 0,
   2750             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2751             .location = {.poolIndex = 0, .offset = 27, .length = 2},
   2752         },
   2753         {
   2754             .type = OperandType::INT32,
   2755             .dimensions = {},
   2756             .numberOfConsumers = 1,
   2757             .scale = 0.0f,
   2758             .zeroPoint = 0,
   2759             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2760             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   2761         },
   2762         {
   2763             .type = OperandType::INT32,
   2764             .dimensions = {},
   2765             .numberOfConsumers = 1,
   2766             .scale = 0.0f,
   2767             .zeroPoint = 0,
   2768             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2769             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   2770         },
   2771         {
   2772             .type = OperandType::TENSOR_FLOAT16,
   2773             .dimensions = {0, 2, 2, 1},
   2774             .numberOfConsumers = 2,
   2775             .scale = 0.0f,
   2776             .zeroPoint = 0,
   2777             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2778             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2779         },
   2780         {
   2781             .type = OperandType::TENSOR_FLOAT16,
   2782             .dimensions = {8, 4},
   2783             .numberOfConsumers = 1,
   2784             .scale = 0.0f,
   2785             .zeroPoint = 0,
   2786             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2787             .location = {.poolIndex = 0, .offset = 37, .length = 64},
   2788         },
   2789         {
   2790             .type = OperandType::TENSOR_FLOAT16,
   2791             .dimensions = {8},
   2792             .numberOfConsumers = 1,
   2793             .scale = 0.0f,
   2794             .zeroPoint = 0,
   2795             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2796             .location = {.poolIndex = 0, .offset = 101, .length = 16},
   2797         },
   2798         {
   2799             .type = OperandType::INT32,
   2800             .dimensions = {},
   2801             .numberOfConsumers = 1,
   2802             .scale = 0.0f,
   2803             .zeroPoint = 0,
   2804             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2805             .location = {.poolIndex = 0, .offset = 117, .length = 4},
   2806         },
   2807         {
   2808             .type = OperandType::TENSOR_FLOAT16,
   2809             .dimensions = {0, 8},
   2810             .numberOfConsumers = 1,
   2811             .scale = 0.0f,
   2812             .zeroPoint = 0,
   2813             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2814             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2815         },
   2816         {
   2817             .type = OperandType::TENSOR_FLOAT16,
   2818             .dimensions = {2, 4},
   2819             .numberOfConsumers = 1,
   2820             .scale = 0.0f,
   2821             .zeroPoint = 0,
   2822             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2823             .location = {.poolIndex = 0, .offset = 121, .length = 16},
   2824         },
   2825         {
   2826             .type = OperandType::TENSOR_FLOAT16,
   2827             .dimensions = {2},
   2828             .numberOfConsumers = 1,
   2829             .scale = 0.0f,
   2830             .zeroPoint = 0,
   2831             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2832             .location = {.poolIndex = 0, .offset = 137, .length = 4},
   2833         },
   2834         {
   2835             .type = OperandType::INT32,
   2836             .dimensions = {},
   2837             .numberOfConsumers = 1,
   2838             .scale = 0.0f,
   2839             .zeroPoint = 0,
   2840             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2841             .location = {.poolIndex = 0, .offset = 141, .length = 4},
   2842         },
   2843         {
   2844             .type = OperandType::TENSOR_FLOAT16,
   2845             .dimensions = {0, 2},
   2846             .numberOfConsumers = 1,
   2847             .scale = 0.0f,
   2848             .zeroPoint = 0,
   2849             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2850             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2851         },
   2852         {
   2853             .type = OperandType::TENSOR_FLOAT16,
   2854             .dimensions = {0, 8},
   2855             .numberOfConsumers = 1,
   2856             .scale = 0.0f,
   2857             .zeroPoint = 0,
   2858             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   2859             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2860         },
   2861         {
   2862             .type = OperandType::FLOAT16,
   2863             .dimensions = {},
   2864             .numberOfConsumers = 1,
   2865             .scale = 0.0f,
   2866             .zeroPoint = 0,
   2867             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2868             .location = {.poolIndex = 0, .offset = 145, .length = 2},
   2869         },
   2870         {
   2871             .type = OperandType::INT32,
   2872             .dimensions = {},
   2873             .numberOfConsumers = 1,
   2874             .scale = 0.0f,
   2875             .zeroPoint = 0,
   2876             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2877             .location = {.poolIndex = 0, .offset = 147, .length = 4},
   2878         },
   2879         {
   2880             .type = OperandType::INT32,
   2881             .dimensions = {},
   2882             .numberOfConsumers = 1,
   2883             .scale = 0.0f,
   2884             .zeroPoint = 0,
   2885             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2886             .location = {.poolIndex = 0, .offset = 151, .length = 4},
   2887         },
   2888         {
   2889             .type = OperandType::FLOAT16,
   2890             .dimensions = {},
   2891             .numberOfConsumers = 1,
   2892             .scale = 0.0f,
   2893             .zeroPoint = 0,
   2894             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2895             .location = {.poolIndex = 0, .offset = 155, .length = 2},
   2896         },
   2897         {
   2898             .type = OperandType::FLOAT16,
   2899             .dimensions = {},
   2900             .numberOfConsumers = 1,
   2901             .scale = 0.0f,
   2902             .zeroPoint = 0,
   2903             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2904             .location = {.poolIndex = 0, .offset = 157, .length = 2},
   2905         },
   2906         {
   2907             .type = OperandType::FLOAT16,
   2908             .dimensions = {},
   2909             .numberOfConsumers = 1,
   2910             .scale = 0.0f,
   2911             .zeroPoint = 0,
   2912             .lifetime = OperandLifeTime::CONSTANT_COPY,
   2913             .location = {.poolIndex = 0, .offset = 159, .length = 2},
   2914         },
   2915         {
   2916             .type = OperandType::TENSOR_FLOAT16,
   2917             .dimensions = {0},
   2918             .numberOfConsumers = 0,
   2919             .scale = 0.0f,
   2920             .zeroPoint = 0,
   2921             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2922             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2923         },
   2924         {
   2925             .type = OperandType::TENSOR_FLOAT16,
   2926             .dimensions = {0, 0},
   2927             .numberOfConsumers = 0,
   2928             .scale = 0.0f,
   2929             .zeroPoint = 0,
   2930             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2931             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2932         },
   2933         {
   2934             .type = OperandType::TENSOR_INT32,
   2935             .dimensions = {0},
   2936             .numberOfConsumers = 0,
   2937             .scale = 0.0f,
   2938             .zeroPoint = 0,
   2939             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2940             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2941         },
   2942         {
   2943             .type = OperandType::TENSOR_INT32,
   2944             .dimensions = {0},
   2945             .numberOfConsumers = 0,
   2946             .scale = 0.0f,
   2947             .zeroPoint = 0,
   2948             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   2949             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   2950         }
   2951     };
   2952 
   2953     const std::vector<Operation> operations = {
   2954         {
   2955             .type = OperationType::GENERATE_PROPOSALS,
   2956             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   2957             .outputs = {11, 12, 13},
   2958         },
   2959         {
   2960             .type = OperationType::ROI_ALIGN,
   2961             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   2962             .outputs = {21},
   2963         },
   2964         {
   2965             .type = OperationType::FULLY_CONNECTED,
   2966             .inputs = {21, 22, 23, 24},
   2967             .outputs = {25},
   2968         },
   2969         {
   2970             .type = OperationType::FULLY_CONNECTED,
   2971             .inputs = {21, 26, 27, 28},
   2972             .outputs = {29},
   2973         },
   2974         {
   2975             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   2976             .inputs = {12, 25, 13, 3},
   2977             .outputs = {30},
   2978         },
   2979         {
   2980             .type = OperationType::BOX_WITH_NMS_LIMIT,
   2981             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   2982             .outputs = {37, 38, 39, 40},
   2983         }
   2984     };
   2985 
   2986     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   2987     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   2988     std::vector<uint8_t> operandValues = {
   2989       0, 60, 0, 60, 255, 255, 255, 255, 255, 255, 255, 255, 205, 52, 0, 73, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 60, 0, 60, 4, 0, 0, 0, 4, 0, 0, 0, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 0, 0, 0, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 60, 0, 0, 0, 0, 102, 46, 255, 255, 255, 255, 0, 0, 0, 0, 205, 52, 0, 60, 102, 46
   2990     };
   2991     const std::vector<hidl_memory> pools = {};
   2992 
   2993     return {
   2994         .operands = operands,
   2995         .operations = operations,
   2996         .inputIndexes = inputIndexes,
   2997         .outputIndexes = outputIndexes,
   2998         .operandValues = operandValues,
   2999         .pools = pools,
   3000     };
   3001 }
   3002 
   3003 inline bool is_ignored_zero_sized_dynamic_output_shape_float16(int i) {
   3004   static std::set<int> ignore = {};
   3005   return ignore.find(i) != ignore.end();
   3006 }
   3007 
   3008 // Create the model
   3009 Model createTestModel_zero_sized_dynamic_output_shape_quant8() {
   3010     const std::vector<Operand> operands = {
   3011         {
   3012             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3013             .dimensions = {1, 1, 1, 1},
   3014             .numberOfConsumers = 1,
   3015             .scale = 0.1f,
   3016             .zeroPoint = 128,
   3017             .lifetime = OperandLifeTime::MODEL_INPUT,
   3018             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3019         },
   3020         {
   3021             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3022             .dimensions = {1, 1, 1, 4},
   3023             .numberOfConsumers = 1,
   3024             .scale = 0.1f,
   3025             .zeroPoint = 128,
   3026             .lifetime = OperandLifeTime::MODEL_INPUT,
   3027             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3028         },
   3029         {
   3030             .type = OperandType::TENSOR_QUANT16_SYMM,
   3031             .dimensions = {1, 4},
   3032             .numberOfConsumers = 1,
   3033             .scale = 0.125f,
   3034             .zeroPoint = 0,
   3035             .lifetime = OperandLifeTime::MODEL_INPUT,
   3036             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3037         },
   3038         {
   3039             .type = OperandType::TENSOR_QUANT16_ASYMM,
   3040             .dimensions = {1, 2},
   3041             .numberOfConsumers = 2,
   3042             .scale = 0.125f,
   3043             .zeroPoint = 0,
   3044             .lifetime = OperandLifeTime::MODEL_INPUT,
   3045             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3046         },
   3047         {
   3048             .type = OperandType::FLOAT32,
   3049             .dimensions = {},
   3050             .numberOfConsumers = 1,
   3051             .scale = 0.0f,
   3052             .zeroPoint = 0,
   3053             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3054             .location = {.poolIndex = 0, .offset = 0, .length = 4},
   3055         },
   3056         {
   3057             .type = OperandType::FLOAT32,
   3058             .dimensions = {},
   3059             .numberOfConsumers = 1,
   3060             .scale = 0.0f,
   3061             .zeroPoint = 0,
   3062             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3063             .location = {.poolIndex = 0, .offset = 4, .length = 4},
   3064         },
   3065         {
   3066             .type = OperandType::INT32,
   3067             .dimensions = {},
   3068             .numberOfConsumers = 1,
   3069             .scale = 0.0f,
   3070             .zeroPoint = 0,
   3071             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3072             .location = {.poolIndex = 0, .offset = 8, .length = 4},
   3073         },
   3074         {
   3075             .type = OperandType::INT32,
   3076             .dimensions = {},
   3077             .numberOfConsumers = 1,
   3078             .scale = 0.0f,
   3079             .zeroPoint = 0,
   3080             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3081             .location = {.poolIndex = 0, .offset = 12, .length = 4},
   3082         },
   3083         {
   3084             .type = OperandType::FLOAT32,
   3085             .dimensions = {},
   3086             .numberOfConsumers = 1,
   3087             .scale = 0.0f,
   3088             .zeroPoint = 0,
   3089             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3090             .location = {.poolIndex = 0, .offset = 16, .length = 4},
   3091         },
   3092         {
   3093             .type = OperandType::FLOAT32,
   3094             .dimensions = {},
   3095             .numberOfConsumers = 1,
   3096             .scale = 0.0f,
   3097             .zeroPoint = 0,
   3098             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3099             .location = {.poolIndex = 0, .offset = 20, .length = 4},
   3100         },
   3101         {
   3102             .type = OperandType::BOOL,
   3103             .dimensions = {},
   3104             .numberOfConsumers = 2,
   3105             .scale = 0.0f,
   3106             .zeroPoint = 0,
   3107             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3108             .location = {.poolIndex = 0, .offset = 24, .length = 1},
   3109         },
   3110         {
   3111             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3112             .dimensions = {0},
   3113             .numberOfConsumers = 0,
   3114             .scale = 0.1f,
   3115             .zeroPoint = 128,
   3116             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   3117             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3118         },
   3119         {
   3120             .type = OperandType::TENSOR_QUANT16_ASYMM,
   3121             .dimensions = {0, 4},
   3122             .numberOfConsumers = 2,
   3123             .scale = 0.125f,
   3124             .zeroPoint = 0,
   3125             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3126             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3127         },
   3128         {
   3129             .type = OperandType::TENSOR_INT32,
   3130             .dimensions = {0},
   3131             .numberOfConsumers = 3,
   3132             .scale = 0.0f,
   3133             .zeroPoint = 0,
   3134             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3135             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3136         },
   3137         {
   3138             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3139             .dimensions = {1, 1, 1, 1},
   3140             .numberOfConsumers = 1,
   3141             .scale = 0.1f,
   3142             .zeroPoint = 128,
   3143             .lifetime = OperandLifeTime::MODEL_INPUT,
   3144             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3145         },
   3146         {
   3147             .type = OperandType::INT32,
   3148             .dimensions = {},
   3149             .numberOfConsumers = 1,
   3150             .scale = 0.0f,
   3151             .zeroPoint = 0,
   3152             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3153             .location = {.poolIndex = 0, .offset = 25, .length = 4},
   3154         },
   3155         {
   3156             .type = OperandType::INT32,
   3157             .dimensions = {},
   3158             .numberOfConsumers = 1,
   3159             .scale = 0.0f,
   3160             .zeroPoint = 0,
   3161             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3162             .location = {.poolIndex = 0, .offset = 29, .length = 4},
   3163         },
   3164         {
   3165             .type = OperandType::FLOAT32,
   3166             .dimensions = {},
   3167             .numberOfConsumers = 1,
   3168             .scale = 0.0f,
   3169             .zeroPoint = 0,
   3170             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3171             .location = {.poolIndex = 0, .offset = 33, .length = 4},
   3172         },
   3173         {
   3174             .type = OperandType::FLOAT32,
   3175             .dimensions = {},
   3176             .numberOfConsumers = 1,
   3177             .scale = 0.0f,
   3178             .zeroPoint = 0,
   3179             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3180             .location = {.poolIndex = 0, .offset = 37, .length = 4},
   3181         },
   3182         {
   3183             .type = OperandType::INT32,
   3184             .dimensions = {},
   3185             .numberOfConsumers = 1,
   3186             .scale = 0.0f,
   3187             .zeroPoint = 0,
   3188             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3189             .location = {.poolIndex = 0, .offset = 41, .length = 4},
   3190         },
   3191         {
   3192             .type = OperandType::INT32,
   3193             .dimensions = {},
   3194             .numberOfConsumers = 1,
   3195             .scale = 0.0f,
   3196             .zeroPoint = 0,
   3197             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3198             .location = {.poolIndex = 0, .offset = 45, .length = 4},
   3199         },
   3200         {
   3201             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3202             .dimensions = {0, 2, 2, 1},
   3203             .numberOfConsumers = 2,
   3204             .scale = 0.1f,
   3205             .zeroPoint = 128,
   3206             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3207             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3208         },
   3209         {
   3210             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3211             .dimensions = {8, 4},
   3212             .numberOfConsumers = 1,
   3213             .scale = 0.1f,
   3214             .zeroPoint = 128,
   3215             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3216             .location = {.poolIndex = 0, .offset = 49, .length = 32},
   3217         },
   3218         {
   3219             .type = OperandType::TENSOR_INT32,
   3220             .dimensions = {8},
   3221             .numberOfConsumers = 1,
   3222             .scale = 0.01f,
   3223             .zeroPoint = 0,
   3224             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3225             .location = {.poolIndex = 0, .offset = 81, .length = 32},
   3226         },
   3227         {
   3228             .type = OperandType::INT32,
   3229             .dimensions = {},
   3230             .numberOfConsumers = 1,
   3231             .scale = 0.0f,
   3232             .zeroPoint = 0,
   3233             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3234             .location = {.poolIndex = 0, .offset = 113, .length = 4},
   3235         },
   3236         {
   3237             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3238             .dimensions = {0, 8},
   3239             .numberOfConsumers = 1,
   3240             .scale = 0.1f,
   3241             .zeroPoint = 128,
   3242             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3243             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3244         },
   3245         {
   3246             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3247             .dimensions = {2, 4},
   3248             .numberOfConsumers = 1,
   3249             .scale = 0.1f,
   3250             .zeroPoint = 128,
   3251             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3252             .location = {.poolIndex = 0, .offset = 117, .length = 8},
   3253         },
   3254         {
   3255             .type = OperandType::TENSOR_INT32,
   3256             .dimensions = {2},
   3257             .numberOfConsumers = 1,
   3258             .scale = 0.01f,
   3259             .zeroPoint = 0,
   3260             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3261             .location = {.poolIndex = 0, .offset = 125, .length = 8},
   3262         },
   3263         {
   3264             .type = OperandType::INT32,
   3265             .dimensions = {},
   3266             .numberOfConsumers = 1,
   3267             .scale = 0.0f,
   3268             .zeroPoint = 0,
   3269             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3270             .location = {.poolIndex = 0, .offset = 133, .length = 4},
   3271         },
   3272         {
   3273             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3274             .dimensions = {0, 2},
   3275             .numberOfConsumers = 1,
   3276             .scale = 0.1f,
   3277             .zeroPoint = 128,
   3278             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3279             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3280         },
   3281         {
   3282             .type = OperandType::TENSOR_QUANT16_ASYMM,
   3283             .dimensions = {0, 8},
   3284             .numberOfConsumers = 1,
   3285             .scale = 0.125f,
   3286             .zeroPoint = 0,
   3287             .lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
   3288             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3289         },
   3290         {
   3291             .type = OperandType::FLOAT32,
   3292             .dimensions = {},
   3293             .numberOfConsumers = 1,
   3294             .scale = 0.0f,
   3295             .zeroPoint = 0,
   3296             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3297             .location = {.poolIndex = 0, .offset = 137, .length = 4},
   3298         },
   3299         {
   3300             .type = OperandType::INT32,
   3301             .dimensions = {},
   3302             .numberOfConsumers = 1,
   3303             .scale = 0.0f,
   3304             .zeroPoint = 0,
   3305             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3306             .location = {.poolIndex = 0, .offset = 141, .length = 4},
   3307         },
   3308         {
   3309             .type = OperandType::INT32,
   3310             .dimensions = {},
   3311             .numberOfConsumers = 1,
   3312             .scale = 0.0f,
   3313             .zeroPoint = 0,
   3314             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3315             .location = {.poolIndex = 0, .offset = 145, .length = 4},
   3316         },
   3317         {
   3318             .type = OperandType::FLOAT32,
   3319             .dimensions = {},
   3320             .numberOfConsumers = 1,
   3321             .scale = 0.0f,
   3322             .zeroPoint = 0,
   3323             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3324             .location = {.poolIndex = 0, .offset = 149, .length = 4},
   3325         },
   3326         {
   3327             .type = OperandType::FLOAT32,
   3328             .dimensions = {},
   3329             .numberOfConsumers = 1,
   3330             .scale = 0.0f,
   3331             .zeroPoint = 0,
   3332             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3333             .location = {.poolIndex = 0, .offset = 153, .length = 4},
   3334         },
   3335         {
   3336             .type = OperandType::FLOAT32,
   3337             .dimensions = {},
   3338             .numberOfConsumers = 1,
   3339             .scale = 0.0f,
   3340             .zeroPoint = 0,
   3341             .lifetime = OperandLifeTime::CONSTANT_COPY,
   3342             .location = {.poolIndex = 0, .offset = 157, .length = 4},
   3343         },
   3344         {
   3345             .type = OperandType::TENSOR_QUANT8_ASYMM,
   3346             .dimensions = {0},
   3347             .numberOfConsumers = 0,
   3348             .scale = 0.1f,
   3349             .zeroPoint = 128,
   3350             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   3351             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3352         },
   3353         {
   3354             .type = OperandType::TENSOR_QUANT16_ASYMM,
   3355             .dimensions = {0, 0},
   3356             .numberOfConsumers = 0,
   3357             .scale = 0.125f,
   3358             .zeroPoint = 0,
   3359             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   3360             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3361         },
   3362         {
   3363             .type = OperandType::TENSOR_INT32,
   3364             .dimensions = {0},
   3365             .numberOfConsumers = 0,
   3366             .scale = 0.0f,
   3367             .zeroPoint = 0,
   3368             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   3369             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3370         },
   3371         {
   3372             .type = OperandType::TENSOR_INT32,
   3373             .dimensions = {0},
   3374             .numberOfConsumers = 0,
   3375             .scale = 0.0f,
   3376             .zeroPoint = 0,
   3377             .lifetime = OperandLifeTime::MODEL_OUTPUT,
   3378             .location = {.poolIndex = 0, .offset = 0, .length = 0},
   3379         }
   3380     };
   3381 
   3382     const std::vector<Operation> operations = {
   3383         {
   3384             .type = OperationType::GENERATE_PROPOSALS,
   3385             .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
   3386             .outputs = {11, 12, 13},
   3387         },
   3388         {
   3389             .type = OperationType::ROI_ALIGN,
   3390             .inputs = {14, 12, 13, 15, 16, 17, 18, 19, 20, 10},
   3391             .outputs = {21},
   3392         },
   3393         {
   3394             .type = OperationType::FULLY_CONNECTED,
   3395             .inputs = {21, 22, 23, 24},
   3396             .outputs = {25},
   3397         },
   3398         {
   3399             .type = OperationType::FULLY_CONNECTED,
   3400             .inputs = {21, 26, 27, 28},
   3401             .outputs = {29},
   3402         },
   3403         {
   3404             .type = OperationType::AXIS_ALIGNED_BBOX_TRANSFORM,
   3405             .inputs = {12, 25, 13, 3},
   3406             .outputs = {30},
   3407         },
   3408         {
   3409             .type = OperationType::BOX_WITH_NMS_LIMIT,
   3410             .inputs = {29, 30, 13, 31, 32, 33, 34, 35, 36},
   3411             .outputs = {37, 38, 39, 40},
   3412         }
   3413     };
   3414 
   3415     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 14};
   3416     const std::vector<uint32_t> outputIndexes = {11, 37, 38, 39, 40};
   3417     std::vector<uint8_t> operandValues = {
   3418       0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 154, 153, 153, 62, 0, 0, 32, 65, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 4, 0, 0, 0, 4, 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 100, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 205, 204, 204, 61, 255, 255, 255, 255, 0, 0, 0, 0, 154, 153, 153, 62, 0, 0, 128, 63, 205, 204, 204, 61
   3419     };
   3420     const std::vector<hidl_memory> pools = {};
   3421 
   3422     return {
   3423         .operands = operands,
   3424         .operations = operations,
   3425         .inputIndexes = inputIndexes,
   3426         .outputIndexes = outputIndexes,
   3427         .operandValues = operandValues,
   3428         .pools = pools,
   3429     };
   3430 }
   3431 
   3432 inline bool is_ignored_zero_sized_dynamic_output_shape_quant8(int i) {
   3433   static std::set<int> ignore = {};
   3434   return ignore.find(i) != ignore.end();
   3435 }
   3436 
   3437