Home | History | Annotate | Download | only in vts_models
      1 // Generated code. Do not edit
      2 // Create the model
      3 Model createTestModel() {
      4     const std::vector<Operand> operands = {
      5         {
      6             .type = OperandType::TENSOR_FLOAT32,
      7             .dimensions = {1, 2, 2, 1},
      8             .numberOfConsumers = 1,
      9             .scale = 0.0f,
     10             .zeroPoint = 0,
     11             .lifetime = OperandLifeTime::MODEL_INPUT,
     12             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     13         },
     14         {
     15             .type = OperandType::INT32,
     16             .dimensions = {},
     17             .numberOfConsumers = 4,
     18             .scale = 0.0f,
     19             .zeroPoint = 0,
     20             .lifetime = OperandLifeTime::CONSTANT_COPY,
     21             .location = {.poolIndex = 0, .offset = 0, .length = 4},
     22         },
     23         {
     24             .type = OperandType::INT32,
     25             .dimensions = {},
     26             .numberOfConsumers = 4,
     27             .scale = 0.0f,
     28             .zeroPoint = 0,
     29             .lifetime = OperandLifeTime::CONSTANT_COPY,
     30             .location = {.poolIndex = 0, .offset = 4, .length = 4},
     31         },
     32         {
     33             .type = OperandType::INT32,
     34             .dimensions = {},
     35             .numberOfConsumers = 1,
     36             .scale = 0.0f,
     37             .zeroPoint = 0,
     38             .lifetime = OperandLifeTime::CONSTANT_COPY,
     39             .location = {.poolIndex = 0, .offset = 8, .length = 4},
     40         },
     41         {
     42             .type = OperandType::TENSOR_FLOAT32,
     43             .dimensions = {1, 2, 2, 1},
     44             .numberOfConsumers = 0,
     45             .scale = 0.0f,
     46             .zeroPoint = 0,
     47             .lifetime = OperandLifeTime::MODEL_OUTPUT,
     48             .location = {.poolIndex = 0, .offset = 0, .length = 0},
     49         }
     50     };
     51 
     52     const std::vector<Operation> operations = {
     53         {
     54             .type = OperationType::MAX_POOL_2D,
     55             .inputs = {0, 2, 2, 2, 2, 1, 1, 1, 1, 3},
     56             .outputs = {4},
     57         }
     58     };
     59 
     60     const std::vector<uint32_t> inputIndexes = {0};
     61     const std::vector<uint32_t> outputIndexes = {4};
     62     std::vector<uint8_t> operandValues = {
     63       1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     64     };
     65     const std::vector<hidl_memory> pools = {};
     66 
     67     return {
     68         .operands = operands,
     69         .operations = operations,
     70         .inputIndexes = inputIndexes,
     71         .outputIndexes = outputIndexes,
     72         .operandValues = operandValues,
     73         .pools = pools,
     74     };
     75 }
     76 
     77 
     78 bool is_ignored(int i) {
     79   static std::set<int> ignore = {};
     80   return ignore.find(i) != ignore.end();
     81 }
     82