1 // Generated code. Do not edit
2 // Create the model
createTestModel()3 Model createTestModel() {
4 const std::vector<Operand> operands = {
5 {
6 .type = OperandType::INT32,
7 .dimensions = {},
8 .numberOfConsumers = 1,
9 .scale = 0.0f,
10 .zeroPoint = 0,
11 .lifetime = OperandLifeTime::CONSTANT_COPY,
12 .location = {.poolIndex = 0, .offset = 0, .length = 4},
13 },
14 {
15 .type = OperandType::INT32,
16 .dimensions = {},
17 .numberOfConsumers = 1,
18 .scale = 0.0f,
19 .zeroPoint = 0,
20 .lifetime = OperandLifeTime::CONSTANT_COPY,
21 .location = {.poolIndex = 0, .offset = 4, .length = 4},
22 },
23 {
24 .type = OperandType::INT32,
25 .dimensions = {},
26 .numberOfConsumers = 1,
27 .scale = 0.0f,
28 .zeroPoint = 0,
29 .lifetime = OperandLifeTime::CONSTANT_COPY,
30 .location = {.poolIndex = 0, .offset = 8, .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 = 12, .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 = 16, .length = 4},
49 },
50 {
51 .type = OperandType::TENSOR_FLOAT32,
52 .dimensions = {1, 8, 8, 3},
53 .numberOfConsumers = 1,
54 .scale = 0.0f,
55 .zeroPoint = 0,
56 .lifetime = OperandLifeTime::MODEL_INPUT,
57 .location = {.poolIndex = 0, .offset = 0, .length = 0},
58 },
59 {
60 .type = OperandType::TENSOR_FLOAT32,
61 .dimensions = {1, 8, 8, 3},
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 .type = OperandType::TENSOR_FLOAT32,
70 .dimensions = {1, 1, 1, 3},
71 .numberOfConsumers = 1,
72 .scale = 0.0f,
73 .zeroPoint = 0,
74 .lifetime = OperandLifeTime::CONSTANT_COPY,
75 .location = {.poolIndex = 0, .offset = 20, .length = 12},
76 },
77 {
78 .type = OperandType::TENSOR_FLOAT32,
79 .dimensions = {3},
80 .numberOfConsumers = 1,
81 .scale = 0.0f,
82 .zeroPoint = 0,
83 .lifetime = OperandLifeTime::CONSTANT_COPY,
84 .location = {.poolIndex = 0, .offset = 32, .length = 12},
85 }
86 };
87
88 const std::vector<Operation> operations = {
89 {
90 .type = OperationType::DEPTHWISE_CONV_2D,
91 .inputs = {5, 7, 8, 0, 1, 2, 3, 4},
92 .outputs = {6},
93 }
94 };
95
96 const std::vector<uint32_t> inputIndexes = {5};
97 const std::vector<uint32_t> outputIndexes = {6};
98 std::vector<uint8_t> operandValues = {
99 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 188, 89, 119, 191, 193, 88, 239, 190, 143, 112, 82, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
100 };
101 const std::vector<hidl_memory> pools = {};
102
103 return {
104 .operands = operands,
105 .operations = operations,
106 .inputIndexes = inputIndexes,
107 .outputIndexes = outputIndexes,
108 .operandValues = operandValues,
109 .pools = pools,
110 };
111 }
112
113
is_ignored(int i)114 bool is_ignored(int i) {
115 static std::set<int> ignore = {};
116 return ignore.find(i) != ignore.end();
117 }
118