1 // Generated from reverse.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::reverse {
8
get_test_model_dim1()9 const TestModel& get_test_model_dim1() {
10 static TestModel model = {
11 .main = {
12 .operands = {{ // in
13 .type = TestOperandType::TENSOR_FLOAT32,
14 .dimensions = {3},
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>({6.0f, 7.0f, 8.0f})
22 }, { // param
23 .type = TestOperandType::TENSOR_INT32,
24 .dimensions = {1},
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>({0})
32 }, { // out
33 .type = TestOperandType::TENSOR_FLOAT32,
34 .dimensions = {3},
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>({8.0f, 7.0f, 6.0f})
42 }},
43 .operations = {{
44 .type = TestOperationType::REVERSE,
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::AIDL_V3
56 };
57 return model;
58 }
59
60 const auto dummy_test_model_dim1 = TestModelManager::get().add("reverse_dim1", get_test_model_dim1());
61
62 } // namespace generated_tests::reverse
63
64 namespace generated_tests::reverse {
65
get_test_model_dim1_all_inputs_as_internal()66 const TestModel& get_test_model_dim1_all_inputs_as_internal() {
67 static TestModel model = {
68 .main = {
69 .operands = {{ // in
70 .type = TestOperandType::TENSOR_FLOAT32,
71 .dimensions = {3},
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 }, { // param
80 .type = TestOperandType::TENSOR_INT32,
81 .dimensions = {1},
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>({0})
89 }, { // out
90 .type = TestOperandType::TENSOR_FLOAT32,
91 .dimensions = {3},
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>({8.0f, 7.0f, 6.0f})
99 }, { // in_new
100 .type = TestOperandType::TENSOR_FLOAT32,
101 .dimensions = {3},
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>({6.0f, 7.0f, 8.0f})
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 }, { // param4
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::REVERSE,
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::AIDL_V3
147 };
148 return model;
149 }
150
151 const auto dummy_test_model_dim1_all_inputs_as_internal = TestModelManager::get().add("reverse_dim1_all_inputs_as_internal", get_test_model_dim1_all_inputs_as_internal());
152
153 } // namespace generated_tests::reverse
154
155 namespace generated_tests::reverse {
156
get_test_model_dim1_float16()157 const TestModel& get_test_model_dim1_float16() {
158 static TestModel model = {
159 .main = {
160 .operands = {{ // in
161 .type = TestOperandType::TENSOR_FLOAT16,
162 .dimensions = {3},
163 .numberOfConsumers = 1,
164 .scale = 0.0f,
165 .zeroPoint = 0,
166 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
167 .channelQuant = {},
168 .isIgnored = false,
169 .data = TestBuffer::createFromVector<_Float16>({6.0f, 7.0f, 8.0f})
170 }, { // param
171 .type = TestOperandType::TENSOR_INT32,
172 .dimensions = {1},
173 .numberOfConsumers = 1,
174 .scale = 0.0f,
175 .zeroPoint = 0,
176 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
177 .channelQuant = {},
178 .isIgnored = false,
179 .data = TestBuffer::createFromVector<int32_t>({0})
180 }, { // out
181 .type = TestOperandType::TENSOR_FLOAT16,
182 .dimensions = {3},
183 .numberOfConsumers = 0,
184 .scale = 0.0f,
185 .zeroPoint = 0,
186 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
187 .channelQuant = {},
188 .isIgnored = false,
189 .data = TestBuffer::createFromVector<_Float16>({8.0f, 7.0f, 6.0f})
190 }},
191 .operations = {{
192 .type = TestOperationType::REVERSE,
193 .inputs = {0, 1},
194 .outputs = {2}
195 }},
196 .inputIndexes = {0},
197 .outputIndexes = {2}
198 },
199 .referenced = {},
200 .isRelaxed = false,
201 .expectedMultinomialDistributionTolerance = 0,
202 .expectFailure = false,
203 .minSupportedVersion = TestHalVersion::AIDL_V3
204 };
205 return model;
206 }
207
208 const auto dummy_test_model_dim1_float16 = TestModelManager::get().add("reverse_dim1_float16", get_test_model_dim1_float16());
209
210 } // namespace generated_tests::reverse
211
212 namespace generated_tests::reverse {
213
get_test_model_dim1_float16_all_inputs_as_internal()214 const TestModel& get_test_model_dim1_float16_all_inputs_as_internal() {
215 static TestModel model = {
216 .main = {
217 .operands = {{ // in
218 .type = TestOperandType::TENSOR_FLOAT16,
219 .dimensions = {3},
220 .numberOfConsumers = 1,
221 .scale = 0.0f,
222 .zeroPoint = 0,
223 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
224 .channelQuant = {},
225 .isIgnored = false,
226 .data = TestBuffer::createFromVector<_Float16>({})
227 }, { // param
228 .type = TestOperandType::TENSOR_INT32,
229 .dimensions = {1},
230 .numberOfConsumers = 1,
231 .scale = 0.0f,
232 .zeroPoint = 0,
233 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
234 .channelQuant = {},
235 .isIgnored = false,
236 .data = TestBuffer::createFromVector<int32_t>({0})
237 }, { // out
238 .type = TestOperandType::TENSOR_FLOAT16,
239 .dimensions = {3},
240 .numberOfConsumers = 0,
241 .scale = 0.0f,
242 .zeroPoint = 0,
243 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
244 .channelQuant = {},
245 .isIgnored = false,
246 .data = TestBuffer::createFromVector<_Float16>({8.0f, 7.0f, 6.0f})
247 }, { // in_new
248 .type = TestOperandType::TENSOR_FLOAT16,
249 .dimensions = {3},
250 .numberOfConsumers = 1,
251 .scale = 0.0f,
252 .zeroPoint = 0,
253 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
254 .channelQuant = {},
255 .isIgnored = false,
256 .data = TestBuffer::createFromVector<_Float16>({6.0f, 7.0f, 8.0f})
257 }, { // placeholder1
258 .type = TestOperandType::TENSOR_FLOAT16,
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<_Float16>({0.0f})
267 }, { // param5
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::REVERSE,
284 .inputs = {0, 1},
285 .outputs = {2}
286 }},
287 .inputIndexes = {3},
288 .outputIndexes = {2}
289 },
290 .referenced = {},
291 .isRelaxed = false,
292 .expectedMultinomialDistributionTolerance = 0,
293 .expectFailure = false,
294 .minSupportedVersion = TestHalVersion::AIDL_V3
295 };
296 return model;
297 }
298
299 const auto dummy_test_model_dim1_float16_all_inputs_as_internal = TestModelManager::get().add("reverse_dim1_float16_all_inputs_as_internal", get_test_model_dim1_float16_all_inputs_as_internal());
300
301 } // namespace generated_tests::reverse
302
303 namespace generated_tests::reverse {
304
get_test_model_dim1_quant8_asymm()305 const TestModel& get_test_model_dim1_quant8_asymm() {
306 static TestModel model = {
307 .main = {
308 .operands = {{ // in
309 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
310 .dimensions = {3},
311 .numberOfConsumers = 1,
312 .scale = 0.5f,
313 .zeroPoint = 4,
314 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
315 .channelQuant = {},
316 .isIgnored = false,
317 .data = TestBuffer::createFromVector<uint8_t>({16, 18, 20})
318 }, { // param
319 .type = TestOperandType::TENSOR_INT32,
320 .dimensions = {1},
321 .numberOfConsumers = 1,
322 .scale = 0.0f,
323 .zeroPoint = 0,
324 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
325 .channelQuant = {},
326 .isIgnored = false,
327 .data = TestBuffer::createFromVector<int32_t>({0})
328 }, { // out
329 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
330 .dimensions = {3},
331 .numberOfConsumers = 0,
332 .scale = 0.5f,
333 .zeroPoint = 4,
334 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
335 .channelQuant = {},
336 .isIgnored = false,
337 .data = TestBuffer::createFromVector<uint8_t>({20, 18, 16})
338 }},
339 .operations = {{
340 .type = TestOperationType::REVERSE,
341 .inputs = {0, 1},
342 .outputs = {2}
343 }},
344 .inputIndexes = {0},
345 .outputIndexes = {2}
346 },
347 .referenced = {},
348 .isRelaxed = false,
349 .expectedMultinomialDistributionTolerance = 0,
350 .expectFailure = false,
351 .minSupportedVersion = TestHalVersion::AIDL_V3
352 };
353 return model;
354 }
355
356 const auto dummy_test_model_dim1_quant8_asymm = TestModelManager::get().add("reverse_dim1_quant8_asymm", get_test_model_dim1_quant8_asymm());
357
358 } // namespace generated_tests::reverse
359
360 namespace generated_tests::reverse {
361
get_test_model_dim1_quant8_asymm_all_inputs_as_internal()362 const TestModel& get_test_model_dim1_quant8_asymm_all_inputs_as_internal() {
363 static TestModel model = {
364 .main = {
365 .operands = {{ // in
366 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
367 .dimensions = {3},
368 .numberOfConsumers = 1,
369 .scale = 0.5f,
370 .zeroPoint = 4,
371 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
372 .channelQuant = {},
373 .isIgnored = false,
374 .data = TestBuffer::createFromVector<uint8_t>({})
375 }, { // param
376 .type = TestOperandType::TENSOR_INT32,
377 .dimensions = {1},
378 .numberOfConsumers = 1,
379 .scale = 0.0f,
380 .zeroPoint = 0,
381 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
382 .channelQuant = {},
383 .isIgnored = false,
384 .data = TestBuffer::createFromVector<int32_t>({0})
385 }, { // out
386 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
387 .dimensions = {3},
388 .numberOfConsumers = 0,
389 .scale = 0.5f,
390 .zeroPoint = 4,
391 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
392 .channelQuant = {},
393 .isIgnored = false,
394 .data = TestBuffer::createFromVector<uint8_t>({20, 18, 16})
395 }, { // in_new
396 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
397 .dimensions = {3},
398 .numberOfConsumers = 1,
399 .scale = 0.5f,
400 .zeroPoint = 4,
401 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
402 .channelQuant = {},
403 .isIgnored = false,
404 .data = TestBuffer::createFromVector<uint8_t>({16, 18, 20})
405 }, { // placeholder2
406 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
407 .dimensions = {1},
408 .numberOfConsumers = 1,
409 .scale = 0.5f,
410 .zeroPoint = 4,
411 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
412 .channelQuant = {},
413 .isIgnored = false,
414 .data = TestBuffer::createFromVector<uint8_t>({4})
415 }, { // param6
416 .type = TestOperandType::INT32,
417 .dimensions = {},
418 .numberOfConsumers = 1,
419 .scale = 0.0f,
420 .zeroPoint = 0,
421 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
422 .channelQuant = {},
423 .isIgnored = false,
424 .data = TestBuffer::createFromVector<int32_t>({0})
425 }},
426 .operations = {{
427 .type = TestOperationType::ADD,
428 .inputs = {3, 4, 5},
429 .outputs = {0}
430 }, {
431 .type = TestOperationType::REVERSE,
432 .inputs = {0, 1},
433 .outputs = {2}
434 }},
435 .inputIndexes = {3},
436 .outputIndexes = {2}
437 },
438 .referenced = {},
439 .isRelaxed = false,
440 .expectedMultinomialDistributionTolerance = 0,
441 .expectFailure = false,
442 .minSupportedVersion = TestHalVersion::AIDL_V3
443 };
444 return model;
445 }
446
447 const auto dummy_test_model_dim1_quant8_asymm_all_inputs_as_internal = TestModelManager::get().add("reverse_dim1_quant8_asymm_all_inputs_as_internal", get_test_model_dim1_quant8_asymm_all_inputs_as_internal());
448
449 } // namespace generated_tests::reverse
450
451 namespace generated_tests::reverse {
452
get_test_model_dim1_quant8_asymm_signed()453 const TestModel& get_test_model_dim1_quant8_asymm_signed() {
454 static TestModel model = {
455 .main = {
456 .operands = {{ // in
457 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
458 .dimensions = {3},
459 .numberOfConsumers = 1,
460 .scale = 0.25f,
461 .zeroPoint = -9,
462 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
463 .channelQuant = {},
464 .isIgnored = false,
465 .data = TestBuffer::createFromVector<int8_t>({15, 19, 23})
466 }, { // param
467 .type = TestOperandType::TENSOR_INT32,
468 .dimensions = {1},
469 .numberOfConsumers = 1,
470 .scale = 0.0f,
471 .zeroPoint = 0,
472 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
473 .channelQuant = {},
474 .isIgnored = false,
475 .data = TestBuffer::createFromVector<int32_t>({0})
476 }, { // out
477 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
478 .dimensions = {3},
479 .numberOfConsumers = 0,
480 .scale = 0.25f,
481 .zeroPoint = -9,
482 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
483 .channelQuant = {},
484 .isIgnored = false,
485 .data = TestBuffer::createFromVector<int8_t>({23, 19, 15})
486 }},
487 .operations = {{
488 .type = TestOperationType::REVERSE,
489 .inputs = {0, 1},
490 .outputs = {2}
491 }},
492 .inputIndexes = {0},
493 .outputIndexes = {2}
494 },
495 .referenced = {},
496 .isRelaxed = false,
497 .expectedMultinomialDistributionTolerance = 0,
498 .expectFailure = false,
499 .minSupportedVersion = TestHalVersion::AIDL_V3
500 };
501 return model;
502 }
503
504 const auto dummy_test_model_dim1_quant8_asymm_signed = TestModelManager::get().add("reverse_dim1_quant8_asymm_signed", get_test_model_dim1_quant8_asymm_signed());
505
506 } // namespace generated_tests::reverse
507
508 namespace generated_tests::reverse {
509
get_test_model_dim1_quant8_asymm_signed_all_inputs_as_internal()510 const TestModel& get_test_model_dim1_quant8_asymm_signed_all_inputs_as_internal() {
511 static TestModel model = {
512 .main = {
513 .operands = {{ // in
514 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
515 .dimensions = {3},
516 .numberOfConsumers = 1,
517 .scale = 0.25f,
518 .zeroPoint = -9,
519 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
520 .channelQuant = {},
521 .isIgnored = false,
522 .data = TestBuffer::createFromVector<int8_t>({})
523 }, { // param
524 .type = TestOperandType::TENSOR_INT32,
525 .dimensions = {1},
526 .numberOfConsumers = 1,
527 .scale = 0.0f,
528 .zeroPoint = 0,
529 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
530 .channelQuant = {},
531 .isIgnored = false,
532 .data = TestBuffer::createFromVector<int32_t>({0})
533 }, { // out
534 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
535 .dimensions = {3},
536 .numberOfConsumers = 0,
537 .scale = 0.25f,
538 .zeroPoint = -9,
539 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
540 .channelQuant = {},
541 .isIgnored = false,
542 .data = TestBuffer::createFromVector<int8_t>({23, 19, 15})
543 }, { // in_new
544 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
545 .dimensions = {3},
546 .numberOfConsumers = 1,
547 .scale = 0.25f,
548 .zeroPoint = -9,
549 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
550 .channelQuant = {},
551 .isIgnored = false,
552 .data = TestBuffer::createFromVector<int8_t>({15, 19, 23})
553 }, { // placeholder3
554 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
555 .dimensions = {1},
556 .numberOfConsumers = 1,
557 .scale = 0.25f,
558 .zeroPoint = -9,
559 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
560 .channelQuant = {},
561 .isIgnored = false,
562 .data = TestBuffer::createFromVector<int8_t>({-9})
563 }, { // param7
564 .type = TestOperandType::INT32,
565 .dimensions = {},
566 .numberOfConsumers = 1,
567 .scale = 0.0f,
568 .zeroPoint = 0,
569 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
570 .channelQuant = {},
571 .isIgnored = false,
572 .data = TestBuffer::createFromVector<int32_t>({0})
573 }},
574 .operations = {{
575 .type = TestOperationType::ADD,
576 .inputs = {3, 4, 5},
577 .outputs = {0}
578 }, {
579 .type = TestOperationType::REVERSE,
580 .inputs = {0, 1},
581 .outputs = {2}
582 }},
583 .inputIndexes = {3},
584 .outputIndexes = {2}
585 },
586 .referenced = {},
587 .isRelaxed = false,
588 .expectedMultinomialDistributionTolerance = 0,
589 .expectFailure = false,
590 .minSupportedVersion = TestHalVersion::AIDL_V3
591 };
592 return model;
593 }
594
595 const auto dummy_test_model_dim1_quant8_asymm_signed_all_inputs_as_internal = TestModelManager::get().add("reverse_dim1_quant8_asymm_signed_all_inputs_as_internal", get_test_model_dim1_quant8_asymm_signed_all_inputs_as_internal());
596
597 } // namespace generated_tests::reverse
598
599 namespace generated_tests::reverse {
600
get_test_model_dim1_int32()601 const TestModel& get_test_model_dim1_int32() {
602 static TestModel model = {
603 .main = {
604 .operands = {{ // in
605 .type = TestOperandType::TENSOR_INT32,
606 .dimensions = {3},
607 .numberOfConsumers = 1,
608 .scale = 0.0f,
609 .zeroPoint = 0,
610 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
611 .channelQuant = {},
612 .isIgnored = false,
613 .data = TestBuffer::createFromVector<int32_t>({6, 7, 8})
614 }, { // param
615 .type = TestOperandType::TENSOR_INT32,
616 .dimensions = {1},
617 .numberOfConsumers = 1,
618 .scale = 0.0f,
619 .zeroPoint = 0,
620 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
621 .channelQuant = {},
622 .isIgnored = false,
623 .data = TestBuffer::createFromVector<int32_t>({0})
624 }, { // out
625 .type = TestOperandType::TENSOR_INT32,
626 .dimensions = {3},
627 .numberOfConsumers = 0,
628 .scale = 0.0f,
629 .zeroPoint = 0,
630 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
631 .channelQuant = {},
632 .isIgnored = false,
633 .data = TestBuffer::createFromVector<int32_t>({8, 7, 6})
634 }},
635 .operations = {{
636 .type = TestOperationType::REVERSE,
637 .inputs = {0, 1},
638 .outputs = {2}
639 }},
640 .inputIndexes = {0},
641 .outputIndexes = {2}
642 },
643 .referenced = {},
644 .isRelaxed = false,
645 .expectedMultinomialDistributionTolerance = 0,
646 .expectFailure = false,
647 .minSupportedVersion = TestHalVersion::AIDL_V3
648 };
649 return model;
650 }
651
652 const auto dummy_test_model_dim1_int32 = TestModelManager::get().add("reverse_dim1_int32", get_test_model_dim1_int32());
653
654 } // namespace generated_tests::reverse
655
656 namespace generated_tests::reverse {
657
get_test_model_dim3_axis0()658 const TestModel& get_test_model_dim3_axis0() {
659 static TestModel model = {
660 .main = {
661 .operands = {{ // in1
662 .type = TestOperandType::TENSOR_FLOAT32,
663 .dimensions = {2, 3, 4},
664 .numberOfConsumers = 1,
665 .scale = 0.0f,
666 .zeroPoint = 0,
667 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
668 .channelQuant = {},
669 .isIgnored = false,
670 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
671 }, { // param1
672 .type = TestOperandType::TENSOR_INT32,
673 .dimensions = {1},
674 .numberOfConsumers = 1,
675 .scale = 0.0f,
676 .zeroPoint = 0,
677 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
678 .channelQuant = {},
679 .isIgnored = false,
680 .data = TestBuffer::createFromVector<int32_t>({0})
681 }, { // out1
682 .type = TestOperandType::TENSOR_FLOAT32,
683 .dimensions = {2, 3, 4},
684 .numberOfConsumers = 0,
685 .scale = 0.0f,
686 .zeroPoint = 0,
687 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
688 .channelQuant = {},
689 .isIgnored = false,
690 .data = TestBuffer::createFromVector<float>({12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f})
691 }},
692 .operations = {{
693 .type = TestOperationType::REVERSE,
694 .inputs = {0, 1},
695 .outputs = {2}
696 }},
697 .inputIndexes = {0},
698 .outputIndexes = {2}
699 },
700 .referenced = {},
701 .isRelaxed = false,
702 .expectedMultinomialDistributionTolerance = 0,
703 .expectFailure = false,
704 .minSupportedVersion = TestHalVersion::AIDL_V3
705 };
706 return model;
707 }
708
709 const auto dummy_test_model_dim3_axis0 = TestModelManager::get().add("reverse_dim3_axis0", get_test_model_dim3_axis0());
710
711 } // namespace generated_tests::reverse
712
713 namespace generated_tests::reverse {
714
get_test_model_dim3_axis0_all_inputs_as_internal()715 const TestModel& get_test_model_dim3_axis0_all_inputs_as_internal() {
716 static TestModel model = {
717 .main = {
718 .operands = {{ // in1
719 .type = TestOperandType::TENSOR_FLOAT32,
720 .dimensions = {2, 3, 4},
721 .numberOfConsumers = 1,
722 .scale = 0.0f,
723 .zeroPoint = 0,
724 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
725 .channelQuant = {},
726 .isIgnored = false,
727 .data = TestBuffer::createFromVector<float>({})
728 }, { // param1
729 .type = TestOperandType::TENSOR_INT32,
730 .dimensions = {1},
731 .numberOfConsumers = 1,
732 .scale = 0.0f,
733 .zeroPoint = 0,
734 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
735 .channelQuant = {},
736 .isIgnored = false,
737 .data = TestBuffer::createFromVector<int32_t>({0})
738 }, { // out1
739 .type = TestOperandType::TENSOR_FLOAT32,
740 .dimensions = {2, 3, 4},
741 .numberOfConsumers = 0,
742 .scale = 0.0f,
743 .zeroPoint = 0,
744 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
745 .channelQuant = {},
746 .isIgnored = false,
747 .data = TestBuffer::createFromVector<float>({12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f})
748 }, { // in1_new
749 .type = TestOperandType::TENSOR_FLOAT32,
750 .dimensions = {2, 3, 4},
751 .numberOfConsumers = 1,
752 .scale = 0.0f,
753 .zeroPoint = 0,
754 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
755 .channelQuant = {},
756 .isIgnored = false,
757 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
758 }, { // placeholder4
759 .type = TestOperandType::TENSOR_FLOAT32,
760 .dimensions = {1},
761 .numberOfConsumers = 1,
762 .scale = 0.0f,
763 .zeroPoint = 0,
764 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
765 .channelQuant = {},
766 .isIgnored = false,
767 .data = TestBuffer::createFromVector<float>({0.0f})
768 }, { // param8
769 .type = TestOperandType::INT32,
770 .dimensions = {},
771 .numberOfConsumers = 1,
772 .scale = 0.0f,
773 .zeroPoint = 0,
774 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
775 .channelQuant = {},
776 .isIgnored = false,
777 .data = TestBuffer::createFromVector<int32_t>({0})
778 }},
779 .operations = {{
780 .type = TestOperationType::ADD,
781 .inputs = {3, 4, 5},
782 .outputs = {0}
783 }, {
784 .type = TestOperationType::REVERSE,
785 .inputs = {0, 1},
786 .outputs = {2}
787 }},
788 .inputIndexes = {3},
789 .outputIndexes = {2}
790 },
791 .referenced = {},
792 .isRelaxed = false,
793 .expectedMultinomialDistributionTolerance = 0,
794 .expectFailure = false,
795 .minSupportedVersion = TestHalVersion::AIDL_V3
796 };
797 return model;
798 }
799
800 const auto dummy_test_model_dim3_axis0_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis0_all_inputs_as_internal", get_test_model_dim3_axis0_all_inputs_as_internal());
801
802 } // namespace generated_tests::reverse
803
804 namespace generated_tests::reverse {
805
get_test_model_dim3_axis0_float16()806 const TestModel& get_test_model_dim3_axis0_float16() {
807 static TestModel model = {
808 .main = {
809 .operands = {{ // in1
810 .type = TestOperandType::TENSOR_FLOAT16,
811 .dimensions = {2, 3, 4},
812 .numberOfConsumers = 1,
813 .scale = 0.0f,
814 .zeroPoint = 0,
815 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
816 .channelQuant = {},
817 .isIgnored = false,
818 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
819 }, { // param1
820 .type = TestOperandType::TENSOR_INT32,
821 .dimensions = {1},
822 .numberOfConsumers = 1,
823 .scale = 0.0f,
824 .zeroPoint = 0,
825 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
826 .channelQuant = {},
827 .isIgnored = false,
828 .data = TestBuffer::createFromVector<int32_t>({0})
829 }, { // out1
830 .type = TestOperandType::TENSOR_FLOAT16,
831 .dimensions = {2, 3, 4},
832 .numberOfConsumers = 0,
833 .scale = 0.0f,
834 .zeroPoint = 0,
835 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
836 .channelQuant = {},
837 .isIgnored = false,
838 .data = TestBuffer::createFromVector<_Float16>({12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f})
839 }},
840 .operations = {{
841 .type = TestOperationType::REVERSE,
842 .inputs = {0, 1},
843 .outputs = {2}
844 }},
845 .inputIndexes = {0},
846 .outputIndexes = {2}
847 },
848 .referenced = {},
849 .isRelaxed = false,
850 .expectedMultinomialDistributionTolerance = 0,
851 .expectFailure = false,
852 .minSupportedVersion = TestHalVersion::AIDL_V3
853 };
854 return model;
855 }
856
857 const auto dummy_test_model_dim3_axis0_float16 = TestModelManager::get().add("reverse_dim3_axis0_float16", get_test_model_dim3_axis0_float16());
858
859 } // namespace generated_tests::reverse
860
861 namespace generated_tests::reverse {
862
get_test_model_dim3_axis0_float16_all_inputs_as_internal()863 const TestModel& get_test_model_dim3_axis0_float16_all_inputs_as_internal() {
864 static TestModel model = {
865 .main = {
866 .operands = {{ // in1
867 .type = TestOperandType::TENSOR_FLOAT16,
868 .dimensions = {2, 3, 4},
869 .numberOfConsumers = 1,
870 .scale = 0.0f,
871 .zeroPoint = 0,
872 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
873 .channelQuant = {},
874 .isIgnored = false,
875 .data = TestBuffer::createFromVector<_Float16>({})
876 }, { // param1
877 .type = TestOperandType::TENSOR_INT32,
878 .dimensions = {1},
879 .numberOfConsumers = 1,
880 .scale = 0.0f,
881 .zeroPoint = 0,
882 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
883 .channelQuant = {},
884 .isIgnored = false,
885 .data = TestBuffer::createFromVector<int32_t>({0})
886 }, { // out1
887 .type = TestOperandType::TENSOR_FLOAT16,
888 .dimensions = {2, 3, 4},
889 .numberOfConsumers = 0,
890 .scale = 0.0f,
891 .zeroPoint = 0,
892 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
893 .channelQuant = {},
894 .isIgnored = false,
895 .data = TestBuffer::createFromVector<_Float16>({12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f})
896 }, { // in1_new
897 .type = TestOperandType::TENSOR_FLOAT16,
898 .dimensions = {2, 3, 4},
899 .numberOfConsumers = 1,
900 .scale = 0.0f,
901 .zeroPoint = 0,
902 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
903 .channelQuant = {},
904 .isIgnored = false,
905 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
906 }, { // placeholder5
907 .type = TestOperandType::TENSOR_FLOAT16,
908 .dimensions = {1},
909 .numberOfConsumers = 1,
910 .scale = 0.0f,
911 .zeroPoint = 0,
912 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
913 .channelQuant = {},
914 .isIgnored = false,
915 .data = TestBuffer::createFromVector<_Float16>({0.0f})
916 }, { // param9
917 .type = TestOperandType::INT32,
918 .dimensions = {},
919 .numberOfConsumers = 1,
920 .scale = 0.0f,
921 .zeroPoint = 0,
922 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
923 .channelQuant = {},
924 .isIgnored = false,
925 .data = TestBuffer::createFromVector<int32_t>({0})
926 }},
927 .operations = {{
928 .type = TestOperationType::ADD,
929 .inputs = {3, 4, 5},
930 .outputs = {0}
931 }, {
932 .type = TestOperationType::REVERSE,
933 .inputs = {0, 1},
934 .outputs = {2}
935 }},
936 .inputIndexes = {3},
937 .outputIndexes = {2}
938 },
939 .referenced = {},
940 .isRelaxed = false,
941 .expectedMultinomialDistributionTolerance = 0,
942 .expectFailure = false,
943 .minSupportedVersion = TestHalVersion::AIDL_V3
944 };
945 return model;
946 }
947
948 const auto dummy_test_model_dim3_axis0_float16_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis0_float16_all_inputs_as_internal", get_test_model_dim3_axis0_float16_all_inputs_as_internal());
949
950 } // namespace generated_tests::reverse
951
952 namespace generated_tests::reverse {
953
get_test_model_dim3_axis0_quant8_asymm()954 const TestModel& get_test_model_dim3_axis0_quant8_asymm() {
955 static TestModel model = {
956 .main = {
957 .operands = {{ // in1
958 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
959 .dimensions = {2, 3, 4},
960 .numberOfConsumers = 1,
961 .scale = 0.5f,
962 .zeroPoint = 4,
963 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
964 .channelQuant = {},
965 .isIgnored = false,
966 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
967 }, { // param1
968 .type = TestOperandType::TENSOR_INT32,
969 .dimensions = {1},
970 .numberOfConsumers = 1,
971 .scale = 0.0f,
972 .zeroPoint = 0,
973 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
974 .channelQuant = {},
975 .isIgnored = false,
976 .data = TestBuffer::createFromVector<int32_t>({0})
977 }, { // out1
978 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
979 .dimensions = {2, 3, 4},
980 .numberOfConsumers = 0,
981 .scale = 0.5f,
982 .zeroPoint = 4,
983 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
984 .channelQuant = {},
985 .isIgnored = false,
986 .data = TestBuffer::createFromVector<uint8_t>({28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26})
987 }},
988 .operations = {{
989 .type = TestOperationType::REVERSE,
990 .inputs = {0, 1},
991 .outputs = {2}
992 }},
993 .inputIndexes = {0},
994 .outputIndexes = {2}
995 },
996 .referenced = {},
997 .isRelaxed = false,
998 .expectedMultinomialDistributionTolerance = 0,
999 .expectFailure = false,
1000 .minSupportedVersion = TestHalVersion::AIDL_V3
1001 };
1002 return model;
1003 }
1004
1005 const auto dummy_test_model_dim3_axis0_quant8_asymm = TestModelManager::get().add("reverse_dim3_axis0_quant8_asymm", get_test_model_dim3_axis0_quant8_asymm());
1006
1007 } // namespace generated_tests::reverse
1008
1009 namespace generated_tests::reverse {
1010
get_test_model_dim3_axis0_quant8_asymm_all_inputs_as_internal()1011 const TestModel& get_test_model_dim3_axis0_quant8_asymm_all_inputs_as_internal() {
1012 static TestModel model = {
1013 .main = {
1014 .operands = {{ // in1
1015 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1016 .dimensions = {2, 3, 4},
1017 .numberOfConsumers = 1,
1018 .scale = 0.5f,
1019 .zeroPoint = 4,
1020 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1021 .channelQuant = {},
1022 .isIgnored = false,
1023 .data = TestBuffer::createFromVector<uint8_t>({})
1024 }, { // param1
1025 .type = TestOperandType::TENSOR_INT32,
1026 .dimensions = {1},
1027 .numberOfConsumers = 1,
1028 .scale = 0.0f,
1029 .zeroPoint = 0,
1030 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1031 .channelQuant = {},
1032 .isIgnored = false,
1033 .data = TestBuffer::createFromVector<int32_t>({0})
1034 }, { // out1
1035 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1036 .dimensions = {2, 3, 4},
1037 .numberOfConsumers = 0,
1038 .scale = 0.5f,
1039 .zeroPoint = 4,
1040 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1041 .channelQuant = {},
1042 .isIgnored = false,
1043 .data = TestBuffer::createFromVector<uint8_t>({28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26})
1044 }, { // in1_new
1045 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1046 .dimensions = {2, 3, 4},
1047 .numberOfConsumers = 1,
1048 .scale = 0.5f,
1049 .zeroPoint = 4,
1050 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1051 .channelQuant = {},
1052 .isIgnored = false,
1053 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
1054 }, { // placeholder6
1055 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1056 .dimensions = {1},
1057 .numberOfConsumers = 1,
1058 .scale = 0.5f,
1059 .zeroPoint = 4,
1060 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1061 .channelQuant = {},
1062 .isIgnored = false,
1063 .data = TestBuffer::createFromVector<uint8_t>({4})
1064 }, { // param10
1065 .type = TestOperandType::INT32,
1066 .dimensions = {},
1067 .numberOfConsumers = 1,
1068 .scale = 0.0f,
1069 .zeroPoint = 0,
1070 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1071 .channelQuant = {},
1072 .isIgnored = false,
1073 .data = TestBuffer::createFromVector<int32_t>({0})
1074 }},
1075 .operations = {{
1076 .type = TestOperationType::ADD,
1077 .inputs = {3, 4, 5},
1078 .outputs = {0}
1079 }, {
1080 .type = TestOperationType::REVERSE,
1081 .inputs = {0, 1},
1082 .outputs = {2}
1083 }},
1084 .inputIndexes = {3},
1085 .outputIndexes = {2}
1086 },
1087 .referenced = {},
1088 .isRelaxed = false,
1089 .expectedMultinomialDistributionTolerance = 0,
1090 .expectFailure = false,
1091 .minSupportedVersion = TestHalVersion::AIDL_V3
1092 };
1093 return model;
1094 }
1095
1096 const auto dummy_test_model_dim3_axis0_quant8_asymm_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis0_quant8_asymm_all_inputs_as_internal", get_test_model_dim3_axis0_quant8_asymm_all_inputs_as_internal());
1097
1098 } // namespace generated_tests::reverse
1099
1100 namespace generated_tests::reverse {
1101
get_test_model_dim3_axis0_quant8_asymm_signed()1102 const TestModel& get_test_model_dim3_axis0_quant8_asymm_signed() {
1103 static TestModel model = {
1104 .main = {
1105 .operands = {{ // in1
1106 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1107 .dimensions = {2, 3, 4},
1108 .numberOfConsumers = 1,
1109 .scale = 0.25f,
1110 .zeroPoint = -9,
1111 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1112 .channelQuant = {},
1113 .isIgnored = false,
1114 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
1115 }, { // param1
1116 .type = TestOperandType::TENSOR_INT32,
1117 .dimensions = {1},
1118 .numberOfConsumers = 1,
1119 .scale = 0.0f,
1120 .zeroPoint = 0,
1121 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1122 .channelQuant = {},
1123 .isIgnored = false,
1124 .data = TestBuffer::createFromVector<int32_t>({0})
1125 }, { // out1
1126 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1127 .dimensions = {2, 3, 4},
1128 .numberOfConsumers = 0,
1129 .scale = 0.25f,
1130 .zeroPoint = -9,
1131 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1132 .channelQuant = {},
1133 .isIgnored = false,
1134 .data = TestBuffer::createFromVector<int8_t>({39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, -9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35})
1135 }},
1136 .operations = {{
1137 .type = TestOperationType::REVERSE,
1138 .inputs = {0, 1},
1139 .outputs = {2}
1140 }},
1141 .inputIndexes = {0},
1142 .outputIndexes = {2}
1143 },
1144 .referenced = {},
1145 .isRelaxed = false,
1146 .expectedMultinomialDistributionTolerance = 0,
1147 .expectFailure = false,
1148 .minSupportedVersion = TestHalVersion::AIDL_V3
1149 };
1150 return model;
1151 }
1152
1153 const auto dummy_test_model_dim3_axis0_quant8_asymm_signed = TestModelManager::get().add("reverse_dim3_axis0_quant8_asymm_signed", get_test_model_dim3_axis0_quant8_asymm_signed());
1154
1155 } // namespace generated_tests::reverse
1156
1157 namespace generated_tests::reverse {
1158
get_test_model_dim3_axis0_quant8_asymm_signed_all_inputs_as_internal()1159 const TestModel& get_test_model_dim3_axis0_quant8_asymm_signed_all_inputs_as_internal() {
1160 static TestModel model = {
1161 .main = {
1162 .operands = {{ // in1
1163 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1164 .dimensions = {2, 3, 4},
1165 .numberOfConsumers = 1,
1166 .scale = 0.25f,
1167 .zeroPoint = -9,
1168 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1169 .channelQuant = {},
1170 .isIgnored = false,
1171 .data = TestBuffer::createFromVector<int8_t>({})
1172 }, { // param1
1173 .type = TestOperandType::TENSOR_INT32,
1174 .dimensions = {1},
1175 .numberOfConsumers = 1,
1176 .scale = 0.0f,
1177 .zeroPoint = 0,
1178 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1179 .channelQuant = {},
1180 .isIgnored = false,
1181 .data = TestBuffer::createFromVector<int32_t>({0})
1182 }, { // out1
1183 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1184 .dimensions = {2, 3, 4},
1185 .numberOfConsumers = 0,
1186 .scale = 0.25f,
1187 .zeroPoint = -9,
1188 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1189 .channelQuant = {},
1190 .isIgnored = false,
1191 .data = TestBuffer::createFromVector<int8_t>({39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, -9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35})
1192 }, { // in1_new
1193 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1194 .dimensions = {2, 3, 4},
1195 .numberOfConsumers = 1,
1196 .scale = 0.25f,
1197 .zeroPoint = -9,
1198 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1199 .channelQuant = {},
1200 .isIgnored = false,
1201 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
1202 }, { // placeholder7
1203 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1204 .dimensions = {1},
1205 .numberOfConsumers = 1,
1206 .scale = 0.25f,
1207 .zeroPoint = -9,
1208 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1209 .channelQuant = {},
1210 .isIgnored = false,
1211 .data = TestBuffer::createFromVector<int8_t>({-9})
1212 }, { // param11
1213 .type = TestOperandType::INT32,
1214 .dimensions = {},
1215 .numberOfConsumers = 1,
1216 .scale = 0.0f,
1217 .zeroPoint = 0,
1218 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1219 .channelQuant = {},
1220 .isIgnored = false,
1221 .data = TestBuffer::createFromVector<int32_t>({0})
1222 }},
1223 .operations = {{
1224 .type = TestOperationType::ADD,
1225 .inputs = {3, 4, 5},
1226 .outputs = {0}
1227 }, {
1228 .type = TestOperationType::REVERSE,
1229 .inputs = {0, 1},
1230 .outputs = {2}
1231 }},
1232 .inputIndexes = {3},
1233 .outputIndexes = {2}
1234 },
1235 .referenced = {},
1236 .isRelaxed = false,
1237 .expectedMultinomialDistributionTolerance = 0,
1238 .expectFailure = false,
1239 .minSupportedVersion = TestHalVersion::AIDL_V3
1240 };
1241 return model;
1242 }
1243
1244 const auto dummy_test_model_dim3_axis0_quant8_asymm_signed_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis0_quant8_asymm_signed_all_inputs_as_internal", get_test_model_dim3_axis0_quant8_asymm_signed_all_inputs_as_internal());
1245
1246 } // namespace generated_tests::reverse
1247
1248 namespace generated_tests::reverse {
1249
get_test_model_dim3_axis0_int32()1250 const TestModel& get_test_model_dim3_axis0_int32() {
1251 static TestModel model = {
1252 .main = {
1253 .operands = {{ // in1
1254 .type = TestOperandType::TENSOR_INT32,
1255 .dimensions = {2, 3, 4},
1256 .numberOfConsumers = 1,
1257 .scale = 0.0f,
1258 .zeroPoint = 0,
1259 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1260 .channelQuant = {},
1261 .isIgnored = false,
1262 .data = TestBuffer::createFromVector<int32_t>({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23})
1263 }, { // param1
1264 .type = TestOperandType::TENSOR_INT32,
1265 .dimensions = {1},
1266 .numberOfConsumers = 1,
1267 .scale = 0.0f,
1268 .zeroPoint = 0,
1269 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1270 .channelQuant = {},
1271 .isIgnored = false,
1272 .data = TestBuffer::createFromVector<int32_t>({0})
1273 }, { // out1
1274 .type = TestOperandType::TENSOR_INT32,
1275 .dimensions = {2, 3, 4},
1276 .numberOfConsumers = 0,
1277 .scale = 0.0f,
1278 .zeroPoint = 0,
1279 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1280 .channelQuant = {},
1281 .isIgnored = false,
1282 .data = TestBuffer::createFromVector<int32_t>({12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11})
1283 }},
1284 .operations = {{
1285 .type = TestOperationType::REVERSE,
1286 .inputs = {0, 1},
1287 .outputs = {2}
1288 }},
1289 .inputIndexes = {0},
1290 .outputIndexes = {2}
1291 },
1292 .referenced = {},
1293 .isRelaxed = false,
1294 .expectedMultinomialDistributionTolerance = 0,
1295 .expectFailure = false,
1296 .minSupportedVersion = TestHalVersion::AIDL_V3
1297 };
1298 return model;
1299 }
1300
1301 const auto dummy_test_model_dim3_axis0_int32 = TestModelManager::get().add("reverse_dim3_axis0_int32", get_test_model_dim3_axis0_int32());
1302
1303 } // namespace generated_tests::reverse
1304
1305 namespace generated_tests::reverse {
1306
get_test_model_dim3_axis1()1307 const TestModel& get_test_model_dim3_axis1() {
1308 static TestModel model = {
1309 .main = {
1310 .operands = {{ // in2
1311 .type = TestOperandType::TENSOR_FLOAT32,
1312 .dimensions = {2, 3, 4},
1313 .numberOfConsumers = 1,
1314 .scale = 0.0f,
1315 .zeroPoint = 0,
1316 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1317 .channelQuant = {},
1318 .isIgnored = false,
1319 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
1320 }, { // param2
1321 .type = TestOperandType::TENSOR_INT32,
1322 .dimensions = {1},
1323 .numberOfConsumers = 1,
1324 .scale = 0.0f,
1325 .zeroPoint = 0,
1326 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1327 .channelQuant = {},
1328 .isIgnored = false,
1329 .data = TestBuffer::createFromVector<int32_t>({1})
1330 }, { // out2
1331 .type = TestOperandType::TENSOR_FLOAT32,
1332 .dimensions = {2, 3, 4},
1333 .numberOfConsumers = 0,
1334 .scale = 0.0f,
1335 .zeroPoint = 0,
1336 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1337 .channelQuant = {},
1338 .isIgnored = false,
1339 .data = TestBuffer::createFromVector<float>({8.0f, 9.0f, 10.0f, 11.0f, 4.0f, 5.0f, 6.0f, 7.0f, 0.0f, 1.0f, 2.0f, 3.0f, 20.0f, 21.0f, 22.0f, 23.0f, 16.0f, 17.0f, 18.0f, 19.0f, 12.0f, 13.0f, 14.0f, 15.0f})
1340 }},
1341 .operations = {{
1342 .type = TestOperationType::REVERSE,
1343 .inputs = {0, 1},
1344 .outputs = {2}
1345 }},
1346 .inputIndexes = {0},
1347 .outputIndexes = {2}
1348 },
1349 .referenced = {},
1350 .isRelaxed = false,
1351 .expectedMultinomialDistributionTolerance = 0,
1352 .expectFailure = false,
1353 .minSupportedVersion = TestHalVersion::AIDL_V3
1354 };
1355 return model;
1356 }
1357
1358 const auto dummy_test_model_dim3_axis1 = TestModelManager::get().add("reverse_dim3_axis1", get_test_model_dim3_axis1());
1359
1360 } // namespace generated_tests::reverse
1361
1362 namespace generated_tests::reverse {
1363
get_test_model_dim3_axis1_all_inputs_as_internal()1364 const TestModel& get_test_model_dim3_axis1_all_inputs_as_internal() {
1365 static TestModel model = {
1366 .main = {
1367 .operands = {{ // in2
1368 .type = TestOperandType::TENSOR_FLOAT32,
1369 .dimensions = {2, 3, 4},
1370 .numberOfConsumers = 1,
1371 .scale = 0.0f,
1372 .zeroPoint = 0,
1373 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1374 .channelQuant = {},
1375 .isIgnored = false,
1376 .data = TestBuffer::createFromVector<float>({})
1377 }, { // param2
1378 .type = TestOperandType::TENSOR_INT32,
1379 .dimensions = {1},
1380 .numberOfConsumers = 1,
1381 .scale = 0.0f,
1382 .zeroPoint = 0,
1383 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1384 .channelQuant = {},
1385 .isIgnored = false,
1386 .data = TestBuffer::createFromVector<int32_t>({1})
1387 }, { // out2
1388 .type = TestOperandType::TENSOR_FLOAT32,
1389 .dimensions = {2, 3, 4},
1390 .numberOfConsumers = 0,
1391 .scale = 0.0f,
1392 .zeroPoint = 0,
1393 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1394 .channelQuant = {},
1395 .isIgnored = false,
1396 .data = TestBuffer::createFromVector<float>({8.0f, 9.0f, 10.0f, 11.0f, 4.0f, 5.0f, 6.0f, 7.0f, 0.0f, 1.0f, 2.0f, 3.0f, 20.0f, 21.0f, 22.0f, 23.0f, 16.0f, 17.0f, 18.0f, 19.0f, 12.0f, 13.0f, 14.0f, 15.0f})
1397 }, { // in2_new
1398 .type = TestOperandType::TENSOR_FLOAT32,
1399 .dimensions = {2, 3, 4},
1400 .numberOfConsumers = 1,
1401 .scale = 0.0f,
1402 .zeroPoint = 0,
1403 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1404 .channelQuant = {},
1405 .isIgnored = false,
1406 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
1407 }, { // placeholder8
1408 .type = TestOperandType::TENSOR_FLOAT32,
1409 .dimensions = {1},
1410 .numberOfConsumers = 1,
1411 .scale = 0.0f,
1412 .zeroPoint = 0,
1413 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1414 .channelQuant = {},
1415 .isIgnored = false,
1416 .data = TestBuffer::createFromVector<float>({0.0f})
1417 }, { // param12
1418 .type = TestOperandType::INT32,
1419 .dimensions = {},
1420 .numberOfConsumers = 1,
1421 .scale = 0.0f,
1422 .zeroPoint = 0,
1423 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1424 .channelQuant = {},
1425 .isIgnored = false,
1426 .data = TestBuffer::createFromVector<int32_t>({0})
1427 }},
1428 .operations = {{
1429 .type = TestOperationType::ADD,
1430 .inputs = {3, 4, 5},
1431 .outputs = {0}
1432 }, {
1433 .type = TestOperationType::REVERSE,
1434 .inputs = {0, 1},
1435 .outputs = {2}
1436 }},
1437 .inputIndexes = {3},
1438 .outputIndexes = {2}
1439 },
1440 .referenced = {},
1441 .isRelaxed = false,
1442 .expectedMultinomialDistributionTolerance = 0,
1443 .expectFailure = false,
1444 .minSupportedVersion = TestHalVersion::AIDL_V3
1445 };
1446 return model;
1447 }
1448
1449 const auto dummy_test_model_dim3_axis1_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis1_all_inputs_as_internal", get_test_model_dim3_axis1_all_inputs_as_internal());
1450
1451 } // namespace generated_tests::reverse
1452
1453 namespace generated_tests::reverse {
1454
get_test_model_dim3_axis1_float16()1455 const TestModel& get_test_model_dim3_axis1_float16() {
1456 static TestModel model = {
1457 .main = {
1458 .operands = {{ // in2
1459 .type = TestOperandType::TENSOR_FLOAT16,
1460 .dimensions = {2, 3, 4},
1461 .numberOfConsumers = 1,
1462 .scale = 0.0f,
1463 .zeroPoint = 0,
1464 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1465 .channelQuant = {},
1466 .isIgnored = false,
1467 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
1468 }, { // param2
1469 .type = TestOperandType::TENSOR_INT32,
1470 .dimensions = {1},
1471 .numberOfConsumers = 1,
1472 .scale = 0.0f,
1473 .zeroPoint = 0,
1474 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1475 .channelQuant = {},
1476 .isIgnored = false,
1477 .data = TestBuffer::createFromVector<int32_t>({1})
1478 }, { // out2
1479 .type = TestOperandType::TENSOR_FLOAT16,
1480 .dimensions = {2, 3, 4},
1481 .numberOfConsumers = 0,
1482 .scale = 0.0f,
1483 .zeroPoint = 0,
1484 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1485 .channelQuant = {},
1486 .isIgnored = false,
1487 .data = TestBuffer::createFromVector<_Float16>({8.0f, 9.0f, 10.0f, 11.0f, 4.0f, 5.0f, 6.0f, 7.0f, 0.0f, 1.0f, 2.0f, 3.0f, 20.0f, 21.0f, 22.0f, 23.0f, 16.0f, 17.0f, 18.0f, 19.0f, 12.0f, 13.0f, 14.0f, 15.0f})
1488 }},
1489 .operations = {{
1490 .type = TestOperationType::REVERSE,
1491 .inputs = {0, 1},
1492 .outputs = {2}
1493 }},
1494 .inputIndexes = {0},
1495 .outputIndexes = {2}
1496 },
1497 .referenced = {},
1498 .isRelaxed = false,
1499 .expectedMultinomialDistributionTolerance = 0,
1500 .expectFailure = false,
1501 .minSupportedVersion = TestHalVersion::AIDL_V3
1502 };
1503 return model;
1504 }
1505
1506 const auto dummy_test_model_dim3_axis1_float16 = TestModelManager::get().add("reverse_dim3_axis1_float16", get_test_model_dim3_axis1_float16());
1507
1508 } // namespace generated_tests::reverse
1509
1510 namespace generated_tests::reverse {
1511
get_test_model_dim3_axis1_float16_all_inputs_as_internal()1512 const TestModel& get_test_model_dim3_axis1_float16_all_inputs_as_internal() {
1513 static TestModel model = {
1514 .main = {
1515 .operands = {{ // in2
1516 .type = TestOperandType::TENSOR_FLOAT16,
1517 .dimensions = {2, 3, 4},
1518 .numberOfConsumers = 1,
1519 .scale = 0.0f,
1520 .zeroPoint = 0,
1521 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1522 .channelQuant = {},
1523 .isIgnored = false,
1524 .data = TestBuffer::createFromVector<_Float16>({})
1525 }, { // param2
1526 .type = TestOperandType::TENSOR_INT32,
1527 .dimensions = {1},
1528 .numberOfConsumers = 1,
1529 .scale = 0.0f,
1530 .zeroPoint = 0,
1531 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1532 .channelQuant = {},
1533 .isIgnored = false,
1534 .data = TestBuffer::createFromVector<int32_t>({1})
1535 }, { // out2
1536 .type = TestOperandType::TENSOR_FLOAT16,
1537 .dimensions = {2, 3, 4},
1538 .numberOfConsumers = 0,
1539 .scale = 0.0f,
1540 .zeroPoint = 0,
1541 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1542 .channelQuant = {},
1543 .isIgnored = false,
1544 .data = TestBuffer::createFromVector<_Float16>({8.0f, 9.0f, 10.0f, 11.0f, 4.0f, 5.0f, 6.0f, 7.0f, 0.0f, 1.0f, 2.0f, 3.0f, 20.0f, 21.0f, 22.0f, 23.0f, 16.0f, 17.0f, 18.0f, 19.0f, 12.0f, 13.0f, 14.0f, 15.0f})
1545 }, { // in2_new
1546 .type = TestOperandType::TENSOR_FLOAT16,
1547 .dimensions = {2, 3, 4},
1548 .numberOfConsumers = 1,
1549 .scale = 0.0f,
1550 .zeroPoint = 0,
1551 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1552 .channelQuant = {},
1553 .isIgnored = false,
1554 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
1555 }, { // placeholder9
1556 .type = TestOperandType::TENSOR_FLOAT16,
1557 .dimensions = {1},
1558 .numberOfConsumers = 1,
1559 .scale = 0.0f,
1560 .zeroPoint = 0,
1561 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1562 .channelQuant = {},
1563 .isIgnored = false,
1564 .data = TestBuffer::createFromVector<_Float16>({0.0f})
1565 }, { // param13
1566 .type = TestOperandType::INT32,
1567 .dimensions = {},
1568 .numberOfConsumers = 1,
1569 .scale = 0.0f,
1570 .zeroPoint = 0,
1571 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1572 .channelQuant = {},
1573 .isIgnored = false,
1574 .data = TestBuffer::createFromVector<int32_t>({0})
1575 }},
1576 .operations = {{
1577 .type = TestOperationType::ADD,
1578 .inputs = {3, 4, 5},
1579 .outputs = {0}
1580 }, {
1581 .type = TestOperationType::REVERSE,
1582 .inputs = {0, 1},
1583 .outputs = {2}
1584 }},
1585 .inputIndexes = {3},
1586 .outputIndexes = {2}
1587 },
1588 .referenced = {},
1589 .isRelaxed = false,
1590 .expectedMultinomialDistributionTolerance = 0,
1591 .expectFailure = false,
1592 .minSupportedVersion = TestHalVersion::AIDL_V3
1593 };
1594 return model;
1595 }
1596
1597 const auto dummy_test_model_dim3_axis1_float16_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis1_float16_all_inputs_as_internal", get_test_model_dim3_axis1_float16_all_inputs_as_internal());
1598
1599 } // namespace generated_tests::reverse
1600
1601 namespace generated_tests::reverse {
1602
get_test_model_dim3_axis1_quant8_asymm()1603 const TestModel& get_test_model_dim3_axis1_quant8_asymm() {
1604 static TestModel model = {
1605 .main = {
1606 .operands = {{ // in2
1607 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1608 .dimensions = {2, 3, 4},
1609 .numberOfConsumers = 1,
1610 .scale = 0.5f,
1611 .zeroPoint = 4,
1612 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1613 .channelQuant = {},
1614 .isIgnored = false,
1615 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
1616 }, { // param2
1617 .type = TestOperandType::TENSOR_INT32,
1618 .dimensions = {1},
1619 .numberOfConsumers = 1,
1620 .scale = 0.0f,
1621 .zeroPoint = 0,
1622 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1623 .channelQuant = {},
1624 .isIgnored = false,
1625 .data = TestBuffer::createFromVector<int32_t>({1})
1626 }, { // out2
1627 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1628 .dimensions = {2, 3, 4},
1629 .numberOfConsumers = 0,
1630 .scale = 0.5f,
1631 .zeroPoint = 4,
1632 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1633 .channelQuant = {},
1634 .isIgnored = false,
1635 .data = TestBuffer::createFromVector<uint8_t>({20, 22, 24, 26, 12, 14, 16, 18, 4, 6, 8, 10, 44, 46, 48, 50, 36, 38, 40, 42, 28, 30, 32, 34})
1636 }},
1637 .operations = {{
1638 .type = TestOperationType::REVERSE,
1639 .inputs = {0, 1},
1640 .outputs = {2}
1641 }},
1642 .inputIndexes = {0},
1643 .outputIndexes = {2}
1644 },
1645 .referenced = {},
1646 .isRelaxed = false,
1647 .expectedMultinomialDistributionTolerance = 0,
1648 .expectFailure = false,
1649 .minSupportedVersion = TestHalVersion::AIDL_V3
1650 };
1651 return model;
1652 }
1653
1654 const auto dummy_test_model_dim3_axis1_quant8_asymm = TestModelManager::get().add("reverse_dim3_axis1_quant8_asymm", get_test_model_dim3_axis1_quant8_asymm());
1655
1656 } // namespace generated_tests::reverse
1657
1658 namespace generated_tests::reverse {
1659
get_test_model_dim3_axis1_quant8_asymm_all_inputs_as_internal()1660 const TestModel& get_test_model_dim3_axis1_quant8_asymm_all_inputs_as_internal() {
1661 static TestModel model = {
1662 .main = {
1663 .operands = {{ // in2
1664 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1665 .dimensions = {2, 3, 4},
1666 .numberOfConsumers = 1,
1667 .scale = 0.5f,
1668 .zeroPoint = 4,
1669 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1670 .channelQuant = {},
1671 .isIgnored = false,
1672 .data = TestBuffer::createFromVector<uint8_t>({})
1673 }, { // param2
1674 .type = TestOperandType::TENSOR_INT32,
1675 .dimensions = {1},
1676 .numberOfConsumers = 1,
1677 .scale = 0.0f,
1678 .zeroPoint = 0,
1679 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1680 .channelQuant = {},
1681 .isIgnored = false,
1682 .data = TestBuffer::createFromVector<int32_t>({1})
1683 }, { // out2
1684 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1685 .dimensions = {2, 3, 4},
1686 .numberOfConsumers = 0,
1687 .scale = 0.5f,
1688 .zeroPoint = 4,
1689 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1690 .channelQuant = {},
1691 .isIgnored = false,
1692 .data = TestBuffer::createFromVector<uint8_t>({20, 22, 24, 26, 12, 14, 16, 18, 4, 6, 8, 10, 44, 46, 48, 50, 36, 38, 40, 42, 28, 30, 32, 34})
1693 }, { // in2_new
1694 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1695 .dimensions = {2, 3, 4},
1696 .numberOfConsumers = 1,
1697 .scale = 0.5f,
1698 .zeroPoint = 4,
1699 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1700 .channelQuant = {},
1701 .isIgnored = false,
1702 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
1703 }, { // placeholder10
1704 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1705 .dimensions = {1},
1706 .numberOfConsumers = 1,
1707 .scale = 0.5f,
1708 .zeroPoint = 4,
1709 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1710 .channelQuant = {},
1711 .isIgnored = false,
1712 .data = TestBuffer::createFromVector<uint8_t>({4})
1713 }, { // param14
1714 .type = TestOperandType::INT32,
1715 .dimensions = {},
1716 .numberOfConsumers = 1,
1717 .scale = 0.0f,
1718 .zeroPoint = 0,
1719 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1720 .channelQuant = {},
1721 .isIgnored = false,
1722 .data = TestBuffer::createFromVector<int32_t>({0})
1723 }},
1724 .operations = {{
1725 .type = TestOperationType::ADD,
1726 .inputs = {3, 4, 5},
1727 .outputs = {0}
1728 }, {
1729 .type = TestOperationType::REVERSE,
1730 .inputs = {0, 1},
1731 .outputs = {2}
1732 }},
1733 .inputIndexes = {3},
1734 .outputIndexes = {2}
1735 },
1736 .referenced = {},
1737 .isRelaxed = false,
1738 .expectedMultinomialDistributionTolerance = 0,
1739 .expectFailure = false,
1740 .minSupportedVersion = TestHalVersion::AIDL_V3
1741 };
1742 return model;
1743 }
1744
1745 const auto dummy_test_model_dim3_axis1_quant8_asymm_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis1_quant8_asymm_all_inputs_as_internal", get_test_model_dim3_axis1_quant8_asymm_all_inputs_as_internal());
1746
1747 } // namespace generated_tests::reverse
1748
1749 namespace generated_tests::reverse {
1750
get_test_model_dim3_axis1_quant8_asymm_signed()1751 const TestModel& get_test_model_dim3_axis1_quant8_asymm_signed() {
1752 static TestModel model = {
1753 .main = {
1754 .operands = {{ // in2
1755 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1756 .dimensions = {2, 3, 4},
1757 .numberOfConsumers = 1,
1758 .scale = 0.25f,
1759 .zeroPoint = -9,
1760 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1761 .channelQuant = {},
1762 .isIgnored = false,
1763 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
1764 }, { // param2
1765 .type = TestOperandType::TENSOR_INT32,
1766 .dimensions = {1},
1767 .numberOfConsumers = 1,
1768 .scale = 0.0f,
1769 .zeroPoint = 0,
1770 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1771 .channelQuant = {},
1772 .isIgnored = false,
1773 .data = TestBuffer::createFromVector<int32_t>({1})
1774 }, { // out2
1775 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1776 .dimensions = {2, 3, 4},
1777 .numberOfConsumers = 0,
1778 .scale = 0.25f,
1779 .zeroPoint = -9,
1780 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1781 .channelQuant = {},
1782 .isIgnored = false,
1783 .data = TestBuffer::createFromVector<int8_t>({23, 27, 31, 35, 7, 11, 15, 19, -9, -5, -1, 3, 71, 75, 79, 83, 55, 59, 63, 67, 39, 43, 47, 51})
1784 }},
1785 .operations = {{
1786 .type = TestOperationType::REVERSE,
1787 .inputs = {0, 1},
1788 .outputs = {2}
1789 }},
1790 .inputIndexes = {0},
1791 .outputIndexes = {2}
1792 },
1793 .referenced = {},
1794 .isRelaxed = false,
1795 .expectedMultinomialDistributionTolerance = 0,
1796 .expectFailure = false,
1797 .minSupportedVersion = TestHalVersion::AIDL_V3
1798 };
1799 return model;
1800 }
1801
1802 const auto dummy_test_model_dim3_axis1_quant8_asymm_signed = TestModelManager::get().add("reverse_dim3_axis1_quant8_asymm_signed", get_test_model_dim3_axis1_quant8_asymm_signed());
1803
1804 } // namespace generated_tests::reverse
1805
1806 namespace generated_tests::reverse {
1807
get_test_model_dim3_axis1_quant8_asymm_signed_all_inputs_as_internal()1808 const TestModel& get_test_model_dim3_axis1_quant8_asymm_signed_all_inputs_as_internal() {
1809 static TestModel model = {
1810 .main = {
1811 .operands = {{ // in2
1812 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1813 .dimensions = {2, 3, 4},
1814 .numberOfConsumers = 1,
1815 .scale = 0.25f,
1816 .zeroPoint = -9,
1817 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1818 .channelQuant = {},
1819 .isIgnored = false,
1820 .data = TestBuffer::createFromVector<int8_t>({})
1821 }, { // param2
1822 .type = TestOperandType::TENSOR_INT32,
1823 .dimensions = {1},
1824 .numberOfConsumers = 1,
1825 .scale = 0.0f,
1826 .zeroPoint = 0,
1827 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1828 .channelQuant = {},
1829 .isIgnored = false,
1830 .data = TestBuffer::createFromVector<int32_t>({1})
1831 }, { // out2
1832 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1833 .dimensions = {2, 3, 4},
1834 .numberOfConsumers = 0,
1835 .scale = 0.25f,
1836 .zeroPoint = -9,
1837 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1838 .channelQuant = {},
1839 .isIgnored = false,
1840 .data = TestBuffer::createFromVector<int8_t>({23, 27, 31, 35, 7, 11, 15, 19, -9, -5, -1, 3, 71, 75, 79, 83, 55, 59, 63, 67, 39, 43, 47, 51})
1841 }, { // in2_new
1842 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1843 .dimensions = {2, 3, 4},
1844 .numberOfConsumers = 1,
1845 .scale = 0.25f,
1846 .zeroPoint = -9,
1847 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1848 .channelQuant = {},
1849 .isIgnored = false,
1850 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
1851 }, { // placeholder11
1852 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
1853 .dimensions = {1},
1854 .numberOfConsumers = 1,
1855 .scale = 0.25f,
1856 .zeroPoint = -9,
1857 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1858 .channelQuant = {},
1859 .isIgnored = false,
1860 .data = TestBuffer::createFromVector<int8_t>({-9})
1861 }, { // param15
1862 .type = TestOperandType::INT32,
1863 .dimensions = {},
1864 .numberOfConsumers = 1,
1865 .scale = 0.0f,
1866 .zeroPoint = 0,
1867 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1868 .channelQuant = {},
1869 .isIgnored = false,
1870 .data = TestBuffer::createFromVector<int32_t>({0})
1871 }},
1872 .operations = {{
1873 .type = TestOperationType::ADD,
1874 .inputs = {3, 4, 5},
1875 .outputs = {0}
1876 }, {
1877 .type = TestOperationType::REVERSE,
1878 .inputs = {0, 1},
1879 .outputs = {2}
1880 }},
1881 .inputIndexes = {3},
1882 .outputIndexes = {2}
1883 },
1884 .referenced = {},
1885 .isRelaxed = false,
1886 .expectedMultinomialDistributionTolerance = 0,
1887 .expectFailure = false,
1888 .minSupportedVersion = TestHalVersion::AIDL_V3
1889 };
1890 return model;
1891 }
1892
1893 const auto dummy_test_model_dim3_axis1_quant8_asymm_signed_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis1_quant8_asymm_signed_all_inputs_as_internal", get_test_model_dim3_axis1_quant8_asymm_signed_all_inputs_as_internal());
1894
1895 } // namespace generated_tests::reverse
1896
1897 namespace generated_tests::reverse {
1898
get_test_model_dim3_axis1_int32()1899 const TestModel& get_test_model_dim3_axis1_int32() {
1900 static TestModel model = {
1901 .main = {
1902 .operands = {{ // in2
1903 .type = TestOperandType::TENSOR_INT32,
1904 .dimensions = {2, 3, 4},
1905 .numberOfConsumers = 1,
1906 .scale = 0.0f,
1907 .zeroPoint = 0,
1908 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1909 .channelQuant = {},
1910 .isIgnored = false,
1911 .data = TestBuffer::createFromVector<int32_t>({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23})
1912 }, { // param2
1913 .type = TestOperandType::TENSOR_INT32,
1914 .dimensions = {1},
1915 .numberOfConsumers = 1,
1916 .scale = 0.0f,
1917 .zeroPoint = 0,
1918 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1919 .channelQuant = {},
1920 .isIgnored = false,
1921 .data = TestBuffer::createFromVector<int32_t>({1})
1922 }, { // out2
1923 .type = TestOperandType::TENSOR_INT32,
1924 .dimensions = {2, 3, 4},
1925 .numberOfConsumers = 0,
1926 .scale = 0.0f,
1927 .zeroPoint = 0,
1928 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1929 .channelQuant = {},
1930 .isIgnored = false,
1931 .data = TestBuffer::createFromVector<int32_t>({8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3, 20, 21, 22, 23, 16, 17, 18, 19, 12, 13, 14, 15})
1932 }},
1933 .operations = {{
1934 .type = TestOperationType::REVERSE,
1935 .inputs = {0, 1},
1936 .outputs = {2}
1937 }},
1938 .inputIndexes = {0},
1939 .outputIndexes = {2}
1940 },
1941 .referenced = {},
1942 .isRelaxed = false,
1943 .expectedMultinomialDistributionTolerance = 0,
1944 .expectFailure = false,
1945 .minSupportedVersion = TestHalVersion::AIDL_V3
1946 };
1947 return model;
1948 }
1949
1950 const auto dummy_test_model_dim3_axis1_int32 = TestModelManager::get().add("reverse_dim3_axis1_int32", get_test_model_dim3_axis1_int32());
1951
1952 } // namespace generated_tests::reverse
1953
1954 namespace generated_tests::reverse {
1955
get_test_model_dim3_axis2()1956 const TestModel& get_test_model_dim3_axis2() {
1957 static TestModel model = {
1958 .main = {
1959 .operands = {{ // in3
1960 .type = TestOperandType::TENSOR_FLOAT32,
1961 .dimensions = {2, 3, 4},
1962 .numberOfConsumers = 1,
1963 .scale = 0.0f,
1964 .zeroPoint = 0,
1965 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1966 .channelQuant = {},
1967 .isIgnored = false,
1968 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
1969 }, { // param3
1970 .type = TestOperandType::TENSOR_INT32,
1971 .dimensions = {1},
1972 .numberOfConsumers = 1,
1973 .scale = 0.0f,
1974 .zeroPoint = 0,
1975 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1976 .channelQuant = {},
1977 .isIgnored = false,
1978 .data = TestBuffer::createFromVector<int32_t>({2})
1979 }, { // out3
1980 .type = TestOperandType::TENSOR_FLOAT32,
1981 .dimensions = {2, 3, 4},
1982 .numberOfConsumers = 0,
1983 .scale = 0.0f,
1984 .zeroPoint = 0,
1985 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1986 .channelQuant = {},
1987 .isIgnored = false,
1988 .data = TestBuffer::createFromVector<float>({3.0f, 2.0f, 1.0f, 0.0f, 7.0f, 6.0f, 5.0f, 4.0f, 11.0f, 10.0f, 9.0f, 8.0f, 15.0f, 14.0f, 13.0f, 12.0f, 19.0f, 18.0f, 17.0f, 16.0f, 23.0f, 22.0f, 21.0f, 20.0f})
1989 }},
1990 .operations = {{
1991 .type = TestOperationType::REVERSE,
1992 .inputs = {0, 1},
1993 .outputs = {2}
1994 }},
1995 .inputIndexes = {0},
1996 .outputIndexes = {2}
1997 },
1998 .referenced = {},
1999 .isRelaxed = false,
2000 .expectedMultinomialDistributionTolerance = 0,
2001 .expectFailure = false,
2002 .minSupportedVersion = TestHalVersion::AIDL_V3
2003 };
2004 return model;
2005 }
2006
2007 const auto dummy_test_model_dim3_axis2 = TestModelManager::get().add("reverse_dim3_axis2", get_test_model_dim3_axis2());
2008
2009 } // namespace generated_tests::reverse
2010
2011 namespace generated_tests::reverse {
2012
get_test_model_dim3_axis2_all_inputs_as_internal()2013 const TestModel& get_test_model_dim3_axis2_all_inputs_as_internal() {
2014 static TestModel model = {
2015 .main = {
2016 .operands = {{ // in3
2017 .type = TestOperandType::TENSOR_FLOAT32,
2018 .dimensions = {2, 3, 4},
2019 .numberOfConsumers = 1,
2020 .scale = 0.0f,
2021 .zeroPoint = 0,
2022 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2023 .channelQuant = {},
2024 .isIgnored = false,
2025 .data = TestBuffer::createFromVector<float>({})
2026 }, { // param3
2027 .type = TestOperandType::TENSOR_INT32,
2028 .dimensions = {1},
2029 .numberOfConsumers = 1,
2030 .scale = 0.0f,
2031 .zeroPoint = 0,
2032 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2033 .channelQuant = {},
2034 .isIgnored = false,
2035 .data = TestBuffer::createFromVector<int32_t>({2})
2036 }, { // out3
2037 .type = TestOperandType::TENSOR_FLOAT32,
2038 .dimensions = {2, 3, 4},
2039 .numberOfConsumers = 0,
2040 .scale = 0.0f,
2041 .zeroPoint = 0,
2042 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2043 .channelQuant = {},
2044 .isIgnored = false,
2045 .data = TestBuffer::createFromVector<float>({3.0f, 2.0f, 1.0f, 0.0f, 7.0f, 6.0f, 5.0f, 4.0f, 11.0f, 10.0f, 9.0f, 8.0f, 15.0f, 14.0f, 13.0f, 12.0f, 19.0f, 18.0f, 17.0f, 16.0f, 23.0f, 22.0f, 21.0f, 20.0f})
2046 }, { // in3_new
2047 .type = TestOperandType::TENSOR_FLOAT32,
2048 .dimensions = {2, 3, 4},
2049 .numberOfConsumers = 1,
2050 .scale = 0.0f,
2051 .zeroPoint = 0,
2052 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2053 .channelQuant = {},
2054 .isIgnored = false,
2055 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
2056 }, { // placeholder12
2057 .type = TestOperandType::TENSOR_FLOAT32,
2058 .dimensions = {1},
2059 .numberOfConsumers = 1,
2060 .scale = 0.0f,
2061 .zeroPoint = 0,
2062 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2063 .channelQuant = {},
2064 .isIgnored = false,
2065 .data = TestBuffer::createFromVector<float>({0.0f})
2066 }, { // param16
2067 .type = TestOperandType::INT32,
2068 .dimensions = {},
2069 .numberOfConsumers = 1,
2070 .scale = 0.0f,
2071 .zeroPoint = 0,
2072 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2073 .channelQuant = {},
2074 .isIgnored = false,
2075 .data = TestBuffer::createFromVector<int32_t>({0})
2076 }},
2077 .operations = {{
2078 .type = TestOperationType::ADD,
2079 .inputs = {3, 4, 5},
2080 .outputs = {0}
2081 }, {
2082 .type = TestOperationType::REVERSE,
2083 .inputs = {0, 1},
2084 .outputs = {2}
2085 }},
2086 .inputIndexes = {3},
2087 .outputIndexes = {2}
2088 },
2089 .referenced = {},
2090 .isRelaxed = false,
2091 .expectedMultinomialDistributionTolerance = 0,
2092 .expectFailure = false,
2093 .minSupportedVersion = TestHalVersion::AIDL_V3
2094 };
2095 return model;
2096 }
2097
2098 const auto dummy_test_model_dim3_axis2_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis2_all_inputs_as_internal", get_test_model_dim3_axis2_all_inputs_as_internal());
2099
2100 } // namespace generated_tests::reverse
2101
2102 namespace generated_tests::reverse {
2103
get_test_model_dim3_axis2_float16()2104 const TestModel& get_test_model_dim3_axis2_float16() {
2105 static TestModel model = {
2106 .main = {
2107 .operands = {{ // in3
2108 .type = TestOperandType::TENSOR_FLOAT16,
2109 .dimensions = {2, 3, 4},
2110 .numberOfConsumers = 1,
2111 .scale = 0.0f,
2112 .zeroPoint = 0,
2113 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2114 .channelQuant = {},
2115 .isIgnored = false,
2116 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
2117 }, { // param3
2118 .type = TestOperandType::TENSOR_INT32,
2119 .dimensions = {1},
2120 .numberOfConsumers = 1,
2121 .scale = 0.0f,
2122 .zeroPoint = 0,
2123 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2124 .channelQuant = {},
2125 .isIgnored = false,
2126 .data = TestBuffer::createFromVector<int32_t>({2})
2127 }, { // out3
2128 .type = TestOperandType::TENSOR_FLOAT16,
2129 .dimensions = {2, 3, 4},
2130 .numberOfConsumers = 0,
2131 .scale = 0.0f,
2132 .zeroPoint = 0,
2133 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2134 .channelQuant = {},
2135 .isIgnored = false,
2136 .data = TestBuffer::createFromVector<_Float16>({3.0f, 2.0f, 1.0f, 0.0f, 7.0f, 6.0f, 5.0f, 4.0f, 11.0f, 10.0f, 9.0f, 8.0f, 15.0f, 14.0f, 13.0f, 12.0f, 19.0f, 18.0f, 17.0f, 16.0f, 23.0f, 22.0f, 21.0f, 20.0f})
2137 }},
2138 .operations = {{
2139 .type = TestOperationType::REVERSE,
2140 .inputs = {0, 1},
2141 .outputs = {2}
2142 }},
2143 .inputIndexes = {0},
2144 .outputIndexes = {2}
2145 },
2146 .referenced = {},
2147 .isRelaxed = false,
2148 .expectedMultinomialDistributionTolerance = 0,
2149 .expectFailure = false,
2150 .minSupportedVersion = TestHalVersion::AIDL_V3
2151 };
2152 return model;
2153 }
2154
2155 const auto dummy_test_model_dim3_axis2_float16 = TestModelManager::get().add("reverse_dim3_axis2_float16", get_test_model_dim3_axis2_float16());
2156
2157 } // namespace generated_tests::reverse
2158
2159 namespace generated_tests::reverse {
2160
get_test_model_dim3_axis2_float16_all_inputs_as_internal()2161 const TestModel& get_test_model_dim3_axis2_float16_all_inputs_as_internal() {
2162 static TestModel model = {
2163 .main = {
2164 .operands = {{ // in3
2165 .type = TestOperandType::TENSOR_FLOAT16,
2166 .dimensions = {2, 3, 4},
2167 .numberOfConsumers = 1,
2168 .scale = 0.0f,
2169 .zeroPoint = 0,
2170 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2171 .channelQuant = {},
2172 .isIgnored = false,
2173 .data = TestBuffer::createFromVector<_Float16>({})
2174 }, { // param3
2175 .type = TestOperandType::TENSOR_INT32,
2176 .dimensions = {1},
2177 .numberOfConsumers = 1,
2178 .scale = 0.0f,
2179 .zeroPoint = 0,
2180 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2181 .channelQuant = {},
2182 .isIgnored = false,
2183 .data = TestBuffer::createFromVector<int32_t>({2})
2184 }, { // out3
2185 .type = TestOperandType::TENSOR_FLOAT16,
2186 .dimensions = {2, 3, 4},
2187 .numberOfConsumers = 0,
2188 .scale = 0.0f,
2189 .zeroPoint = 0,
2190 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2191 .channelQuant = {},
2192 .isIgnored = false,
2193 .data = TestBuffer::createFromVector<_Float16>({3.0f, 2.0f, 1.0f, 0.0f, 7.0f, 6.0f, 5.0f, 4.0f, 11.0f, 10.0f, 9.0f, 8.0f, 15.0f, 14.0f, 13.0f, 12.0f, 19.0f, 18.0f, 17.0f, 16.0f, 23.0f, 22.0f, 21.0f, 20.0f})
2194 }, { // in3_new
2195 .type = TestOperandType::TENSOR_FLOAT16,
2196 .dimensions = {2, 3, 4},
2197 .numberOfConsumers = 1,
2198 .scale = 0.0f,
2199 .zeroPoint = 0,
2200 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2201 .channelQuant = {},
2202 .isIgnored = false,
2203 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f})
2204 }, { // placeholder13
2205 .type = TestOperandType::TENSOR_FLOAT16,
2206 .dimensions = {1},
2207 .numberOfConsumers = 1,
2208 .scale = 0.0f,
2209 .zeroPoint = 0,
2210 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2211 .channelQuant = {},
2212 .isIgnored = false,
2213 .data = TestBuffer::createFromVector<_Float16>({0.0f})
2214 }, { // param17
2215 .type = TestOperandType::INT32,
2216 .dimensions = {},
2217 .numberOfConsumers = 1,
2218 .scale = 0.0f,
2219 .zeroPoint = 0,
2220 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2221 .channelQuant = {},
2222 .isIgnored = false,
2223 .data = TestBuffer::createFromVector<int32_t>({0})
2224 }},
2225 .operations = {{
2226 .type = TestOperationType::ADD,
2227 .inputs = {3, 4, 5},
2228 .outputs = {0}
2229 }, {
2230 .type = TestOperationType::REVERSE,
2231 .inputs = {0, 1},
2232 .outputs = {2}
2233 }},
2234 .inputIndexes = {3},
2235 .outputIndexes = {2}
2236 },
2237 .referenced = {},
2238 .isRelaxed = false,
2239 .expectedMultinomialDistributionTolerance = 0,
2240 .expectFailure = false,
2241 .minSupportedVersion = TestHalVersion::AIDL_V3
2242 };
2243 return model;
2244 }
2245
2246 const auto dummy_test_model_dim3_axis2_float16_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis2_float16_all_inputs_as_internal", get_test_model_dim3_axis2_float16_all_inputs_as_internal());
2247
2248 } // namespace generated_tests::reverse
2249
2250 namespace generated_tests::reverse {
2251
get_test_model_dim3_axis2_quant8_asymm()2252 const TestModel& get_test_model_dim3_axis2_quant8_asymm() {
2253 static TestModel model = {
2254 .main = {
2255 .operands = {{ // in3
2256 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2257 .dimensions = {2, 3, 4},
2258 .numberOfConsumers = 1,
2259 .scale = 0.5f,
2260 .zeroPoint = 4,
2261 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2262 .channelQuant = {},
2263 .isIgnored = false,
2264 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
2265 }, { // param3
2266 .type = TestOperandType::TENSOR_INT32,
2267 .dimensions = {1},
2268 .numberOfConsumers = 1,
2269 .scale = 0.0f,
2270 .zeroPoint = 0,
2271 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2272 .channelQuant = {},
2273 .isIgnored = false,
2274 .data = TestBuffer::createFromVector<int32_t>({2})
2275 }, { // out3
2276 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2277 .dimensions = {2, 3, 4},
2278 .numberOfConsumers = 0,
2279 .scale = 0.5f,
2280 .zeroPoint = 4,
2281 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2282 .channelQuant = {},
2283 .isIgnored = false,
2284 .data = TestBuffer::createFromVector<uint8_t>({10, 8, 6, 4, 18, 16, 14, 12, 26, 24, 22, 20, 34, 32, 30, 28, 42, 40, 38, 36, 50, 48, 46, 44})
2285 }},
2286 .operations = {{
2287 .type = TestOperationType::REVERSE,
2288 .inputs = {0, 1},
2289 .outputs = {2}
2290 }},
2291 .inputIndexes = {0},
2292 .outputIndexes = {2}
2293 },
2294 .referenced = {},
2295 .isRelaxed = false,
2296 .expectedMultinomialDistributionTolerance = 0,
2297 .expectFailure = false,
2298 .minSupportedVersion = TestHalVersion::AIDL_V3
2299 };
2300 return model;
2301 }
2302
2303 const auto dummy_test_model_dim3_axis2_quant8_asymm = TestModelManager::get().add("reverse_dim3_axis2_quant8_asymm", get_test_model_dim3_axis2_quant8_asymm());
2304
2305 } // namespace generated_tests::reverse
2306
2307 namespace generated_tests::reverse {
2308
get_test_model_dim3_axis2_quant8_asymm_all_inputs_as_internal()2309 const TestModel& get_test_model_dim3_axis2_quant8_asymm_all_inputs_as_internal() {
2310 static TestModel model = {
2311 .main = {
2312 .operands = {{ // in3
2313 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2314 .dimensions = {2, 3, 4},
2315 .numberOfConsumers = 1,
2316 .scale = 0.5f,
2317 .zeroPoint = 4,
2318 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2319 .channelQuant = {},
2320 .isIgnored = false,
2321 .data = TestBuffer::createFromVector<uint8_t>({})
2322 }, { // param3
2323 .type = TestOperandType::TENSOR_INT32,
2324 .dimensions = {1},
2325 .numberOfConsumers = 1,
2326 .scale = 0.0f,
2327 .zeroPoint = 0,
2328 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2329 .channelQuant = {},
2330 .isIgnored = false,
2331 .data = TestBuffer::createFromVector<int32_t>({2})
2332 }, { // out3
2333 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2334 .dimensions = {2, 3, 4},
2335 .numberOfConsumers = 0,
2336 .scale = 0.5f,
2337 .zeroPoint = 4,
2338 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2339 .channelQuant = {},
2340 .isIgnored = false,
2341 .data = TestBuffer::createFromVector<uint8_t>({10, 8, 6, 4, 18, 16, 14, 12, 26, 24, 22, 20, 34, 32, 30, 28, 42, 40, 38, 36, 50, 48, 46, 44})
2342 }, { // in3_new
2343 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2344 .dimensions = {2, 3, 4},
2345 .numberOfConsumers = 1,
2346 .scale = 0.5f,
2347 .zeroPoint = 4,
2348 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2349 .channelQuant = {},
2350 .isIgnored = false,
2351 .data = TestBuffer::createFromVector<uint8_t>({4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50})
2352 }, { // placeholder14
2353 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2354 .dimensions = {1},
2355 .numberOfConsumers = 1,
2356 .scale = 0.5f,
2357 .zeroPoint = 4,
2358 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2359 .channelQuant = {},
2360 .isIgnored = false,
2361 .data = TestBuffer::createFromVector<uint8_t>({4})
2362 }, { // param18
2363 .type = TestOperandType::INT32,
2364 .dimensions = {},
2365 .numberOfConsumers = 1,
2366 .scale = 0.0f,
2367 .zeroPoint = 0,
2368 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2369 .channelQuant = {},
2370 .isIgnored = false,
2371 .data = TestBuffer::createFromVector<int32_t>({0})
2372 }},
2373 .operations = {{
2374 .type = TestOperationType::ADD,
2375 .inputs = {3, 4, 5},
2376 .outputs = {0}
2377 }, {
2378 .type = TestOperationType::REVERSE,
2379 .inputs = {0, 1},
2380 .outputs = {2}
2381 }},
2382 .inputIndexes = {3},
2383 .outputIndexes = {2}
2384 },
2385 .referenced = {},
2386 .isRelaxed = false,
2387 .expectedMultinomialDistributionTolerance = 0,
2388 .expectFailure = false,
2389 .minSupportedVersion = TestHalVersion::AIDL_V3
2390 };
2391 return model;
2392 }
2393
2394 const auto dummy_test_model_dim3_axis2_quant8_asymm_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis2_quant8_asymm_all_inputs_as_internal", get_test_model_dim3_axis2_quant8_asymm_all_inputs_as_internal());
2395
2396 } // namespace generated_tests::reverse
2397
2398 namespace generated_tests::reverse {
2399
get_test_model_dim3_axis2_quant8_asymm_signed()2400 const TestModel& get_test_model_dim3_axis2_quant8_asymm_signed() {
2401 static TestModel model = {
2402 .main = {
2403 .operands = {{ // in3
2404 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2405 .dimensions = {2, 3, 4},
2406 .numberOfConsumers = 1,
2407 .scale = 0.25f,
2408 .zeroPoint = -9,
2409 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2410 .channelQuant = {},
2411 .isIgnored = false,
2412 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
2413 }, { // param3
2414 .type = TestOperandType::TENSOR_INT32,
2415 .dimensions = {1},
2416 .numberOfConsumers = 1,
2417 .scale = 0.0f,
2418 .zeroPoint = 0,
2419 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2420 .channelQuant = {},
2421 .isIgnored = false,
2422 .data = TestBuffer::createFromVector<int32_t>({2})
2423 }, { // out3
2424 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2425 .dimensions = {2, 3, 4},
2426 .numberOfConsumers = 0,
2427 .scale = 0.25f,
2428 .zeroPoint = -9,
2429 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2430 .channelQuant = {},
2431 .isIgnored = false,
2432 .data = TestBuffer::createFromVector<int8_t>({3, -1, -5, -9, 19, 15, 11, 7, 35, 31, 27, 23, 51, 47, 43, 39, 67, 63, 59, 55, 83, 79, 75, 71})
2433 }},
2434 .operations = {{
2435 .type = TestOperationType::REVERSE,
2436 .inputs = {0, 1},
2437 .outputs = {2}
2438 }},
2439 .inputIndexes = {0},
2440 .outputIndexes = {2}
2441 },
2442 .referenced = {},
2443 .isRelaxed = false,
2444 .expectedMultinomialDistributionTolerance = 0,
2445 .expectFailure = false,
2446 .minSupportedVersion = TestHalVersion::AIDL_V3
2447 };
2448 return model;
2449 }
2450
2451 const auto dummy_test_model_dim3_axis2_quant8_asymm_signed = TestModelManager::get().add("reverse_dim3_axis2_quant8_asymm_signed", get_test_model_dim3_axis2_quant8_asymm_signed());
2452
2453 } // namespace generated_tests::reverse
2454
2455 namespace generated_tests::reverse {
2456
get_test_model_dim3_axis2_quant8_asymm_signed_all_inputs_as_internal()2457 const TestModel& get_test_model_dim3_axis2_quant8_asymm_signed_all_inputs_as_internal() {
2458 static TestModel model = {
2459 .main = {
2460 .operands = {{ // in3
2461 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2462 .dimensions = {2, 3, 4},
2463 .numberOfConsumers = 1,
2464 .scale = 0.25f,
2465 .zeroPoint = -9,
2466 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2467 .channelQuant = {},
2468 .isIgnored = false,
2469 .data = TestBuffer::createFromVector<int8_t>({})
2470 }, { // param3
2471 .type = TestOperandType::TENSOR_INT32,
2472 .dimensions = {1},
2473 .numberOfConsumers = 1,
2474 .scale = 0.0f,
2475 .zeroPoint = 0,
2476 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2477 .channelQuant = {},
2478 .isIgnored = false,
2479 .data = TestBuffer::createFromVector<int32_t>({2})
2480 }, { // out3
2481 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2482 .dimensions = {2, 3, 4},
2483 .numberOfConsumers = 0,
2484 .scale = 0.25f,
2485 .zeroPoint = -9,
2486 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2487 .channelQuant = {},
2488 .isIgnored = false,
2489 .data = TestBuffer::createFromVector<int8_t>({3, -1, -5, -9, 19, 15, 11, 7, 35, 31, 27, 23, 51, 47, 43, 39, 67, 63, 59, 55, 83, 79, 75, 71})
2490 }, { // in3_new
2491 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2492 .dimensions = {2, 3, 4},
2493 .numberOfConsumers = 1,
2494 .scale = 0.25f,
2495 .zeroPoint = -9,
2496 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2497 .channelQuant = {},
2498 .isIgnored = false,
2499 .data = TestBuffer::createFromVector<int8_t>({-9, -5, -1, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83})
2500 }, { // placeholder15
2501 .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
2502 .dimensions = {1},
2503 .numberOfConsumers = 1,
2504 .scale = 0.25f,
2505 .zeroPoint = -9,
2506 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2507 .channelQuant = {},
2508 .isIgnored = false,
2509 .data = TestBuffer::createFromVector<int8_t>({-9})
2510 }, { // param19
2511 .type = TestOperandType::INT32,
2512 .dimensions = {},
2513 .numberOfConsumers = 1,
2514 .scale = 0.0f,
2515 .zeroPoint = 0,
2516 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2517 .channelQuant = {},
2518 .isIgnored = false,
2519 .data = TestBuffer::createFromVector<int32_t>({0})
2520 }},
2521 .operations = {{
2522 .type = TestOperationType::ADD,
2523 .inputs = {3, 4, 5},
2524 .outputs = {0}
2525 }, {
2526 .type = TestOperationType::REVERSE,
2527 .inputs = {0, 1},
2528 .outputs = {2}
2529 }},
2530 .inputIndexes = {3},
2531 .outputIndexes = {2}
2532 },
2533 .referenced = {},
2534 .isRelaxed = false,
2535 .expectedMultinomialDistributionTolerance = 0,
2536 .expectFailure = false,
2537 .minSupportedVersion = TestHalVersion::AIDL_V3
2538 };
2539 return model;
2540 }
2541
2542 const auto dummy_test_model_dim3_axis2_quant8_asymm_signed_all_inputs_as_internal = TestModelManager::get().add("reverse_dim3_axis2_quant8_asymm_signed_all_inputs_as_internal", get_test_model_dim3_axis2_quant8_asymm_signed_all_inputs_as_internal());
2543
2544 } // namespace generated_tests::reverse
2545
2546 namespace generated_tests::reverse {
2547
get_test_model_dim3_axis2_int32()2548 const TestModel& get_test_model_dim3_axis2_int32() {
2549 static TestModel model = {
2550 .main = {
2551 .operands = {{ // in3
2552 .type = TestOperandType::TENSOR_INT32,
2553 .dimensions = {2, 3, 4},
2554 .numberOfConsumers = 1,
2555 .scale = 0.0f,
2556 .zeroPoint = 0,
2557 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2558 .channelQuant = {},
2559 .isIgnored = false,
2560 .data = TestBuffer::createFromVector<int32_t>({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23})
2561 }, { // param3
2562 .type = TestOperandType::TENSOR_INT32,
2563 .dimensions = {1},
2564 .numberOfConsumers = 1,
2565 .scale = 0.0f,
2566 .zeroPoint = 0,
2567 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2568 .channelQuant = {},
2569 .isIgnored = false,
2570 .data = TestBuffer::createFromVector<int32_t>({2})
2571 }, { // out3
2572 .type = TestOperandType::TENSOR_INT32,
2573 .dimensions = {2, 3, 4},
2574 .numberOfConsumers = 0,
2575 .scale = 0.0f,
2576 .zeroPoint = 0,
2577 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2578 .channelQuant = {},
2579 .isIgnored = false,
2580 .data = TestBuffer::createFromVector<int32_t>({3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, 19, 18, 17, 16, 23, 22, 21, 20})
2581 }},
2582 .operations = {{
2583 .type = TestOperationType::REVERSE,
2584 .inputs = {0, 1},
2585 .outputs = {2}
2586 }},
2587 .inputIndexes = {0},
2588 .outputIndexes = {2}
2589 },
2590 .referenced = {},
2591 .isRelaxed = false,
2592 .expectedMultinomialDistributionTolerance = 0,
2593 .expectFailure = false,
2594 .minSupportedVersion = TestHalVersion::AIDL_V3
2595 };
2596 return model;
2597 }
2598
2599 const auto dummy_test_model_dim3_axis2_int32 = TestModelManager::get().add("reverse_dim3_axis2_int32", get_test_model_dim3_axis2_int32());
2600
2601 } // namespace generated_tests::reverse
2602
2603