1 // Generated from squeeze.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;  // NOLINT(google-build-using-namespace)
6 
7 namespace generated_tests::squeeze {
8 
get_test_model()9 const TestModel& get_test_model() {
10     static TestModel model = {
11         .main = {
12                 .operands = {{ // input
13                             .type = TestOperandType::TENSOR_FLOAT32,
14                             .dimensions = {4, 1, 1, 2},
15                             .numberOfConsumers = 1,
16                             .scale = 0.0f,
17                             .zeroPoint = 0,
18                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
19                             .channelQuant = {},
20                             .isIgnored = false,
21                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
22                         }, { // squeezeDims
23                             .type = TestOperandType::TENSOR_INT32,
24                             .dimensions = {2},
25                             .numberOfConsumers = 1,
26                             .scale = 0.0f,
27                             .zeroPoint = 0,
28                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
29                             .channelQuant = {},
30                             .isIgnored = false,
31                             .data = TestBuffer::createFromVector<int32_t>({1, 2})
32                         }, { // output
33                             .type = TestOperandType::TENSOR_FLOAT32,
34                             .dimensions = {4, 2},
35                             .numberOfConsumers = 0,
36                             .scale = 0.0f,
37                             .zeroPoint = 0,
38                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
39                             .channelQuant = {},
40                             .isIgnored = false,
41                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
42                         }},
43                 .operations = {{
44                             .type = TestOperationType::SQUEEZE,
45                             .inputs = {0, 1},
46                             .outputs = {2}
47                         }},
48                 .inputIndexes = {0},
49                 .outputIndexes = {2}
50             },
51         .referenced = {},
52         .isRelaxed = false,
53         .expectedMultinomialDistributionTolerance = 0,
54         .expectFailure = false,
55         .minSupportedVersion = TestHalVersion::V1_1
56     };
57     return model;
58 }
59 
60 const auto dummy_test_model = TestModelManager::get().add("squeeze", get_test_model());
61 
62 }  // namespace generated_tests::squeeze
63 
64 namespace generated_tests::squeeze {
65 
get_test_model_all_inputs_as_internal()66 const TestModel& get_test_model_all_inputs_as_internal() {
67     static TestModel model = {
68         .main = {
69                 .operands = {{ // input
70                             .type = TestOperandType::TENSOR_FLOAT32,
71                             .dimensions = {4, 1, 1, 2},
72                             .numberOfConsumers = 1,
73                             .scale = 0.0f,
74                             .zeroPoint = 0,
75                             .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
76                             .channelQuant = {},
77                             .isIgnored = false,
78                             .data = TestBuffer::createFromVector<float>({})
79                         }, { // squeezeDims
80                             .type = TestOperandType::TENSOR_INT32,
81                             .dimensions = {2},
82                             .numberOfConsumers = 1,
83                             .scale = 0.0f,
84                             .zeroPoint = 0,
85                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
86                             .channelQuant = {},
87                             .isIgnored = false,
88                             .data = TestBuffer::createFromVector<int32_t>({1, 2})
89                         }, { // output
90                             .type = TestOperandType::TENSOR_FLOAT32,
91                             .dimensions = {4, 2},
92                             .numberOfConsumers = 0,
93                             .scale = 0.0f,
94                             .zeroPoint = 0,
95                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
96                             .channelQuant = {},
97                             .isIgnored = false,
98                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
99                         }, { // input_new
100                             .type = TestOperandType::TENSOR_FLOAT32,
101                             .dimensions = {4, 1, 1, 2},
102                             .numberOfConsumers = 1,
103                             .scale = 0.0f,
104                             .zeroPoint = 0,
105                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
106                             .channelQuant = {},
107                             .isIgnored = false,
108                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
109                         }, { // placeholder
110                             .type = TestOperandType::TENSOR_FLOAT32,
111                             .dimensions = {1},
112                             .numberOfConsumers = 1,
113                             .scale = 0.0f,
114                             .zeroPoint = 0,
115                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
116                             .channelQuant = {},
117                             .isIgnored = false,
118                             .data = TestBuffer::createFromVector<float>({0.0f})
119                         }, { // param
120                             .type = TestOperandType::INT32,
121                             .dimensions = {},
122                             .numberOfConsumers = 1,
123                             .scale = 0.0f,
124                             .zeroPoint = 0,
125                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
126                             .channelQuant = {},
127                             .isIgnored = false,
128                             .data = TestBuffer::createFromVector<int32_t>({0})
129                         }},
130                 .operations = {{
131                             .type = TestOperationType::ADD,
132                             .inputs = {3, 4, 5},
133                             .outputs = {0}
134                         }, {
135                             .type = TestOperationType::SQUEEZE,
136                             .inputs = {0, 1},
137                             .outputs = {2}
138                         }},
139                 .inputIndexes = {3},
140                 .outputIndexes = {2}
141             },
142         .referenced = {},
143         .isRelaxed = false,
144         .expectedMultinomialDistributionTolerance = 0,
145         .expectFailure = false,
146         .minSupportedVersion = TestHalVersion::V1_1
147     };
148     return model;
149 }
150 
151 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("squeeze_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
152 
153 }  // namespace generated_tests::squeeze
154 
155 namespace generated_tests::squeeze {
156 
get_test_model_all_tensors_as_inputs()157 const TestModel& get_test_model_all_tensors_as_inputs() {
158     static TestModel model = {
159         .main = {
160                 .operands = {{ // input
161                             .type = TestOperandType::TENSOR_FLOAT32,
162                             .dimensions = {4, 1, 1, 2},
163                             .numberOfConsumers = 1,
164                             .scale = 0.0f,
165                             .zeroPoint = 0,
166                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
167                             .channelQuant = {},
168                             .isIgnored = false,
169                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
170                         }, { // squeezeDims
171                             .type = TestOperandType::TENSOR_INT32,
172                             .dimensions = {2},
173                             .numberOfConsumers = 1,
174                             .scale = 0.0f,
175                             .zeroPoint = 0,
176                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
177                             .channelQuant = {},
178                             .isIgnored = false,
179                             .data = TestBuffer::createFromVector<int32_t>({1, 2})
180                         }, { // output
181                             .type = TestOperandType::TENSOR_FLOAT32,
182                             .dimensions = {4, 2},
183                             .numberOfConsumers = 0,
184                             .scale = 0.0f,
185                             .zeroPoint = 0,
186                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
187                             .channelQuant = {},
188                             .isIgnored = false,
189                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
190                         }},
191                 .operations = {{
192                             .type = TestOperationType::SQUEEZE,
193                             .inputs = {0, 1},
194                             .outputs = {2}
195                         }},
196                 .inputIndexes = {0, 1},
197                 .outputIndexes = {2}
198             },
199         .referenced = {},
200         .isRelaxed = false,
201         .expectedMultinomialDistributionTolerance = 0,
202         .expectFailure = false,
203         .minSupportedVersion = TestHalVersion::V1_1
204     };
205     return model;
206 }
207 
208 const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("squeeze_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs());
209 
210 }  // namespace generated_tests::squeeze
211 
212 namespace generated_tests::squeeze {
213 
get_test_model_all_tensors_as_inputs_all_inputs_as_internal()214 const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() {
215     static TestModel model = {
216         .main = {
217                 .operands = {{ // input
218                             .type = TestOperandType::TENSOR_FLOAT32,
219                             .dimensions = {4, 1, 1, 2},
220                             .numberOfConsumers = 1,
221                             .scale = 0.0f,
222                             .zeroPoint = 0,
223                             .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
224                             .channelQuant = {},
225                             .isIgnored = false,
226                             .data = TestBuffer::createFromVector<float>({})
227                         }, { // squeezeDims
228                             .type = TestOperandType::TENSOR_INT32,
229                             .dimensions = {2},
230                             .numberOfConsumers = 1,
231                             .scale = 0.0f,
232                             .zeroPoint = 0,
233                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
234                             .channelQuant = {},
235                             .isIgnored = false,
236                             .data = TestBuffer::createFromVector<int32_t>({1, 2})
237                         }, { // output
238                             .type = TestOperandType::TENSOR_FLOAT32,
239                             .dimensions = {4, 2},
240                             .numberOfConsumers = 0,
241                             .scale = 0.0f,
242                             .zeroPoint = 0,
243                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
244                             .channelQuant = {},
245                             .isIgnored = false,
246                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
247                         }, { // input_new
248                             .type = TestOperandType::TENSOR_FLOAT32,
249                             .dimensions = {4, 1, 1, 2},
250                             .numberOfConsumers = 1,
251                             .scale = 0.0f,
252                             .zeroPoint = 0,
253                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
254                             .channelQuant = {},
255                             .isIgnored = false,
256                             .data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f})
257                         }, { // placeholder1
258                             .type = TestOperandType::TENSOR_FLOAT32,
259                             .dimensions = {1},
260                             .numberOfConsumers = 1,
261                             .scale = 0.0f,
262                             .zeroPoint = 0,
263                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
264                             .channelQuant = {},
265                             .isIgnored = false,
266                             .data = TestBuffer::createFromVector<float>({0.0f})
267                         }, { // param1
268                             .type = TestOperandType::INT32,
269                             .dimensions = {},
270                             .numberOfConsumers = 1,
271                             .scale = 0.0f,
272                             .zeroPoint = 0,
273                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
274                             .channelQuant = {},
275                             .isIgnored = false,
276                             .data = TestBuffer::createFromVector<int32_t>({0})
277                         }},
278                 .operations = {{
279                             .type = TestOperationType::ADD,
280                             .inputs = {3, 4, 5},
281                             .outputs = {0}
282                         }, {
283                             .type = TestOperationType::SQUEEZE,
284                             .inputs = {0, 1},
285                             .outputs = {2}
286                         }},
287                 .inputIndexes = {1, 3},
288                 .outputIndexes = {2}
289             },
290         .referenced = {},
291         .isRelaxed = false,
292         .expectedMultinomialDistributionTolerance = 0,
293         .expectFailure = false,
294         .minSupportedVersion = TestHalVersion::V1_1
295     };
296     return model;
297 }
298 
299 const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("squeeze_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal());
300 
301 }  // namespace generated_tests::squeeze
302 
303