• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated code. Do not edit
2 // Create the model
createTestModel()3 Model createTestModel() {
4     const std::vector<Operand> operands = {
5         {
6             .type = OperandType::TENSOR_FLOAT32,
7             .dimensions = {1, 3, 3, 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::TENSOR_FLOAT32,
16             .dimensions = {1, 2, 2, 1},
17             .numberOfConsumers = 1,
18             .scale = 0.0f,
19             .zeroPoint = 0,
20             .lifetime = OperandLifeTime::CONSTANT_COPY,
21             .location = {.poolIndex = 0, .offset = 0, .length = 16},
22         },
23         {
24             .type = OperandType::TENSOR_FLOAT32,
25             .dimensions = {1},
26             .numberOfConsumers = 1,
27             .scale = 0.0f,
28             .zeroPoint = 0,
29             .lifetime = OperandLifeTime::CONSTANT_COPY,
30             .location = {.poolIndex = 0, .offset = 16, .length = 4},
31         },
32         {
33             .type = OperandType::INT32,
34             .dimensions = {},
35             .numberOfConsumers = 4,
36             .scale = 0.0f,
37             .zeroPoint = 0,
38             .lifetime = OperandLifeTime::CONSTANT_COPY,
39             .location = {.poolIndex = 0, .offset = 20, .length = 4},
40         },
41         {
42             .type = OperandType::INT32,
43             .dimensions = {},
44             .numberOfConsumers = 1,
45             .scale = 0.0f,
46             .zeroPoint = 0,
47             .lifetime = OperandLifeTime::CONSTANT_COPY,
48             .location = {.poolIndex = 0, .offset = 24, .length = 4},
49         },
50         {
51             .type = OperandType::INT32,
52             .dimensions = {},
53             .numberOfConsumers = 2,
54             .scale = 0.0f,
55             .zeroPoint = 0,
56             .lifetime = OperandLifeTime::CONSTANT_COPY,
57             .location = {.poolIndex = 0, .offset = 28, .length = 4},
58         },
59         {
60             .type = OperandType::TENSOR_FLOAT32,
61             .dimensions = {1, 2, 2, 1},
62             .numberOfConsumers = 0,
63             .scale = 0.0f,
64             .zeroPoint = 0,
65             .lifetime = OperandLifeTime::MODEL_OUTPUT,
66             .location = {.poolIndex = 0, .offset = 0, .length = 0},
67         }
68     };
69 
70     const std::vector<Operation> operations = {
71         {
72             .type = OperationType::CONV_2D,
73             .inputs = {0, 1, 2, 3, 3, 3, 3, 5, 5, 4},
74             .outputs = {6},
75         }
76     };
77 
78     const std::vector<uint32_t> inputIndexes = {0};
79     const std::vector<uint32_t> outputIndexes = {6};
80     std::vector<uint8_t> operandValues = {
81       0, 0, 128, 62, 0, 0, 128, 62, 0, 0, 128, 62, 0, 0, 128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
82     };
83     const std::vector<hidl_memory> pools = {};
84 
85     return {
86         .operands = operands,
87         .operations = operations,
88         .inputIndexes = inputIndexes,
89         .outputIndexes = outputIndexes,
90         .operandValues = operandValues,
91         .pools = pools,
92     };
93 }
94 
is_ignored(int i)95 bool is_ignored(int i) {
96   static std::set<int> ignore = {};
97   return ignore.find(i) != ignore.end();
98 }
99