Home | History | Annotate | Download | only in vts_models
      1 // clang-format off
      2 // Generated file (from: depthwise_conv.mod.py). Do not edit
      3 // Create the model
      4 Model createTestModel() {
      5     const std::vector<Operand> operands = {
      6         {
      7             .type = OperandType::TENSOR_FLOAT32,
      8             .dimensions = {1, 8, 8, 3},
      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, 3},
     18             .numberOfConsumers = 1,
     19             .scale = 0.0f,
     20             .zeroPoint = 0,
     21             .lifetime = OperandLifeTime::CONSTANT_COPY,
     22             .location = {.poolIndex = 0, .offset = 0, .length = 12},
     23         },
     24         {
     25             .type = OperandType::TENSOR_FLOAT32,
     26             .dimensions = {3},
     27             .numberOfConsumers = 1,
     28             .scale = 0.0f,
     29             .zeroPoint = 0,
     30             .lifetime = OperandLifeTime::CONSTANT_COPY,
     31             .location = {.poolIndex = 0, .offset = 12, .length = 12},
     32         },
     33         {
     34             .type = OperandType::INT32,
     35             .dimensions = {},
     36             .numberOfConsumers = 1,
     37             .scale = 0.0f,
     38             .zeroPoint = 0,
     39             .lifetime = OperandLifeTime::CONSTANT_COPY,
     40             .location = {.poolIndex = 0, .offset = 24, .length = 4},
     41         },
     42         {
     43             .type = OperandType::INT32,
     44             .dimensions = {},
     45             .numberOfConsumers = 1,
     46             .scale = 0.0f,
     47             .zeroPoint = 0,
     48             .lifetime = OperandLifeTime::CONSTANT_COPY,
     49             .location = {.poolIndex = 0, .offset = 28, .length = 4},
     50         },
     51         {
     52             .type = OperandType::INT32,
     53             .dimensions = {},
     54             .numberOfConsumers = 1,
     55             .scale = 0.0f,
     56             .zeroPoint = 0,
     57             .lifetime = OperandLifeTime::CONSTANT_COPY,
     58             .location = {.poolIndex = 0, .offset = 32, .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 = 36, .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 = 40, .length = 4},
     77         },
     78         {
     79             .type = OperandType::TENSOR_FLOAT32,
     80             .dimensions = {1, 8, 8, 3},
     81             .numberOfConsumers = 0,
     82             .scale = 0.0f,
     83             .zeroPoint = 0,
     84             .lifetime = OperandLifeTime::MODEL_OUTPUT,
     85             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     86         }
     87     };
     88 
     89     const std::vector<Operation> operations = {
     90         {
     91             .type = OperationType::DEPTHWISE_CONV_2D,
     92             .inputs = {0, 1, 2, 3, 4, 5, 6, 7},
     93             .outputs = {8},
     94         }
     95     };
     96 
     97     const std::vector<uint32_t> inputIndexes = {0};
     98     const std::vector<uint32_t> outputIndexes = {8};
     99     std::vector<uint8_t> operandValues = {
    100       188, 89, 119, 191, 193, 88, 239, 190, 143, 112, 82, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    101     };
    102     const std::vector<hidl_memory> pools = {};
    103 
    104     return {
    105         .operands = operands,
    106         .operations = operations,
    107         .inputIndexes = inputIndexes,
    108         .outputIndexes = outputIndexes,
    109         .operandValues = operandValues,
    110         .pools = pools,
    111     };
    112 }
    113 
    114 inline bool is_ignored(int i) {
    115   static std::set<int> ignore = {};
    116   return ignore.find(i) != ignore.end();
    117 }
    118 
    119 // Create the model
    120 Model createTestModel_dynamic_output_shape() {
    121     const std::vector<Operand> operands = {
    122         {
    123             .type = OperandType::TENSOR_FLOAT32,
    124             .dimensions = {1, 8, 8, 3},
    125             .numberOfConsumers = 1,
    126             .scale = 0.0f,
    127             .zeroPoint = 0,
    128             .lifetime = OperandLifeTime::MODEL_INPUT,
    129             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    130         },
    131         {
    132             .type = OperandType::TENSOR_FLOAT32,
    133             .dimensions = {1, 1, 1, 3},
    134             .numberOfConsumers = 1,
    135             .scale = 0.0f,
    136             .zeroPoint = 0,
    137             .lifetime = OperandLifeTime::CONSTANT_COPY,
    138             .location = {.poolIndex = 0, .offset = 0, .length = 12},
    139         },
    140         {
    141             .type = OperandType::TENSOR_FLOAT32,
    142             .dimensions = {3},
    143             .numberOfConsumers = 1,
    144             .scale = 0.0f,
    145             .zeroPoint = 0,
    146             .lifetime = OperandLifeTime::CONSTANT_COPY,
    147             .location = {.poolIndex = 0, .offset = 12, .length = 12},
    148         },
    149         {
    150             .type = OperandType::INT32,
    151             .dimensions = {},
    152             .numberOfConsumers = 1,
    153             .scale = 0.0f,
    154             .zeroPoint = 0,
    155             .lifetime = OperandLifeTime::CONSTANT_COPY,
    156             .location = {.poolIndex = 0, .offset = 24, .length = 4},
    157         },
    158         {
    159             .type = OperandType::INT32,
    160             .dimensions = {},
    161             .numberOfConsumers = 1,
    162             .scale = 0.0f,
    163             .zeroPoint = 0,
    164             .lifetime = OperandLifeTime::CONSTANT_COPY,
    165             .location = {.poolIndex = 0, .offset = 28, .length = 4},
    166         },
    167         {
    168             .type = OperandType::INT32,
    169             .dimensions = {},
    170             .numberOfConsumers = 1,
    171             .scale = 0.0f,
    172             .zeroPoint = 0,
    173             .lifetime = OperandLifeTime::CONSTANT_COPY,
    174             .location = {.poolIndex = 0, .offset = 32, .length = 4},
    175         },
    176         {
    177             .type = OperandType::INT32,
    178             .dimensions = {},
    179             .numberOfConsumers = 1,
    180             .scale = 0.0f,
    181             .zeroPoint = 0,
    182             .lifetime = OperandLifeTime::CONSTANT_COPY,
    183             .location = {.poolIndex = 0, .offset = 36, .length = 4},
    184         },
    185         {
    186             .type = OperandType::INT32,
    187             .dimensions = {},
    188             .numberOfConsumers = 1,
    189             .scale = 0.0f,
    190             .zeroPoint = 0,
    191             .lifetime = OperandLifeTime::CONSTANT_COPY,
    192             .location = {.poolIndex = 0, .offset = 40, .length = 4},
    193         },
    194         {
    195             .type = OperandType::TENSOR_FLOAT32,
    196             .dimensions = {0, 0, 0, 0},
    197             .numberOfConsumers = 0,
    198             .scale = 0.0f,
    199             .zeroPoint = 0,
    200             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    201             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    202         }
    203     };
    204 
    205     const std::vector<Operation> operations = {
    206         {
    207             .type = OperationType::DEPTHWISE_CONV_2D,
    208             .inputs = {0, 1, 2, 3, 4, 5, 6, 7},
    209             .outputs = {8},
    210         }
    211     };
    212 
    213     const std::vector<uint32_t> inputIndexes = {0};
    214     const std::vector<uint32_t> outputIndexes = {8};
    215     std::vector<uint8_t> operandValues = {
    216       188, 89, 119, 191, 193, 88, 239, 190, 143, 112, 82, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    217     };
    218     const std::vector<hidl_memory> pools = {};
    219 
    220     return {
    221         .operands = operands,
    222         .operations = operations,
    223         .inputIndexes = inputIndexes,
    224         .outputIndexes = outputIndexes,
    225         .operandValues = operandValues,
    226         .pools = pools,
    227     };
    228 }
    229 
    230 inline bool is_ignored_dynamic_output_shape(int i) {
    231   static std::set<int> ignore = {};
    232   return ignore.find(i) != ignore.end();
    233 }
    234 
    235 // Create the model
    236 Model createTestModel_2() {
    237     const std::vector<Operand> operands = {
    238         {
    239             .type = OperandType::TENSOR_FLOAT32,
    240             .dimensions = {1, 8, 8, 3},
    241             .numberOfConsumers = 1,
    242             .scale = 0.0f,
    243             .zeroPoint = 0,
    244             .lifetime = OperandLifeTime::MODEL_INPUT,
    245             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    246         },
    247         {
    248             .type = OperandType::TENSOR_FLOAT32,
    249             .dimensions = {1, 1, 1, 3},
    250             .numberOfConsumers = 1,
    251             .scale = 0.0f,
    252             .zeroPoint = 0,
    253             .lifetime = OperandLifeTime::CONSTANT_COPY,
    254             .location = {.poolIndex = 0, .offset = 0, .length = 12},
    255         },
    256         {
    257             .type = OperandType::TENSOR_FLOAT32,
    258             .dimensions = {3},
    259             .numberOfConsumers = 1,
    260             .scale = 0.0f,
    261             .zeroPoint = 0,
    262             .lifetime = OperandLifeTime::CONSTANT_COPY,
    263             .location = {.poolIndex = 0, .offset = 12, .length = 12},
    264         },
    265         {
    266             .type = OperandType::INT32,
    267             .dimensions = {},
    268             .numberOfConsumers = 1,
    269             .scale = 0.0f,
    270             .zeroPoint = 0,
    271             .lifetime = OperandLifeTime::CONSTANT_COPY,
    272             .location = {.poolIndex = 0, .offset = 24, .length = 4},
    273         },
    274         {
    275             .type = OperandType::INT32,
    276             .dimensions = {},
    277             .numberOfConsumers = 1,
    278             .scale = 0.0f,
    279             .zeroPoint = 0,
    280             .lifetime = OperandLifeTime::CONSTANT_COPY,
    281             .location = {.poolIndex = 0, .offset = 28, .length = 4},
    282         },
    283         {
    284             .type = OperandType::INT32,
    285             .dimensions = {},
    286             .numberOfConsumers = 1,
    287             .scale = 0.0f,
    288             .zeroPoint = 0,
    289             .lifetime = OperandLifeTime::CONSTANT_COPY,
    290             .location = {.poolIndex = 0, .offset = 32, .length = 4},
    291         },
    292         {
    293             .type = OperandType::INT32,
    294             .dimensions = {},
    295             .numberOfConsumers = 1,
    296             .scale = 0.0f,
    297             .zeroPoint = 0,
    298             .lifetime = OperandLifeTime::CONSTANT_COPY,
    299             .location = {.poolIndex = 0, .offset = 36, .length = 4},
    300         },
    301         {
    302             .type = OperandType::INT32,
    303             .dimensions = {},
    304             .numberOfConsumers = 1,
    305             .scale = 0.0f,
    306             .zeroPoint = 0,
    307             .lifetime = OperandLifeTime::CONSTANT_COPY,
    308             .location = {.poolIndex = 0, .offset = 40, .length = 4},
    309         },
    310         {
    311             .type = OperandType::TENSOR_FLOAT32,
    312             .dimensions = {1, 8, 8, 3},
    313             .numberOfConsumers = 0,
    314             .scale = 0.0f,
    315             .zeroPoint = 0,
    316             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    317             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    318         }
    319     };
    320 
    321     const std::vector<Operation> operations = {
    322         {
    323             .type = OperationType::DEPTHWISE_CONV_2D,
    324             .inputs = {0, 1, 2, 3, 4, 5, 6, 7},
    325             .outputs = {8},
    326         }
    327     };
    328 
    329     const std::vector<uint32_t> inputIndexes = {0};
    330     const std::vector<uint32_t> outputIndexes = {8};
    331     std::vector<uint8_t> operandValues = {
    332       188, 89, 119, 191, 193, 88, 239, 190, 143, 112, 82, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    333     };
    334     const std::vector<hidl_memory> pools = {};
    335 
    336     return {
    337         .operands = operands,
    338         .operations = operations,
    339         .inputIndexes = inputIndexes,
    340         .outputIndexes = outputIndexes,
    341         .operandValues = operandValues,
    342         .pools = pools,
    343     };
    344 }
    345 
    346 inline bool is_ignored_2(int i) {
    347   static std::set<int> ignore = {};
    348   return ignore.find(i) != ignore.end();
    349 }
    350 
    351 // Create the model
    352 Model createTestModel_dynamic_output_shape_2() {
    353     const std::vector<Operand> operands = {
    354         {
    355             .type = OperandType::TENSOR_FLOAT32,
    356             .dimensions = {1, 8, 8, 3},
    357             .numberOfConsumers = 1,
    358             .scale = 0.0f,
    359             .zeroPoint = 0,
    360             .lifetime = OperandLifeTime::MODEL_INPUT,
    361             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    362         },
    363         {
    364             .type = OperandType::TENSOR_FLOAT32,
    365             .dimensions = {1, 1, 1, 3},
    366             .numberOfConsumers = 1,
    367             .scale = 0.0f,
    368             .zeroPoint = 0,
    369             .lifetime = OperandLifeTime::CONSTANT_COPY,
    370             .location = {.poolIndex = 0, .offset = 0, .length = 12},
    371         },
    372         {
    373             .type = OperandType::TENSOR_FLOAT32,
    374             .dimensions = {3},
    375             .numberOfConsumers = 1,
    376             .scale = 0.0f,
    377             .zeroPoint = 0,
    378             .lifetime = OperandLifeTime::CONSTANT_COPY,
    379             .location = {.poolIndex = 0, .offset = 12, .length = 12},
    380         },
    381         {
    382             .type = OperandType::INT32,
    383             .dimensions = {},
    384             .numberOfConsumers = 1,
    385             .scale = 0.0f,
    386             .zeroPoint = 0,
    387             .lifetime = OperandLifeTime::CONSTANT_COPY,
    388             .location = {.poolIndex = 0, .offset = 24, .length = 4},
    389         },
    390         {
    391             .type = OperandType::INT32,
    392             .dimensions = {},
    393             .numberOfConsumers = 1,
    394             .scale = 0.0f,
    395             .zeroPoint = 0,
    396             .lifetime = OperandLifeTime::CONSTANT_COPY,
    397             .location = {.poolIndex = 0, .offset = 28, .length = 4},
    398         },
    399         {
    400             .type = OperandType::INT32,
    401             .dimensions = {},
    402             .numberOfConsumers = 1,
    403             .scale = 0.0f,
    404             .zeroPoint = 0,
    405             .lifetime = OperandLifeTime::CONSTANT_COPY,
    406             .location = {.poolIndex = 0, .offset = 32, .length = 4},
    407         },
    408         {
    409             .type = OperandType::INT32,
    410             .dimensions = {},
    411             .numberOfConsumers = 1,
    412             .scale = 0.0f,
    413             .zeroPoint = 0,
    414             .lifetime = OperandLifeTime::CONSTANT_COPY,
    415             .location = {.poolIndex = 0, .offset = 36, .length = 4},
    416         },
    417         {
    418             .type = OperandType::INT32,
    419             .dimensions = {},
    420             .numberOfConsumers = 1,
    421             .scale = 0.0f,
    422             .zeroPoint = 0,
    423             .lifetime = OperandLifeTime::CONSTANT_COPY,
    424             .location = {.poolIndex = 0, .offset = 40, .length = 4},
    425         },
    426         {
    427             .type = OperandType::TENSOR_FLOAT32,
    428             .dimensions = {0, 0, 0, 0},
    429             .numberOfConsumers = 0,
    430             .scale = 0.0f,
    431             .zeroPoint = 0,
    432             .lifetime = OperandLifeTime::MODEL_OUTPUT,
    433             .location = {.poolIndex = 0, .offset = 0, .length = 0},
    434         }
    435     };
    436 
    437     const std::vector<Operation> operations = {
    438         {
    439             .type = OperationType::DEPTHWISE_CONV_2D,
    440             .inputs = {0, 1, 2, 3, 4, 5, 6, 7},
    441             .outputs = {8},
    442         }
    443     };
    444 
    445     const std::vector<uint32_t> inputIndexes = {0};
    446     const std::vector<uint32_t> outputIndexes = {8};
    447     std::vector<uint8_t> operandValues = {
    448       188, 89, 119, 191, 193, 88, 239, 190, 143, 112, 82, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
    449     };
    450     const std::vector<hidl_memory> pools = {};
    451 
    452     return {
    453         .operands = operands,
    454         .operations = operations,
    455         .inputIndexes = inputIndexes,
    456         .outputIndexes = outputIndexes,
    457         .operandValues = operandValues,
    458         .pools = pools,
    459     };
    460 }
    461 
    462 inline bool is_ignored_dynamic_output_shape_2(int i) {
    463   static std::set<int> ignore = {};
    464   return ignore.find(i) != ignore.end();
    465 }
    466 
    467