1 // clang-format off
2 // Generated file (from: channel_shuffle.mod.py). Do not edit
3 // Create the model
createTestModel_dim4_axis0()4 Model createTestModel_dim4_axis0() {
5 const std::vector<Operand> operands = {
6 {
7 .type = OperandType::TENSOR_FLOAT32,
8 .dimensions = {12, 2, 2, 3},
9 .numberOfConsumers = 1,
10 .scale = 0.0f,
11 .zeroPoint = 0,
12 .lifetime = OperandLifeTime::MODEL_INPUT,
13 .location = {.poolIndex = 0, .offset = 0, .length = 0},
14 },
15 {
16 .type = OperandType::INT32,
17 .dimensions = {},
18 .numberOfConsumers = 1,
19 .scale = 0.0f,
20 .zeroPoint = 0,
21 .lifetime = OperandLifeTime::CONSTANT_COPY,
22 .location = {.poolIndex = 0, .offset = 0, .length = 4},
23 },
24 {
25 .type = OperandType::INT32,
26 .dimensions = {},
27 .numberOfConsumers = 1,
28 .scale = 0.0f,
29 .zeroPoint = 0,
30 .lifetime = OperandLifeTime::CONSTANT_COPY,
31 .location = {.poolIndex = 0, .offset = 4, .length = 4},
32 },
33 {
34 .type = OperandType::TENSOR_FLOAT32,
35 .dimensions = {12, 2, 2, 3},
36 .numberOfConsumers = 0,
37 .scale = 0.0f,
38 .zeroPoint = 0,
39 .lifetime = OperandLifeTime::MODEL_OUTPUT,
40 .location = {.poolIndex = 0, .offset = 0, .length = 0},
41 }
42 };
43
44 const std::vector<Operation> operations = {
45 {
46 .type = OperationType::CHANNEL_SHUFFLE,
47 .inputs = {0, 1, 2},
48 .outputs = {3},
49 }
50 };
51
52 const std::vector<uint32_t> inputIndexes = {0};
53 const std::vector<uint32_t> outputIndexes = {3};
54 std::vector<uint8_t> operandValues = {
55 3, 0, 0, 0, 0, 0, 0, 0
56 };
57 const std::vector<hidl_memory> pools = {};
58
59 return {
60 .operands = operands,
61 .operations = operations,
62 .inputIndexes = inputIndexes,
63 .outputIndexes = outputIndexes,
64 .operandValues = operandValues,
65 .pools = pools,
66 };
67 }
68
is_ignored_dim4_axis0(int i)69 inline bool is_ignored_dim4_axis0(int i) {
70 static std::set<int> ignore = {};
71 return ignore.find(i) != ignore.end();
72 }
73
74 // Create the model
createTestModel_dim4_axis0_neg()75 Model createTestModel_dim4_axis0_neg() {
76 const std::vector<Operand> operands = {
77 {
78 .type = OperandType::TENSOR_FLOAT32,
79 .dimensions = {12, 2, 2, 3},
80 .numberOfConsumers = 1,
81 .scale = 0.0f,
82 .zeroPoint = 0,
83 .lifetime = OperandLifeTime::MODEL_INPUT,
84 .location = {.poolIndex = 0, .offset = 0, .length = 0},
85 },
86 {
87 .type = OperandType::INT32,
88 .dimensions = {},
89 .numberOfConsumers = 1,
90 .scale = 0.0f,
91 .zeroPoint = 0,
92 .lifetime = OperandLifeTime::CONSTANT_COPY,
93 .location = {.poolIndex = 0, .offset = 0, .length = 4},
94 },
95 {
96 .type = OperandType::INT32,
97 .dimensions = {},
98 .numberOfConsumers = 1,
99 .scale = 0.0f,
100 .zeroPoint = 0,
101 .lifetime = OperandLifeTime::CONSTANT_COPY,
102 .location = {.poolIndex = 0, .offset = 4, .length = 4},
103 },
104 {
105 .type = OperandType::TENSOR_FLOAT32,
106 .dimensions = {12, 2, 2, 3},
107 .numberOfConsumers = 0,
108 .scale = 0.0f,
109 .zeroPoint = 0,
110 .lifetime = OperandLifeTime::MODEL_OUTPUT,
111 .location = {.poolIndex = 0, .offset = 0, .length = 0},
112 }
113 };
114
115 const std::vector<Operation> operations = {
116 {
117 .type = OperationType::CHANNEL_SHUFFLE,
118 .inputs = {0, 1, 2},
119 .outputs = {3},
120 }
121 };
122
123 const std::vector<uint32_t> inputIndexes = {0};
124 const std::vector<uint32_t> outputIndexes = {3};
125 std::vector<uint8_t> operandValues = {
126 3, 0, 0, 0, 252, 255, 255, 255
127 };
128 const std::vector<hidl_memory> pools = {};
129
130 return {
131 .operands = operands,
132 .operations = operations,
133 .inputIndexes = inputIndexes,
134 .outputIndexes = outputIndexes,
135 .operandValues = operandValues,
136 .pools = pools,
137 };
138 }
139
is_ignored_dim4_axis0_neg(int i)140 inline bool is_ignored_dim4_axis0_neg(int i) {
141 static std::set<int> ignore = {};
142 return ignore.find(i) != ignore.end();
143 }
144
145 // Create the model
createTestModel_dim4_axis1()146 Model createTestModel_dim4_axis1() {
147 const std::vector<Operand> operands = {
148 {
149 .type = OperandType::TENSOR_FLOAT32,
150 .dimensions = {2, 12, 2, 3},
151 .numberOfConsumers = 1,
152 .scale = 0.0f,
153 .zeroPoint = 0,
154 .lifetime = OperandLifeTime::MODEL_INPUT,
155 .location = {.poolIndex = 0, .offset = 0, .length = 0},
156 },
157 {
158 .type = OperandType::INT32,
159 .dimensions = {},
160 .numberOfConsumers = 1,
161 .scale = 0.0f,
162 .zeroPoint = 0,
163 .lifetime = OperandLifeTime::CONSTANT_COPY,
164 .location = {.poolIndex = 0, .offset = 0, .length = 4},
165 },
166 {
167 .type = OperandType::INT32,
168 .dimensions = {},
169 .numberOfConsumers = 1,
170 .scale = 0.0f,
171 .zeroPoint = 0,
172 .lifetime = OperandLifeTime::CONSTANT_COPY,
173 .location = {.poolIndex = 0, .offset = 4, .length = 4},
174 },
175 {
176 .type = OperandType::TENSOR_FLOAT32,
177 .dimensions = {2, 12, 2, 3},
178 .numberOfConsumers = 0,
179 .scale = 0.0f,
180 .zeroPoint = 0,
181 .lifetime = OperandLifeTime::MODEL_OUTPUT,
182 .location = {.poolIndex = 0, .offset = 0, .length = 0},
183 }
184 };
185
186 const std::vector<Operation> operations = {
187 {
188 .type = OperationType::CHANNEL_SHUFFLE,
189 .inputs = {0, 1, 2},
190 .outputs = {3},
191 }
192 };
193
194 const std::vector<uint32_t> inputIndexes = {0};
195 const std::vector<uint32_t> outputIndexes = {3};
196 std::vector<uint8_t> operandValues = {
197 3, 0, 0, 0, 1, 0, 0, 0
198 };
199 const std::vector<hidl_memory> pools = {};
200
201 return {
202 .operands = operands,
203 .operations = operations,
204 .inputIndexes = inputIndexes,
205 .outputIndexes = outputIndexes,
206 .operandValues = operandValues,
207 .pools = pools,
208 };
209 }
210
is_ignored_dim4_axis1(int i)211 inline bool is_ignored_dim4_axis1(int i) {
212 static std::set<int> ignore = {};
213 return ignore.find(i) != ignore.end();
214 }
215
216 // Create the model
createTestModel_dim4_axis1_neg()217 Model createTestModel_dim4_axis1_neg() {
218 const std::vector<Operand> operands = {
219 {
220 .type = OperandType::TENSOR_FLOAT32,
221 .dimensions = {2, 12, 2, 3},
222 .numberOfConsumers = 1,
223 .scale = 0.0f,
224 .zeroPoint = 0,
225 .lifetime = OperandLifeTime::MODEL_INPUT,
226 .location = {.poolIndex = 0, .offset = 0, .length = 0},
227 },
228 {
229 .type = OperandType::INT32,
230 .dimensions = {},
231 .numberOfConsumers = 1,
232 .scale = 0.0f,
233 .zeroPoint = 0,
234 .lifetime = OperandLifeTime::CONSTANT_COPY,
235 .location = {.poolIndex = 0, .offset = 0, .length = 4},
236 },
237 {
238 .type = OperandType::INT32,
239 .dimensions = {},
240 .numberOfConsumers = 1,
241 .scale = 0.0f,
242 .zeroPoint = 0,
243 .lifetime = OperandLifeTime::CONSTANT_COPY,
244 .location = {.poolIndex = 0, .offset = 4, .length = 4},
245 },
246 {
247 .type = OperandType::TENSOR_FLOAT32,
248 .dimensions = {2, 12, 2, 3},
249 .numberOfConsumers = 0,
250 .scale = 0.0f,
251 .zeroPoint = 0,
252 .lifetime = OperandLifeTime::MODEL_OUTPUT,
253 .location = {.poolIndex = 0, .offset = 0, .length = 0},
254 }
255 };
256
257 const std::vector<Operation> operations = {
258 {
259 .type = OperationType::CHANNEL_SHUFFLE,
260 .inputs = {0, 1, 2},
261 .outputs = {3},
262 }
263 };
264
265 const std::vector<uint32_t> inputIndexes = {0};
266 const std::vector<uint32_t> outputIndexes = {3};
267 std::vector<uint8_t> operandValues = {
268 3, 0, 0, 0, 253, 255, 255, 255
269 };
270 const std::vector<hidl_memory> pools = {};
271
272 return {
273 .operands = operands,
274 .operations = operations,
275 .inputIndexes = inputIndexes,
276 .outputIndexes = outputIndexes,
277 .operandValues = operandValues,
278 .pools = pools,
279 };
280 }
281
is_ignored_dim4_axis1_neg(int i)282 inline bool is_ignored_dim4_axis1_neg(int i) {
283 static std::set<int> ignore = {};
284 return ignore.find(i) != ignore.end();
285 }
286
287 // Create the model
createTestModel_dim4_axis2()288 Model createTestModel_dim4_axis2() {
289 const std::vector<Operand> operands = {
290 {
291 .type = OperandType::TENSOR_FLOAT32,
292 .dimensions = {2, 2, 12, 3},
293 .numberOfConsumers = 1,
294 .scale = 0.0f,
295 .zeroPoint = 0,
296 .lifetime = OperandLifeTime::MODEL_INPUT,
297 .location = {.poolIndex = 0, .offset = 0, .length = 0},
298 },
299 {
300 .type = OperandType::INT32,
301 .dimensions = {},
302 .numberOfConsumers = 1,
303 .scale = 0.0f,
304 .zeroPoint = 0,
305 .lifetime = OperandLifeTime::CONSTANT_COPY,
306 .location = {.poolIndex = 0, .offset = 0, .length = 4},
307 },
308 {
309 .type = OperandType::INT32,
310 .dimensions = {},
311 .numberOfConsumers = 1,
312 .scale = 0.0f,
313 .zeroPoint = 0,
314 .lifetime = OperandLifeTime::CONSTANT_COPY,
315 .location = {.poolIndex = 0, .offset = 4, .length = 4},
316 },
317 {
318 .type = OperandType::TENSOR_FLOAT32,
319 .dimensions = {2, 2, 12, 3},
320 .numberOfConsumers = 0,
321 .scale = 0.0f,
322 .zeroPoint = 0,
323 .lifetime = OperandLifeTime::MODEL_OUTPUT,
324 .location = {.poolIndex = 0, .offset = 0, .length = 0},
325 }
326 };
327
328 const std::vector<Operation> operations = {
329 {
330 .type = OperationType::CHANNEL_SHUFFLE,
331 .inputs = {0, 1, 2},
332 .outputs = {3},
333 }
334 };
335
336 const std::vector<uint32_t> inputIndexes = {0};
337 const std::vector<uint32_t> outputIndexes = {3};
338 std::vector<uint8_t> operandValues = {
339 3, 0, 0, 0, 2, 0, 0, 0
340 };
341 const std::vector<hidl_memory> pools = {};
342
343 return {
344 .operands = operands,
345 .operations = operations,
346 .inputIndexes = inputIndexes,
347 .outputIndexes = outputIndexes,
348 .operandValues = operandValues,
349 .pools = pools,
350 };
351 }
352
is_ignored_dim4_axis2(int i)353 inline bool is_ignored_dim4_axis2(int i) {
354 static std::set<int> ignore = {};
355 return ignore.find(i) != ignore.end();
356 }
357
358 // Create the model
createTestModel_dim4_axis2_neg()359 Model createTestModel_dim4_axis2_neg() {
360 const std::vector<Operand> operands = {
361 {
362 .type = OperandType::TENSOR_FLOAT32,
363 .dimensions = {2, 2, 12, 3},
364 .numberOfConsumers = 1,
365 .scale = 0.0f,
366 .zeroPoint = 0,
367 .lifetime = OperandLifeTime::MODEL_INPUT,
368 .location = {.poolIndex = 0, .offset = 0, .length = 0},
369 },
370 {
371 .type = OperandType::INT32,
372 .dimensions = {},
373 .numberOfConsumers = 1,
374 .scale = 0.0f,
375 .zeroPoint = 0,
376 .lifetime = OperandLifeTime::CONSTANT_COPY,
377 .location = {.poolIndex = 0, .offset = 0, .length = 4},
378 },
379 {
380 .type = OperandType::INT32,
381 .dimensions = {},
382 .numberOfConsumers = 1,
383 .scale = 0.0f,
384 .zeroPoint = 0,
385 .lifetime = OperandLifeTime::CONSTANT_COPY,
386 .location = {.poolIndex = 0, .offset = 4, .length = 4},
387 },
388 {
389 .type = OperandType::TENSOR_FLOAT32,
390 .dimensions = {2, 2, 12, 3},
391 .numberOfConsumers = 0,
392 .scale = 0.0f,
393 .zeroPoint = 0,
394 .lifetime = OperandLifeTime::MODEL_OUTPUT,
395 .location = {.poolIndex = 0, .offset = 0, .length = 0},
396 }
397 };
398
399 const std::vector<Operation> operations = {
400 {
401 .type = OperationType::CHANNEL_SHUFFLE,
402 .inputs = {0, 1, 2},
403 .outputs = {3},
404 }
405 };
406
407 const std::vector<uint32_t> inputIndexes = {0};
408 const std::vector<uint32_t> outputIndexes = {3};
409 std::vector<uint8_t> operandValues = {
410 3, 0, 0, 0, 254, 255, 255, 255
411 };
412 const std::vector<hidl_memory> pools = {};
413
414 return {
415 .operands = operands,
416 .operations = operations,
417 .inputIndexes = inputIndexes,
418 .outputIndexes = outputIndexes,
419 .operandValues = operandValues,
420 .pools = pools,
421 };
422 }
423
is_ignored_dim4_axis2_neg(int i)424 inline bool is_ignored_dim4_axis2_neg(int i) {
425 static std::set<int> ignore = {};
426 return ignore.find(i) != ignore.end();
427 }
428
429 // Create the model
createTestModel_dim4_axis3()430 Model createTestModel_dim4_axis3() {
431 const std::vector<Operand> operands = {
432 {
433 .type = OperandType::TENSOR_FLOAT32,
434 .dimensions = {2, 2, 3, 12},
435 .numberOfConsumers = 1,
436 .scale = 0.0f,
437 .zeroPoint = 0,
438 .lifetime = OperandLifeTime::MODEL_INPUT,
439 .location = {.poolIndex = 0, .offset = 0, .length = 0},
440 },
441 {
442 .type = OperandType::INT32,
443 .dimensions = {},
444 .numberOfConsumers = 1,
445 .scale = 0.0f,
446 .zeroPoint = 0,
447 .lifetime = OperandLifeTime::CONSTANT_COPY,
448 .location = {.poolIndex = 0, .offset = 0, .length = 4},
449 },
450 {
451 .type = OperandType::INT32,
452 .dimensions = {},
453 .numberOfConsumers = 1,
454 .scale = 0.0f,
455 .zeroPoint = 0,
456 .lifetime = OperandLifeTime::CONSTANT_COPY,
457 .location = {.poolIndex = 0, .offset = 4, .length = 4},
458 },
459 {
460 .type = OperandType::TENSOR_FLOAT32,
461 .dimensions = {2, 2, 3, 12},
462 .numberOfConsumers = 0,
463 .scale = 0.0f,
464 .zeroPoint = 0,
465 .lifetime = OperandLifeTime::MODEL_OUTPUT,
466 .location = {.poolIndex = 0, .offset = 0, .length = 0},
467 }
468 };
469
470 const std::vector<Operation> operations = {
471 {
472 .type = OperationType::CHANNEL_SHUFFLE,
473 .inputs = {0, 1, 2},
474 .outputs = {3},
475 }
476 };
477
478 const std::vector<uint32_t> inputIndexes = {0};
479 const std::vector<uint32_t> outputIndexes = {3};
480 std::vector<uint8_t> operandValues = {
481 3, 0, 0, 0, 3, 0, 0, 0
482 };
483 const std::vector<hidl_memory> pools = {};
484
485 return {
486 .operands = operands,
487 .operations = operations,
488 .inputIndexes = inputIndexes,
489 .outputIndexes = outputIndexes,
490 .operandValues = operandValues,
491 .pools = pools,
492 };
493 }
494
is_ignored_dim4_axis3(int i)495 inline bool is_ignored_dim4_axis3(int i) {
496 static std::set<int> ignore = {};
497 return ignore.find(i) != ignore.end();
498 }
499
500 // Create the model
createTestModel_dim4_axis3_neg()501 Model createTestModel_dim4_axis3_neg() {
502 const std::vector<Operand> operands = {
503 {
504 .type = OperandType::TENSOR_FLOAT32,
505 .dimensions = {2, 2, 3, 12},
506 .numberOfConsumers = 1,
507 .scale = 0.0f,
508 .zeroPoint = 0,
509 .lifetime = OperandLifeTime::MODEL_INPUT,
510 .location = {.poolIndex = 0, .offset = 0, .length = 0},
511 },
512 {
513 .type = OperandType::INT32,
514 .dimensions = {},
515 .numberOfConsumers = 1,
516 .scale = 0.0f,
517 .zeroPoint = 0,
518 .lifetime = OperandLifeTime::CONSTANT_COPY,
519 .location = {.poolIndex = 0, .offset = 0, .length = 4},
520 },
521 {
522 .type = OperandType::INT32,
523 .dimensions = {},
524 .numberOfConsumers = 1,
525 .scale = 0.0f,
526 .zeroPoint = 0,
527 .lifetime = OperandLifeTime::CONSTANT_COPY,
528 .location = {.poolIndex = 0, .offset = 4, .length = 4},
529 },
530 {
531 .type = OperandType::TENSOR_FLOAT32,
532 .dimensions = {2, 2, 3, 12},
533 .numberOfConsumers = 0,
534 .scale = 0.0f,
535 .zeroPoint = 0,
536 .lifetime = OperandLifeTime::MODEL_OUTPUT,
537 .location = {.poolIndex = 0, .offset = 0, .length = 0},
538 }
539 };
540
541 const std::vector<Operation> operations = {
542 {
543 .type = OperationType::CHANNEL_SHUFFLE,
544 .inputs = {0, 1, 2},
545 .outputs = {3},
546 }
547 };
548
549 const std::vector<uint32_t> inputIndexes = {0};
550 const std::vector<uint32_t> outputIndexes = {3};
551 std::vector<uint8_t> operandValues = {
552 3, 0, 0, 0, 255, 255, 255, 255
553 };
554 const std::vector<hidl_memory> pools = {};
555
556 return {
557 .operands = operands,
558 .operations = operations,
559 .inputIndexes = inputIndexes,
560 .outputIndexes = outputIndexes,
561 .operandValues = operandValues,
562 .pools = pools,
563 };
564 }
565
is_ignored_dim4_axis3_neg(int i)566 inline bool is_ignored_dim4_axis3_neg(int i) {
567 static std::set<int> ignore = {};
568 return ignore.find(i) != ignore.end();
569 }
570
571 // Create the model
createTestModel_dim3_axis0()572 Model createTestModel_dim3_axis0() {
573 const std::vector<Operand> operands = {
574 {
575 .type = OperandType::TENSOR_FLOAT32,
576 .dimensions = {12, 2, 3},
577 .numberOfConsumers = 1,
578 .scale = 0.0f,
579 .zeroPoint = 0,
580 .lifetime = OperandLifeTime::MODEL_INPUT,
581 .location = {.poolIndex = 0, .offset = 0, .length = 0},
582 },
583 {
584 .type = OperandType::INT32,
585 .dimensions = {},
586 .numberOfConsumers = 1,
587 .scale = 0.0f,
588 .zeroPoint = 0,
589 .lifetime = OperandLifeTime::CONSTANT_COPY,
590 .location = {.poolIndex = 0, .offset = 0, .length = 4},
591 },
592 {
593 .type = OperandType::INT32,
594 .dimensions = {},
595 .numberOfConsumers = 1,
596 .scale = 0.0f,
597 .zeroPoint = 0,
598 .lifetime = OperandLifeTime::CONSTANT_COPY,
599 .location = {.poolIndex = 0, .offset = 4, .length = 4},
600 },
601 {
602 .type = OperandType::TENSOR_FLOAT32,
603 .dimensions = {12, 2, 3},
604 .numberOfConsumers = 0,
605 .scale = 0.0f,
606 .zeroPoint = 0,
607 .lifetime = OperandLifeTime::MODEL_OUTPUT,
608 .location = {.poolIndex = 0, .offset = 0, .length = 0},
609 }
610 };
611
612 const std::vector<Operation> operations = {
613 {
614 .type = OperationType::CHANNEL_SHUFFLE,
615 .inputs = {0, 1, 2},
616 .outputs = {3},
617 }
618 };
619
620 const std::vector<uint32_t> inputIndexes = {0};
621 const std::vector<uint32_t> outputIndexes = {3};
622 std::vector<uint8_t> operandValues = {
623 3, 0, 0, 0, 0, 0, 0, 0
624 };
625 const std::vector<hidl_memory> pools = {};
626
627 return {
628 .operands = operands,
629 .operations = operations,
630 .inputIndexes = inputIndexes,
631 .outputIndexes = outputIndexes,
632 .operandValues = operandValues,
633 .pools = pools,
634 };
635 }
636
is_ignored_dim3_axis0(int i)637 inline bool is_ignored_dim3_axis0(int i) {
638 static std::set<int> ignore = {};
639 return ignore.find(i) != ignore.end();
640 }
641
642 // Create the model
createTestModel_dim3_axis0_neg()643 Model createTestModel_dim3_axis0_neg() {
644 const std::vector<Operand> operands = {
645 {
646 .type = OperandType::TENSOR_FLOAT32,
647 .dimensions = {12, 2, 3},
648 .numberOfConsumers = 1,
649 .scale = 0.0f,
650 .zeroPoint = 0,
651 .lifetime = OperandLifeTime::MODEL_INPUT,
652 .location = {.poolIndex = 0, .offset = 0, .length = 0},
653 },
654 {
655 .type = OperandType::INT32,
656 .dimensions = {},
657 .numberOfConsumers = 1,
658 .scale = 0.0f,
659 .zeroPoint = 0,
660 .lifetime = OperandLifeTime::CONSTANT_COPY,
661 .location = {.poolIndex = 0, .offset = 0, .length = 4},
662 },
663 {
664 .type = OperandType::INT32,
665 .dimensions = {},
666 .numberOfConsumers = 1,
667 .scale = 0.0f,
668 .zeroPoint = 0,
669 .lifetime = OperandLifeTime::CONSTANT_COPY,
670 .location = {.poolIndex = 0, .offset = 4, .length = 4},
671 },
672 {
673 .type = OperandType::TENSOR_FLOAT32,
674 .dimensions = {12, 2, 3},
675 .numberOfConsumers = 0,
676 .scale = 0.0f,
677 .zeroPoint = 0,
678 .lifetime = OperandLifeTime::MODEL_OUTPUT,
679 .location = {.poolIndex = 0, .offset = 0, .length = 0},
680 }
681 };
682
683 const std::vector<Operation> operations = {
684 {
685 .type = OperationType::CHANNEL_SHUFFLE,
686 .inputs = {0, 1, 2},
687 .outputs = {3},
688 }
689 };
690
691 const std::vector<uint32_t> inputIndexes = {0};
692 const std::vector<uint32_t> outputIndexes = {3};
693 std::vector<uint8_t> operandValues = {
694 3, 0, 0, 0, 253, 255, 255, 255
695 };
696 const std::vector<hidl_memory> pools = {};
697
698 return {
699 .operands = operands,
700 .operations = operations,
701 .inputIndexes = inputIndexes,
702 .outputIndexes = outputIndexes,
703 .operandValues = operandValues,
704 .pools = pools,
705 };
706 }
707
is_ignored_dim3_axis0_neg(int i)708 inline bool is_ignored_dim3_axis0_neg(int i) {
709 static std::set<int> ignore = {};
710 return ignore.find(i) != ignore.end();
711 }
712
713 // Create the model
createTestModel_dim3_axis1()714 Model createTestModel_dim3_axis1() {
715 const std::vector<Operand> operands = {
716 {
717 .type = OperandType::TENSOR_FLOAT32,
718 .dimensions = {2, 12, 3},
719 .numberOfConsumers = 1,
720 .scale = 0.0f,
721 .zeroPoint = 0,
722 .lifetime = OperandLifeTime::MODEL_INPUT,
723 .location = {.poolIndex = 0, .offset = 0, .length = 0},
724 },
725 {
726 .type = OperandType::INT32,
727 .dimensions = {},
728 .numberOfConsumers = 1,
729 .scale = 0.0f,
730 .zeroPoint = 0,
731 .lifetime = OperandLifeTime::CONSTANT_COPY,
732 .location = {.poolIndex = 0, .offset = 0, .length = 4},
733 },
734 {
735 .type = OperandType::INT32,
736 .dimensions = {},
737 .numberOfConsumers = 1,
738 .scale = 0.0f,
739 .zeroPoint = 0,
740 .lifetime = OperandLifeTime::CONSTANT_COPY,
741 .location = {.poolIndex = 0, .offset = 4, .length = 4},
742 },
743 {
744 .type = OperandType::TENSOR_FLOAT32,
745 .dimensions = {2, 12, 3},
746 .numberOfConsumers = 0,
747 .scale = 0.0f,
748 .zeroPoint = 0,
749 .lifetime = OperandLifeTime::MODEL_OUTPUT,
750 .location = {.poolIndex = 0, .offset = 0, .length = 0},
751 }
752 };
753
754 const std::vector<Operation> operations = {
755 {
756 .type = OperationType::CHANNEL_SHUFFLE,
757 .inputs = {0, 1, 2},
758 .outputs = {3},
759 }
760 };
761
762 const std::vector<uint32_t> inputIndexes = {0};
763 const std::vector<uint32_t> outputIndexes = {3};
764 std::vector<uint8_t> operandValues = {
765 3, 0, 0, 0, 1, 0, 0, 0
766 };
767 const std::vector<hidl_memory> pools = {};
768
769 return {
770 .operands = operands,
771 .operations = operations,
772 .inputIndexes = inputIndexes,
773 .outputIndexes = outputIndexes,
774 .operandValues = operandValues,
775 .pools = pools,
776 };
777 }
778
is_ignored_dim3_axis1(int i)779 inline bool is_ignored_dim3_axis1(int i) {
780 static std::set<int> ignore = {};
781 return ignore.find(i) != ignore.end();
782 }
783
784 // Create the model
createTestModel_dim3_axis1_neg()785 Model createTestModel_dim3_axis1_neg() {
786 const std::vector<Operand> operands = {
787 {
788 .type = OperandType::TENSOR_FLOAT32,
789 .dimensions = {2, 12, 3},
790 .numberOfConsumers = 1,
791 .scale = 0.0f,
792 .zeroPoint = 0,
793 .lifetime = OperandLifeTime::MODEL_INPUT,
794 .location = {.poolIndex = 0, .offset = 0, .length = 0},
795 },
796 {
797 .type = OperandType::INT32,
798 .dimensions = {},
799 .numberOfConsumers = 1,
800 .scale = 0.0f,
801 .zeroPoint = 0,
802 .lifetime = OperandLifeTime::CONSTANT_COPY,
803 .location = {.poolIndex = 0, .offset = 0, .length = 4},
804 },
805 {
806 .type = OperandType::INT32,
807 .dimensions = {},
808 .numberOfConsumers = 1,
809 .scale = 0.0f,
810 .zeroPoint = 0,
811 .lifetime = OperandLifeTime::CONSTANT_COPY,
812 .location = {.poolIndex = 0, .offset = 4, .length = 4},
813 },
814 {
815 .type = OperandType::TENSOR_FLOAT32,
816 .dimensions = {2, 12, 3},
817 .numberOfConsumers = 0,
818 .scale = 0.0f,
819 .zeroPoint = 0,
820 .lifetime = OperandLifeTime::MODEL_OUTPUT,
821 .location = {.poolIndex = 0, .offset = 0, .length = 0},
822 }
823 };
824
825 const std::vector<Operation> operations = {
826 {
827 .type = OperationType::CHANNEL_SHUFFLE,
828 .inputs = {0, 1, 2},
829 .outputs = {3},
830 }
831 };
832
833 const std::vector<uint32_t> inputIndexes = {0};
834 const std::vector<uint32_t> outputIndexes = {3};
835 std::vector<uint8_t> operandValues = {
836 3, 0, 0, 0, 254, 255, 255, 255
837 };
838 const std::vector<hidl_memory> pools = {};
839
840 return {
841 .operands = operands,
842 .operations = operations,
843 .inputIndexes = inputIndexes,
844 .outputIndexes = outputIndexes,
845 .operandValues = operandValues,
846 .pools = pools,
847 };
848 }
849
is_ignored_dim3_axis1_neg(int i)850 inline bool is_ignored_dim3_axis1_neg(int i) {
851 static std::set<int> ignore = {};
852 return ignore.find(i) != ignore.end();
853 }
854
855 // Create the model
createTestModel_dim3_axis2()856 Model createTestModel_dim3_axis2() {
857 const std::vector<Operand> operands = {
858 {
859 .type = OperandType::TENSOR_FLOAT32,
860 .dimensions = {2, 3, 12},
861 .numberOfConsumers = 1,
862 .scale = 0.0f,
863 .zeroPoint = 0,
864 .lifetime = OperandLifeTime::MODEL_INPUT,
865 .location = {.poolIndex = 0, .offset = 0, .length = 0},
866 },
867 {
868 .type = OperandType::INT32,
869 .dimensions = {},
870 .numberOfConsumers = 1,
871 .scale = 0.0f,
872 .zeroPoint = 0,
873 .lifetime = OperandLifeTime::CONSTANT_COPY,
874 .location = {.poolIndex = 0, .offset = 0, .length = 4},
875 },
876 {
877 .type = OperandType::INT32,
878 .dimensions = {},
879 .numberOfConsumers = 1,
880 .scale = 0.0f,
881 .zeroPoint = 0,
882 .lifetime = OperandLifeTime::CONSTANT_COPY,
883 .location = {.poolIndex = 0, .offset = 4, .length = 4},
884 },
885 {
886 .type = OperandType::TENSOR_FLOAT32,
887 .dimensions = {2, 3, 12},
888 .numberOfConsumers = 0,
889 .scale = 0.0f,
890 .zeroPoint = 0,
891 .lifetime = OperandLifeTime::MODEL_OUTPUT,
892 .location = {.poolIndex = 0, .offset = 0, .length = 0},
893 }
894 };
895
896 const std::vector<Operation> operations = {
897 {
898 .type = OperationType::CHANNEL_SHUFFLE,
899 .inputs = {0, 1, 2},
900 .outputs = {3},
901 }
902 };
903
904 const std::vector<uint32_t> inputIndexes = {0};
905 const std::vector<uint32_t> outputIndexes = {3};
906 std::vector<uint8_t> operandValues = {
907 3, 0, 0, 0, 2, 0, 0, 0
908 };
909 const std::vector<hidl_memory> pools = {};
910
911 return {
912 .operands = operands,
913 .operations = operations,
914 .inputIndexes = inputIndexes,
915 .outputIndexes = outputIndexes,
916 .operandValues = operandValues,
917 .pools = pools,
918 };
919 }
920
is_ignored_dim3_axis2(int i)921 inline bool is_ignored_dim3_axis2(int i) {
922 static std::set<int> ignore = {};
923 return ignore.find(i) != ignore.end();
924 }
925
926 // Create the model
createTestModel_dim3_axis2_neg()927 Model createTestModel_dim3_axis2_neg() {
928 const std::vector<Operand> operands = {
929 {
930 .type = OperandType::TENSOR_FLOAT32,
931 .dimensions = {2, 3, 12},
932 .numberOfConsumers = 1,
933 .scale = 0.0f,
934 .zeroPoint = 0,
935 .lifetime = OperandLifeTime::MODEL_INPUT,
936 .location = {.poolIndex = 0, .offset = 0, .length = 0},
937 },
938 {
939 .type = OperandType::INT32,
940 .dimensions = {},
941 .numberOfConsumers = 1,
942 .scale = 0.0f,
943 .zeroPoint = 0,
944 .lifetime = OperandLifeTime::CONSTANT_COPY,
945 .location = {.poolIndex = 0, .offset = 0, .length = 4},
946 },
947 {
948 .type = OperandType::INT32,
949 .dimensions = {},
950 .numberOfConsumers = 1,
951 .scale = 0.0f,
952 .zeroPoint = 0,
953 .lifetime = OperandLifeTime::CONSTANT_COPY,
954 .location = {.poolIndex = 0, .offset = 4, .length = 4},
955 },
956 {
957 .type = OperandType::TENSOR_FLOAT32,
958 .dimensions = {2, 3, 12},
959 .numberOfConsumers = 0,
960 .scale = 0.0f,
961 .zeroPoint = 0,
962 .lifetime = OperandLifeTime::MODEL_OUTPUT,
963 .location = {.poolIndex = 0, .offset = 0, .length = 0},
964 }
965 };
966
967 const std::vector<Operation> operations = {
968 {
969 .type = OperationType::CHANNEL_SHUFFLE,
970 .inputs = {0, 1, 2},
971 .outputs = {3},
972 }
973 };
974
975 const std::vector<uint32_t> inputIndexes = {0};
976 const std::vector<uint32_t> outputIndexes = {3};
977 std::vector<uint8_t> operandValues = {
978 3, 0, 0, 0, 255, 255, 255, 255
979 };
980 const std::vector<hidl_memory> pools = {};
981
982 return {
983 .operands = operands,
984 .operations = operations,
985 .inputIndexes = inputIndexes,
986 .outputIndexes = outputIndexes,
987 .operandValues = operandValues,
988 .pools = pools,
989 };
990 }
991
is_ignored_dim3_axis2_neg(int i)992 inline bool is_ignored_dim3_axis2_neg(int i) {
993 static std::set<int> ignore = {};
994 return ignore.find(i) != ignore.end();
995 }
996
997 // Create the model
createTestModel_dim2_axis0()998 Model createTestModel_dim2_axis0() {
999 const std::vector<Operand> operands = {
1000 {
1001 .type = OperandType::TENSOR_FLOAT32,
1002 .dimensions = {12, 3},
1003 .numberOfConsumers = 1,
1004 .scale = 0.0f,
1005 .zeroPoint = 0,
1006 .lifetime = OperandLifeTime::MODEL_INPUT,
1007 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1008 },
1009 {
1010 .type = OperandType::INT32,
1011 .dimensions = {},
1012 .numberOfConsumers = 1,
1013 .scale = 0.0f,
1014 .zeroPoint = 0,
1015 .lifetime = OperandLifeTime::CONSTANT_COPY,
1016 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1017 },
1018 {
1019 .type = OperandType::INT32,
1020 .dimensions = {},
1021 .numberOfConsumers = 1,
1022 .scale = 0.0f,
1023 .zeroPoint = 0,
1024 .lifetime = OperandLifeTime::CONSTANT_COPY,
1025 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1026 },
1027 {
1028 .type = OperandType::TENSOR_FLOAT32,
1029 .dimensions = {12, 3},
1030 .numberOfConsumers = 0,
1031 .scale = 0.0f,
1032 .zeroPoint = 0,
1033 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1034 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1035 }
1036 };
1037
1038 const std::vector<Operation> operations = {
1039 {
1040 .type = OperationType::CHANNEL_SHUFFLE,
1041 .inputs = {0, 1, 2},
1042 .outputs = {3},
1043 }
1044 };
1045
1046 const std::vector<uint32_t> inputIndexes = {0};
1047 const std::vector<uint32_t> outputIndexes = {3};
1048 std::vector<uint8_t> operandValues = {
1049 3, 0, 0, 0, 0, 0, 0, 0
1050 };
1051 const std::vector<hidl_memory> pools = {};
1052
1053 return {
1054 .operands = operands,
1055 .operations = operations,
1056 .inputIndexes = inputIndexes,
1057 .outputIndexes = outputIndexes,
1058 .operandValues = operandValues,
1059 .pools = pools,
1060 };
1061 }
1062
is_ignored_dim2_axis0(int i)1063 inline bool is_ignored_dim2_axis0(int i) {
1064 static std::set<int> ignore = {};
1065 return ignore.find(i) != ignore.end();
1066 }
1067
1068 // Create the model
createTestModel_dim2_axis0_neg()1069 Model createTestModel_dim2_axis0_neg() {
1070 const std::vector<Operand> operands = {
1071 {
1072 .type = OperandType::TENSOR_FLOAT32,
1073 .dimensions = {12, 3},
1074 .numberOfConsumers = 1,
1075 .scale = 0.0f,
1076 .zeroPoint = 0,
1077 .lifetime = OperandLifeTime::MODEL_INPUT,
1078 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1079 },
1080 {
1081 .type = OperandType::INT32,
1082 .dimensions = {},
1083 .numberOfConsumers = 1,
1084 .scale = 0.0f,
1085 .zeroPoint = 0,
1086 .lifetime = OperandLifeTime::CONSTANT_COPY,
1087 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1088 },
1089 {
1090 .type = OperandType::INT32,
1091 .dimensions = {},
1092 .numberOfConsumers = 1,
1093 .scale = 0.0f,
1094 .zeroPoint = 0,
1095 .lifetime = OperandLifeTime::CONSTANT_COPY,
1096 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1097 },
1098 {
1099 .type = OperandType::TENSOR_FLOAT32,
1100 .dimensions = {12, 3},
1101 .numberOfConsumers = 0,
1102 .scale = 0.0f,
1103 .zeroPoint = 0,
1104 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1105 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1106 }
1107 };
1108
1109 const std::vector<Operation> operations = {
1110 {
1111 .type = OperationType::CHANNEL_SHUFFLE,
1112 .inputs = {0, 1, 2},
1113 .outputs = {3},
1114 }
1115 };
1116
1117 const std::vector<uint32_t> inputIndexes = {0};
1118 const std::vector<uint32_t> outputIndexes = {3};
1119 std::vector<uint8_t> operandValues = {
1120 3, 0, 0, 0, 254, 255, 255, 255
1121 };
1122 const std::vector<hidl_memory> pools = {};
1123
1124 return {
1125 .operands = operands,
1126 .operations = operations,
1127 .inputIndexes = inputIndexes,
1128 .outputIndexes = outputIndexes,
1129 .operandValues = operandValues,
1130 .pools = pools,
1131 };
1132 }
1133
is_ignored_dim2_axis0_neg(int i)1134 inline bool is_ignored_dim2_axis0_neg(int i) {
1135 static std::set<int> ignore = {};
1136 return ignore.find(i) != ignore.end();
1137 }
1138
1139 // Create the model
createTestModel_dim2_axis1()1140 Model createTestModel_dim2_axis1() {
1141 const std::vector<Operand> operands = {
1142 {
1143 .type = OperandType::TENSOR_FLOAT32,
1144 .dimensions = {3, 12},
1145 .numberOfConsumers = 1,
1146 .scale = 0.0f,
1147 .zeroPoint = 0,
1148 .lifetime = OperandLifeTime::MODEL_INPUT,
1149 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1150 },
1151 {
1152 .type = OperandType::INT32,
1153 .dimensions = {},
1154 .numberOfConsumers = 1,
1155 .scale = 0.0f,
1156 .zeroPoint = 0,
1157 .lifetime = OperandLifeTime::CONSTANT_COPY,
1158 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1159 },
1160 {
1161 .type = OperandType::INT32,
1162 .dimensions = {},
1163 .numberOfConsumers = 1,
1164 .scale = 0.0f,
1165 .zeroPoint = 0,
1166 .lifetime = OperandLifeTime::CONSTANT_COPY,
1167 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1168 },
1169 {
1170 .type = OperandType::TENSOR_FLOAT32,
1171 .dimensions = {3, 12},
1172 .numberOfConsumers = 0,
1173 .scale = 0.0f,
1174 .zeroPoint = 0,
1175 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1176 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1177 }
1178 };
1179
1180 const std::vector<Operation> operations = {
1181 {
1182 .type = OperationType::CHANNEL_SHUFFLE,
1183 .inputs = {0, 1, 2},
1184 .outputs = {3},
1185 }
1186 };
1187
1188 const std::vector<uint32_t> inputIndexes = {0};
1189 const std::vector<uint32_t> outputIndexes = {3};
1190 std::vector<uint8_t> operandValues = {
1191 3, 0, 0, 0, 1, 0, 0, 0
1192 };
1193 const std::vector<hidl_memory> pools = {};
1194
1195 return {
1196 .operands = operands,
1197 .operations = operations,
1198 .inputIndexes = inputIndexes,
1199 .outputIndexes = outputIndexes,
1200 .operandValues = operandValues,
1201 .pools = pools,
1202 };
1203 }
1204
is_ignored_dim2_axis1(int i)1205 inline bool is_ignored_dim2_axis1(int i) {
1206 static std::set<int> ignore = {};
1207 return ignore.find(i) != ignore.end();
1208 }
1209
1210 // Create the model
createTestModel_dim2_axis1_neg()1211 Model createTestModel_dim2_axis1_neg() {
1212 const std::vector<Operand> operands = {
1213 {
1214 .type = OperandType::TENSOR_FLOAT32,
1215 .dimensions = {3, 12},
1216 .numberOfConsumers = 1,
1217 .scale = 0.0f,
1218 .zeroPoint = 0,
1219 .lifetime = OperandLifeTime::MODEL_INPUT,
1220 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1221 },
1222 {
1223 .type = OperandType::INT32,
1224 .dimensions = {},
1225 .numberOfConsumers = 1,
1226 .scale = 0.0f,
1227 .zeroPoint = 0,
1228 .lifetime = OperandLifeTime::CONSTANT_COPY,
1229 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1230 },
1231 {
1232 .type = OperandType::INT32,
1233 .dimensions = {},
1234 .numberOfConsumers = 1,
1235 .scale = 0.0f,
1236 .zeroPoint = 0,
1237 .lifetime = OperandLifeTime::CONSTANT_COPY,
1238 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1239 },
1240 {
1241 .type = OperandType::TENSOR_FLOAT32,
1242 .dimensions = {3, 12},
1243 .numberOfConsumers = 0,
1244 .scale = 0.0f,
1245 .zeroPoint = 0,
1246 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1247 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1248 }
1249 };
1250
1251 const std::vector<Operation> operations = {
1252 {
1253 .type = OperationType::CHANNEL_SHUFFLE,
1254 .inputs = {0, 1, 2},
1255 .outputs = {3},
1256 }
1257 };
1258
1259 const std::vector<uint32_t> inputIndexes = {0};
1260 const std::vector<uint32_t> outputIndexes = {3};
1261 std::vector<uint8_t> operandValues = {
1262 3, 0, 0, 0, 255, 255, 255, 255
1263 };
1264 const std::vector<hidl_memory> pools = {};
1265
1266 return {
1267 .operands = operands,
1268 .operations = operations,
1269 .inputIndexes = inputIndexes,
1270 .outputIndexes = outputIndexes,
1271 .operandValues = operandValues,
1272 .pools = pools,
1273 };
1274 }
1275
is_ignored_dim2_axis1_neg(int i)1276 inline bool is_ignored_dim2_axis1_neg(int i) {
1277 static std::set<int> ignore = {};
1278 return ignore.find(i) != ignore.end();
1279 }
1280
1281 // Create the model
createTestModel_dim1_axis0()1282 Model createTestModel_dim1_axis0() {
1283 const std::vector<Operand> operands = {
1284 {
1285 .type = OperandType::TENSOR_FLOAT32,
1286 .dimensions = {12},
1287 .numberOfConsumers = 1,
1288 .scale = 0.0f,
1289 .zeroPoint = 0,
1290 .lifetime = OperandLifeTime::MODEL_INPUT,
1291 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1292 },
1293 {
1294 .type = OperandType::INT32,
1295 .dimensions = {},
1296 .numberOfConsumers = 1,
1297 .scale = 0.0f,
1298 .zeroPoint = 0,
1299 .lifetime = OperandLifeTime::CONSTANT_COPY,
1300 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1301 },
1302 {
1303 .type = OperandType::INT32,
1304 .dimensions = {},
1305 .numberOfConsumers = 1,
1306 .scale = 0.0f,
1307 .zeroPoint = 0,
1308 .lifetime = OperandLifeTime::CONSTANT_COPY,
1309 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1310 },
1311 {
1312 .type = OperandType::TENSOR_FLOAT32,
1313 .dimensions = {12},
1314 .numberOfConsumers = 0,
1315 .scale = 0.0f,
1316 .zeroPoint = 0,
1317 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1318 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1319 }
1320 };
1321
1322 const std::vector<Operation> operations = {
1323 {
1324 .type = OperationType::CHANNEL_SHUFFLE,
1325 .inputs = {0, 1, 2},
1326 .outputs = {3},
1327 }
1328 };
1329
1330 const std::vector<uint32_t> inputIndexes = {0};
1331 const std::vector<uint32_t> outputIndexes = {3};
1332 std::vector<uint8_t> operandValues = {
1333 3, 0, 0, 0, 0, 0, 0, 0
1334 };
1335 const std::vector<hidl_memory> pools = {};
1336
1337 return {
1338 .operands = operands,
1339 .operations = operations,
1340 .inputIndexes = inputIndexes,
1341 .outputIndexes = outputIndexes,
1342 .operandValues = operandValues,
1343 .pools = pools,
1344 };
1345 }
1346
is_ignored_dim1_axis0(int i)1347 inline bool is_ignored_dim1_axis0(int i) {
1348 static std::set<int> ignore = {};
1349 return ignore.find(i) != ignore.end();
1350 }
1351
1352 // Create the model
createTestModel_dim1_axis0_neg()1353 Model createTestModel_dim1_axis0_neg() {
1354 const std::vector<Operand> operands = {
1355 {
1356 .type = OperandType::TENSOR_FLOAT32,
1357 .dimensions = {12},
1358 .numberOfConsumers = 1,
1359 .scale = 0.0f,
1360 .zeroPoint = 0,
1361 .lifetime = OperandLifeTime::MODEL_INPUT,
1362 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1363 },
1364 {
1365 .type = OperandType::INT32,
1366 .dimensions = {},
1367 .numberOfConsumers = 1,
1368 .scale = 0.0f,
1369 .zeroPoint = 0,
1370 .lifetime = OperandLifeTime::CONSTANT_COPY,
1371 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1372 },
1373 {
1374 .type = OperandType::INT32,
1375 .dimensions = {},
1376 .numberOfConsumers = 1,
1377 .scale = 0.0f,
1378 .zeroPoint = 0,
1379 .lifetime = OperandLifeTime::CONSTANT_COPY,
1380 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1381 },
1382 {
1383 .type = OperandType::TENSOR_FLOAT32,
1384 .dimensions = {12},
1385 .numberOfConsumers = 0,
1386 .scale = 0.0f,
1387 .zeroPoint = 0,
1388 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1389 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1390 }
1391 };
1392
1393 const std::vector<Operation> operations = {
1394 {
1395 .type = OperationType::CHANNEL_SHUFFLE,
1396 .inputs = {0, 1, 2},
1397 .outputs = {3},
1398 }
1399 };
1400
1401 const std::vector<uint32_t> inputIndexes = {0};
1402 const std::vector<uint32_t> outputIndexes = {3};
1403 std::vector<uint8_t> operandValues = {
1404 3, 0, 0, 0, 255, 255, 255, 255
1405 };
1406 const std::vector<hidl_memory> pools = {};
1407
1408 return {
1409 .operands = operands,
1410 .operations = operations,
1411 .inputIndexes = inputIndexes,
1412 .outputIndexes = outputIndexes,
1413 .operandValues = operandValues,
1414 .pools = pools,
1415 };
1416 }
1417
is_ignored_dim1_axis0_neg(int i)1418 inline bool is_ignored_dim1_axis0_neg(int i) {
1419 static std::set<int> ignore = {};
1420 return ignore.find(i) != ignore.end();
1421 }
1422
1423 // Create the model
createTestModel_relaxed_dim4_axis0()1424 Model createTestModel_relaxed_dim4_axis0() {
1425 const std::vector<Operand> operands = {
1426 {
1427 .type = OperandType::TENSOR_FLOAT32,
1428 .dimensions = {12, 2, 2, 3},
1429 .numberOfConsumers = 1,
1430 .scale = 0.0f,
1431 .zeroPoint = 0,
1432 .lifetime = OperandLifeTime::MODEL_INPUT,
1433 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1434 },
1435 {
1436 .type = OperandType::INT32,
1437 .dimensions = {},
1438 .numberOfConsumers = 1,
1439 .scale = 0.0f,
1440 .zeroPoint = 0,
1441 .lifetime = OperandLifeTime::CONSTANT_COPY,
1442 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1443 },
1444 {
1445 .type = OperandType::INT32,
1446 .dimensions = {},
1447 .numberOfConsumers = 1,
1448 .scale = 0.0f,
1449 .zeroPoint = 0,
1450 .lifetime = OperandLifeTime::CONSTANT_COPY,
1451 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1452 },
1453 {
1454 .type = OperandType::TENSOR_FLOAT32,
1455 .dimensions = {12, 2, 2, 3},
1456 .numberOfConsumers = 0,
1457 .scale = 0.0f,
1458 .zeroPoint = 0,
1459 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1460 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1461 }
1462 };
1463
1464 const std::vector<Operation> operations = {
1465 {
1466 .type = OperationType::CHANNEL_SHUFFLE,
1467 .inputs = {0, 1, 2},
1468 .outputs = {3},
1469 }
1470 };
1471
1472 const std::vector<uint32_t> inputIndexes = {0};
1473 const std::vector<uint32_t> outputIndexes = {3};
1474 std::vector<uint8_t> operandValues = {
1475 3, 0, 0, 0, 0, 0, 0, 0
1476 };
1477 const std::vector<hidl_memory> pools = {};
1478
1479 return {
1480 .operands = operands,
1481 .operations = operations,
1482 .inputIndexes = inputIndexes,
1483 .outputIndexes = outputIndexes,
1484 .operandValues = operandValues,
1485 .pools = pools,
1486 .relaxComputationFloat32toFloat16 = true,
1487 };
1488 }
1489
is_ignored_relaxed_dim4_axis0(int i)1490 inline bool is_ignored_relaxed_dim4_axis0(int i) {
1491 static std::set<int> ignore = {};
1492 return ignore.find(i) != ignore.end();
1493 }
1494
1495 // Create the model
createTestModel_relaxed_dim4_axis0_neg()1496 Model createTestModel_relaxed_dim4_axis0_neg() {
1497 const std::vector<Operand> operands = {
1498 {
1499 .type = OperandType::TENSOR_FLOAT32,
1500 .dimensions = {12, 2, 2, 3},
1501 .numberOfConsumers = 1,
1502 .scale = 0.0f,
1503 .zeroPoint = 0,
1504 .lifetime = OperandLifeTime::MODEL_INPUT,
1505 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1506 },
1507 {
1508 .type = OperandType::INT32,
1509 .dimensions = {},
1510 .numberOfConsumers = 1,
1511 .scale = 0.0f,
1512 .zeroPoint = 0,
1513 .lifetime = OperandLifeTime::CONSTANT_COPY,
1514 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1515 },
1516 {
1517 .type = OperandType::INT32,
1518 .dimensions = {},
1519 .numberOfConsumers = 1,
1520 .scale = 0.0f,
1521 .zeroPoint = 0,
1522 .lifetime = OperandLifeTime::CONSTANT_COPY,
1523 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1524 },
1525 {
1526 .type = OperandType::TENSOR_FLOAT32,
1527 .dimensions = {12, 2, 2, 3},
1528 .numberOfConsumers = 0,
1529 .scale = 0.0f,
1530 .zeroPoint = 0,
1531 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1532 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1533 }
1534 };
1535
1536 const std::vector<Operation> operations = {
1537 {
1538 .type = OperationType::CHANNEL_SHUFFLE,
1539 .inputs = {0, 1, 2},
1540 .outputs = {3},
1541 }
1542 };
1543
1544 const std::vector<uint32_t> inputIndexes = {0};
1545 const std::vector<uint32_t> outputIndexes = {3};
1546 std::vector<uint8_t> operandValues = {
1547 3, 0, 0, 0, 252, 255, 255, 255
1548 };
1549 const std::vector<hidl_memory> pools = {};
1550
1551 return {
1552 .operands = operands,
1553 .operations = operations,
1554 .inputIndexes = inputIndexes,
1555 .outputIndexes = outputIndexes,
1556 .operandValues = operandValues,
1557 .pools = pools,
1558 .relaxComputationFloat32toFloat16 = true,
1559 };
1560 }
1561
is_ignored_relaxed_dim4_axis0_neg(int i)1562 inline bool is_ignored_relaxed_dim4_axis0_neg(int i) {
1563 static std::set<int> ignore = {};
1564 return ignore.find(i) != ignore.end();
1565 }
1566
1567 // Create the model
createTestModel_relaxed_dim4_axis1()1568 Model createTestModel_relaxed_dim4_axis1() {
1569 const std::vector<Operand> operands = {
1570 {
1571 .type = OperandType::TENSOR_FLOAT32,
1572 .dimensions = {2, 12, 2, 3},
1573 .numberOfConsumers = 1,
1574 .scale = 0.0f,
1575 .zeroPoint = 0,
1576 .lifetime = OperandLifeTime::MODEL_INPUT,
1577 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1578 },
1579 {
1580 .type = OperandType::INT32,
1581 .dimensions = {},
1582 .numberOfConsumers = 1,
1583 .scale = 0.0f,
1584 .zeroPoint = 0,
1585 .lifetime = OperandLifeTime::CONSTANT_COPY,
1586 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1587 },
1588 {
1589 .type = OperandType::INT32,
1590 .dimensions = {},
1591 .numberOfConsumers = 1,
1592 .scale = 0.0f,
1593 .zeroPoint = 0,
1594 .lifetime = OperandLifeTime::CONSTANT_COPY,
1595 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1596 },
1597 {
1598 .type = OperandType::TENSOR_FLOAT32,
1599 .dimensions = {2, 12, 2, 3},
1600 .numberOfConsumers = 0,
1601 .scale = 0.0f,
1602 .zeroPoint = 0,
1603 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1604 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1605 }
1606 };
1607
1608 const std::vector<Operation> operations = {
1609 {
1610 .type = OperationType::CHANNEL_SHUFFLE,
1611 .inputs = {0, 1, 2},
1612 .outputs = {3},
1613 }
1614 };
1615
1616 const std::vector<uint32_t> inputIndexes = {0};
1617 const std::vector<uint32_t> outputIndexes = {3};
1618 std::vector<uint8_t> operandValues = {
1619 3, 0, 0, 0, 1, 0, 0, 0
1620 };
1621 const std::vector<hidl_memory> pools = {};
1622
1623 return {
1624 .operands = operands,
1625 .operations = operations,
1626 .inputIndexes = inputIndexes,
1627 .outputIndexes = outputIndexes,
1628 .operandValues = operandValues,
1629 .pools = pools,
1630 .relaxComputationFloat32toFloat16 = true,
1631 };
1632 }
1633
is_ignored_relaxed_dim4_axis1(int i)1634 inline bool is_ignored_relaxed_dim4_axis1(int i) {
1635 static std::set<int> ignore = {};
1636 return ignore.find(i) != ignore.end();
1637 }
1638
1639 // Create the model
createTestModel_relaxed_dim4_axis1_neg()1640 Model createTestModel_relaxed_dim4_axis1_neg() {
1641 const std::vector<Operand> operands = {
1642 {
1643 .type = OperandType::TENSOR_FLOAT32,
1644 .dimensions = {2, 12, 2, 3},
1645 .numberOfConsumers = 1,
1646 .scale = 0.0f,
1647 .zeroPoint = 0,
1648 .lifetime = OperandLifeTime::MODEL_INPUT,
1649 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1650 },
1651 {
1652 .type = OperandType::INT32,
1653 .dimensions = {},
1654 .numberOfConsumers = 1,
1655 .scale = 0.0f,
1656 .zeroPoint = 0,
1657 .lifetime = OperandLifeTime::CONSTANT_COPY,
1658 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1659 },
1660 {
1661 .type = OperandType::INT32,
1662 .dimensions = {},
1663 .numberOfConsumers = 1,
1664 .scale = 0.0f,
1665 .zeroPoint = 0,
1666 .lifetime = OperandLifeTime::CONSTANT_COPY,
1667 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1668 },
1669 {
1670 .type = OperandType::TENSOR_FLOAT32,
1671 .dimensions = {2, 12, 2, 3},
1672 .numberOfConsumers = 0,
1673 .scale = 0.0f,
1674 .zeroPoint = 0,
1675 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1676 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1677 }
1678 };
1679
1680 const std::vector<Operation> operations = {
1681 {
1682 .type = OperationType::CHANNEL_SHUFFLE,
1683 .inputs = {0, 1, 2},
1684 .outputs = {3},
1685 }
1686 };
1687
1688 const std::vector<uint32_t> inputIndexes = {0};
1689 const std::vector<uint32_t> outputIndexes = {3};
1690 std::vector<uint8_t> operandValues = {
1691 3, 0, 0, 0, 253, 255, 255, 255
1692 };
1693 const std::vector<hidl_memory> pools = {};
1694
1695 return {
1696 .operands = operands,
1697 .operations = operations,
1698 .inputIndexes = inputIndexes,
1699 .outputIndexes = outputIndexes,
1700 .operandValues = operandValues,
1701 .pools = pools,
1702 .relaxComputationFloat32toFloat16 = true,
1703 };
1704 }
1705
is_ignored_relaxed_dim4_axis1_neg(int i)1706 inline bool is_ignored_relaxed_dim4_axis1_neg(int i) {
1707 static std::set<int> ignore = {};
1708 return ignore.find(i) != ignore.end();
1709 }
1710
1711 // Create the model
createTestModel_relaxed_dim4_axis2()1712 Model createTestModel_relaxed_dim4_axis2() {
1713 const std::vector<Operand> operands = {
1714 {
1715 .type = OperandType::TENSOR_FLOAT32,
1716 .dimensions = {2, 2, 12, 3},
1717 .numberOfConsumers = 1,
1718 .scale = 0.0f,
1719 .zeroPoint = 0,
1720 .lifetime = OperandLifeTime::MODEL_INPUT,
1721 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1722 },
1723 {
1724 .type = OperandType::INT32,
1725 .dimensions = {},
1726 .numberOfConsumers = 1,
1727 .scale = 0.0f,
1728 .zeroPoint = 0,
1729 .lifetime = OperandLifeTime::CONSTANT_COPY,
1730 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1731 },
1732 {
1733 .type = OperandType::INT32,
1734 .dimensions = {},
1735 .numberOfConsumers = 1,
1736 .scale = 0.0f,
1737 .zeroPoint = 0,
1738 .lifetime = OperandLifeTime::CONSTANT_COPY,
1739 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1740 },
1741 {
1742 .type = OperandType::TENSOR_FLOAT32,
1743 .dimensions = {2, 2, 12, 3},
1744 .numberOfConsumers = 0,
1745 .scale = 0.0f,
1746 .zeroPoint = 0,
1747 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1748 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1749 }
1750 };
1751
1752 const std::vector<Operation> operations = {
1753 {
1754 .type = OperationType::CHANNEL_SHUFFLE,
1755 .inputs = {0, 1, 2},
1756 .outputs = {3},
1757 }
1758 };
1759
1760 const std::vector<uint32_t> inputIndexes = {0};
1761 const std::vector<uint32_t> outputIndexes = {3};
1762 std::vector<uint8_t> operandValues = {
1763 3, 0, 0, 0, 2, 0, 0, 0
1764 };
1765 const std::vector<hidl_memory> pools = {};
1766
1767 return {
1768 .operands = operands,
1769 .operations = operations,
1770 .inputIndexes = inputIndexes,
1771 .outputIndexes = outputIndexes,
1772 .operandValues = operandValues,
1773 .pools = pools,
1774 .relaxComputationFloat32toFloat16 = true,
1775 };
1776 }
1777
is_ignored_relaxed_dim4_axis2(int i)1778 inline bool is_ignored_relaxed_dim4_axis2(int i) {
1779 static std::set<int> ignore = {};
1780 return ignore.find(i) != ignore.end();
1781 }
1782
1783 // Create the model
createTestModel_relaxed_dim4_axis2_neg()1784 Model createTestModel_relaxed_dim4_axis2_neg() {
1785 const std::vector<Operand> operands = {
1786 {
1787 .type = OperandType::TENSOR_FLOAT32,
1788 .dimensions = {2, 2, 12, 3},
1789 .numberOfConsumers = 1,
1790 .scale = 0.0f,
1791 .zeroPoint = 0,
1792 .lifetime = OperandLifeTime::MODEL_INPUT,
1793 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1794 },
1795 {
1796 .type = OperandType::INT32,
1797 .dimensions = {},
1798 .numberOfConsumers = 1,
1799 .scale = 0.0f,
1800 .zeroPoint = 0,
1801 .lifetime = OperandLifeTime::CONSTANT_COPY,
1802 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1803 },
1804 {
1805 .type = OperandType::INT32,
1806 .dimensions = {},
1807 .numberOfConsumers = 1,
1808 .scale = 0.0f,
1809 .zeroPoint = 0,
1810 .lifetime = OperandLifeTime::CONSTANT_COPY,
1811 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1812 },
1813 {
1814 .type = OperandType::TENSOR_FLOAT32,
1815 .dimensions = {2, 2, 12, 3},
1816 .numberOfConsumers = 0,
1817 .scale = 0.0f,
1818 .zeroPoint = 0,
1819 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1820 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1821 }
1822 };
1823
1824 const std::vector<Operation> operations = {
1825 {
1826 .type = OperationType::CHANNEL_SHUFFLE,
1827 .inputs = {0, 1, 2},
1828 .outputs = {3},
1829 }
1830 };
1831
1832 const std::vector<uint32_t> inputIndexes = {0};
1833 const std::vector<uint32_t> outputIndexes = {3};
1834 std::vector<uint8_t> operandValues = {
1835 3, 0, 0, 0, 254, 255, 255, 255
1836 };
1837 const std::vector<hidl_memory> pools = {};
1838
1839 return {
1840 .operands = operands,
1841 .operations = operations,
1842 .inputIndexes = inputIndexes,
1843 .outputIndexes = outputIndexes,
1844 .operandValues = operandValues,
1845 .pools = pools,
1846 .relaxComputationFloat32toFloat16 = true,
1847 };
1848 }
1849
is_ignored_relaxed_dim4_axis2_neg(int i)1850 inline bool is_ignored_relaxed_dim4_axis2_neg(int i) {
1851 static std::set<int> ignore = {};
1852 return ignore.find(i) != ignore.end();
1853 }
1854
1855 // Create the model
createTestModel_relaxed_dim4_axis3()1856 Model createTestModel_relaxed_dim4_axis3() {
1857 const std::vector<Operand> operands = {
1858 {
1859 .type = OperandType::TENSOR_FLOAT32,
1860 .dimensions = {2, 2, 3, 12},
1861 .numberOfConsumers = 1,
1862 .scale = 0.0f,
1863 .zeroPoint = 0,
1864 .lifetime = OperandLifeTime::MODEL_INPUT,
1865 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1866 },
1867 {
1868 .type = OperandType::INT32,
1869 .dimensions = {},
1870 .numberOfConsumers = 1,
1871 .scale = 0.0f,
1872 .zeroPoint = 0,
1873 .lifetime = OperandLifeTime::CONSTANT_COPY,
1874 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1875 },
1876 {
1877 .type = OperandType::INT32,
1878 .dimensions = {},
1879 .numberOfConsumers = 1,
1880 .scale = 0.0f,
1881 .zeroPoint = 0,
1882 .lifetime = OperandLifeTime::CONSTANT_COPY,
1883 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1884 },
1885 {
1886 .type = OperandType::TENSOR_FLOAT32,
1887 .dimensions = {2, 2, 3, 12},
1888 .numberOfConsumers = 0,
1889 .scale = 0.0f,
1890 .zeroPoint = 0,
1891 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1892 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1893 }
1894 };
1895
1896 const std::vector<Operation> operations = {
1897 {
1898 .type = OperationType::CHANNEL_SHUFFLE,
1899 .inputs = {0, 1, 2},
1900 .outputs = {3},
1901 }
1902 };
1903
1904 const std::vector<uint32_t> inputIndexes = {0};
1905 const std::vector<uint32_t> outputIndexes = {3};
1906 std::vector<uint8_t> operandValues = {
1907 3, 0, 0, 0, 3, 0, 0, 0
1908 };
1909 const std::vector<hidl_memory> pools = {};
1910
1911 return {
1912 .operands = operands,
1913 .operations = operations,
1914 .inputIndexes = inputIndexes,
1915 .outputIndexes = outputIndexes,
1916 .operandValues = operandValues,
1917 .pools = pools,
1918 .relaxComputationFloat32toFloat16 = true,
1919 };
1920 }
1921
is_ignored_relaxed_dim4_axis3(int i)1922 inline bool is_ignored_relaxed_dim4_axis3(int i) {
1923 static std::set<int> ignore = {};
1924 return ignore.find(i) != ignore.end();
1925 }
1926
1927 // Create the model
createTestModel_relaxed_dim4_axis3_neg()1928 Model createTestModel_relaxed_dim4_axis3_neg() {
1929 const std::vector<Operand> operands = {
1930 {
1931 .type = OperandType::TENSOR_FLOAT32,
1932 .dimensions = {2, 2, 3, 12},
1933 .numberOfConsumers = 1,
1934 .scale = 0.0f,
1935 .zeroPoint = 0,
1936 .lifetime = OperandLifeTime::MODEL_INPUT,
1937 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1938 },
1939 {
1940 .type = OperandType::INT32,
1941 .dimensions = {},
1942 .numberOfConsumers = 1,
1943 .scale = 0.0f,
1944 .zeroPoint = 0,
1945 .lifetime = OperandLifeTime::CONSTANT_COPY,
1946 .location = {.poolIndex = 0, .offset = 0, .length = 4},
1947 },
1948 {
1949 .type = OperandType::INT32,
1950 .dimensions = {},
1951 .numberOfConsumers = 1,
1952 .scale = 0.0f,
1953 .zeroPoint = 0,
1954 .lifetime = OperandLifeTime::CONSTANT_COPY,
1955 .location = {.poolIndex = 0, .offset = 4, .length = 4},
1956 },
1957 {
1958 .type = OperandType::TENSOR_FLOAT32,
1959 .dimensions = {2, 2, 3, 12},
1960 .numberOfConsumers = 0,
1961 .scale = 0.0f,
1962 .zeroPoint = 0,
1963 .lifetime = OperandLifeTime::MODEL_OUTPUT,
1964 .location = {.poolIndex = 0, .offset = 0, .length = 0},
1965 }
1966 };
1967
1968 const std::vector<Operation> operations = {
1969 {
1970 .type = OperationType::CHANNEL_SHUFFLE,
1971 .inputs = {0, 1, 2},
1972 .outputs = {3},
1973 }
1974 };
1975
1976 const std::vector<uint32_t> inputIndexes = {0};
1977 const std::vector<uint32_t> outputIndexes = {3};
1978 std::vector<uint8_t> operandValues = {
1979 3, 0, 0, 0, 255, 255, 255, 255
1980 };
1981 const std::vector<hidl_memory> pools = {};
1982
1983 return {
1984 .operands = operands,
1985 .operations = operations,
1986 .inputIndexes = inputIndexes,
1987 .outputIndexes = outputIndexes,
1988 .operandValues = operandValues,
1989 .pools = pools,
1990 .relaxComputationFloat32toFloat16 = true,
1991 };
1992 }
1993
is_ignored_relaxed_dim4_axis3_neg(int i)1994 inline bool is_ignored_relaxed_dim4_axis3_neg(int i) {
1995 static std::set<int> ignore = {};
1996 return ignore.find(i) != ignore.end();
1997 }
1998
1999 // Create the model
createTestModel_relaxed_dim3_axis0()2000 Model createTestModel_relaxed_dim3_axis0() {
2001 const std::vector<Operand> operands = {
2002 {
2003 .type = OperandType::TENSOR_FLOAT32,
2004 .dimensions = {12, 2, 3},
2005 .numberOfConsumers = 1,
2006 .scale = 0.0f,
2007 .zeroPoint = 0,
2008 .lifetime = OperandLifeTime::MODEL_INPUT,
2009 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2010 },
2011 {
2012 .type = OperandType::INT32,
2013 .dimensions = {},
2014 .numberOfConsumers = 1,
2015 .scale = 0.0f,
2016 .zeroPoint = 0,
2017 .lifetime = OperandLifeTime::CONSTANT_COPY,
2018 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2019 },
2020 {
2021 .type = OperandType::INT32,
2022 .dimensions = {},
2023 .numberOfConsumers = 1,
2024 .scale = 0.0f,
2025 .zeroPoint = 0,
2026 .lifetime = OperandLifeTime::CONSTANT_COPY,
2027 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2028 },
2029 {
2030 .type = OperandType::TENSOR_FLOAT32,
2031 .dimensions = {12, 2, 3},
2032 .numberOfConsumers = 0,
2033 .scale = 0.0f,
2034 .zeroPoint = 0,
2035 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2036 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2037 }
2038 };
2039
2040 const std::vector<Operation> operations = {
2041 {
2042 .type = OperationType::CHANNEL_SHUFFLE,
2043 .inputs = {0, 1, 2},
2044 .outputs = {3},
2045 }
2046 };
2047
2048 const std::vector<uint32_t> inputIndexes = {0};
2049 const std::vector<uint32_t> outputIndexes = {3};
2050 std::vector<uint8_t> operandValues = {
2051 3, 0, 0, 0, 0, 0, 0, 0
2052 };
2053 const std::vector<hidl_memory> pools = {};
2054
2055 return {
2056 .operands = operands,
2057 .operations = operations,
2058 .inputIndexes = inputIndexes,
2059 .outputIndexes = outputIndexes,
2060 .operandValues = operandValues,
2061 .pools = pools,
2062 .relaxComputationFloat32toFloat16 = true,
2063 };
2064 }
2065
is_ignored_relaxed_dim3_axis0(int i)2066 inline bool is_ignored_relaxed_dim3_axis0(int i) {
2067 static std::set<int> ignore = {};
2068 return ignore.find(i) != ignore.end();
2069 }
2070
2071 // Create the model
createTestModel_relaxed_dim3_axis0_neg()2072 Model createTestModel_relaxed_dim3_axis0_neg() {
2073 const std::vector<Operand> operands = {
2074 {
2075 .type = OperandType::TENSOR_FLOAT32,
2076 .dimensions = {12, 2, 3},
2077 .numberOfConsumers = 1,
2078 .scale = 0.0f,
2079 .zeroPoint = 0,
2080 .lifetime = OperandLifeTime::MODEL_INPUT,
2081 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2082 },
2083 {
2084 .type = OperandType::INT32,
2085 .dimensions = {},
2086 .numberOfConsumers = 1,
2087 .scale = 0.0f,
2088 .zeroPoint = 0,
2089 .lifetime = OperandLifeTime::CONSTANT_COPY,
2090 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2091 },
2092 {
2093 .type = OperandType::INT32,
2094 .dimensions = {},
2095 .numberOfConsumers = 1,
2096 .scale = 0.0f,
2097 .zeroPoint = 0,
2098 .lifetime = OperandLifeTime::CONSTANT_COPY,
2099 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2100 },
2101 {
2102 .type = OperandType::TENSOR_FLOAT32,
2103 .dimensions = {12, 2, 3},
2104 .numberOfConsumers = 0,
2105 .scale = 0.0f,
2106 .zeroPoint = 0,
2107 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2108 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2109 }
2110 };
2111
2112 const std::vector<Operation> operations = {
2113 {
2114 .type = OperationType::CHANNEL_SHUFFLE,
2115 .inputs = {0, 1, 2},
2116 .outputs = {3},
2117 }
2118 };
2119
2120 const std::vector<uint32_t> inputIndexes = {0};
2121 const std::vector<uint32_t> outputIndexes = {3};
2122 std::vector<uint8_t> operandValues = {
2123 3, 0, 0, 0, 253, 255, 255, 255
2124 };
2125 const std::vector<hidl_memory> pools = {};
2126
2127 return {
2128 .operands = operands,
2129 .operations = operations,
2130 .inputIndexes = inputIndexes,
2131 .outputIndexes = outputIndexes,
2132 .operandValues = operandValues,
2133 .pools = pools,
2134 .relaxComputationFloat32toFloat16 = true,
2135 };
2136 }
2137
is_ignored_relaxed_dim3_axis0_neg(int i)2138 inline bool is_ignored_relaxed_dim3_axis0_neg(int i) {
2139 static std::set<int> ignore = {};
2140 return ignore.find(i) != ignore.end();
2141 }
2142
2143 // Create the model
createTestModel_relaxed_dim3_axis1()2144 Model createTestModel_relaxed_dim3_axis1() {
2145 const std::vector<Operand> operands = {
2146 {
2147 .type = OperandType::TENSOR_FLOAT32,
2148 .dimensions = {2, 12, 3},
2149 .numberOfConsumers = 1,
2150 .scale = 0.0f,
2151 .zeroPoint = 0,
2152 .lifetime = OperandLifeTime::MODEL_INPUT,
2153 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2154 },
2155 {
2156 .type = OperandType::INT32,
2157 .dimensions = {},
2158 .numberOfConsumers = 1,
2159 .scale = 0.0f,
2160 .zeroPoint = 0,
2161 .lifetime = OperandLifeTime::CONSTANT_COPY,
2162 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2163 },
2164 {
2165 .type = OperandType::INT32,
2166 .dimensions = {},
2167 .numberOfConsumers = 1,
2168 .scale = 0.0f,
2169 .zeroPoint = 0,
2170 .lifetime = OperandLifeTime::CONSTANT_COPY,
2171 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2172 },
2173 {
2174 .type = OperandType::TENSOR_FLOAT32,
2175 .dimensions = {2, 12, 3},
2176 .numberOfConsumers = 0,
2177 .scale = 0.0f,
2178 .zeroPoint = 0,
2179 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2180 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2181 }
2182 };
2183
2184 const std::vector<Operation> operations = {
2185 {
2186 .type = OperationType::CHANNEL_SHUFFLE,
2187 .inputs = {0, 1, 2},
2188 .outputs = {3},
2189 }
2190 };
2191
2192 const std::vector<uint32_t> inputIndexes = {0};
2193 const std::vector<uint32_t> outputIndexes = {3};
2194 std::vector<uint8_t> operandValues = {
2195 3, 0, 0, 0, 1, 0, 0, 0
2196 };
2197 const std::vector<hidl_memory> pools = {};
2198
2199 return {
2200 .operands = operands,
2201 .operations = operations,
2202 .inputIndexes = inputIndexes,
2203 .outputIndexes = outputIndexes,
2204 .operandValues = operandValues,
2205 .pools = pools,
2206 .relaxComputationFloat32toFloat16 = true,
2207 };
2208 }
2209
is_ignored_relaxed_dim3_axis1(int i)2210 inline bool is_ignored_relaxed_dim3_axis1(int i) {
2211 static std::set<int> ignore = {};
2212 return ignore.find(i) != ignore.end();
2213 }
2214
2215 // Create the model
createTestModel_relaxed_dim3_axis1_neg()2216 Model createTestModel_relaxed_dim3_axis1_neg() {
2217 const std::vector<Operand> operands = {
2218 {
2219 .type = OperandType::TENSOR_FLOAT32,
2220 .dimensions = {2, 12, 3},
2221 .numberOfConsumers = 1,
2222 .scale = 0.0f,
2223 .zeroPoint = 0,
2224 .lifetime = OperandLifeTime::MODEL_INPUT,
2225 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2226 },
2227 {
2228 .type = OperandType::INT32,
2229 .dimensions = {},
2230 .numberOfConsumers = 1,
2231 .scale = 0.0f,
2232 .zeroPoint = 0,
2233 .lifetime = OperandLifeTime::CONSTANT_COPY,
2234 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2235 },
2236 {
2237 .type = OperandType::INT32,
2238 .dimensions = {},
2239 .numberOfConsumers = 1,
2240 .scale = 0.0f,
2241 .zeroPoint = 0,
2242 .lifetime = OperandLifeTime::CONSTANT_COPY,
2243 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2244 },
2245 {
2246 .type = OperandType::TENSOR_FLOAT32,
2247 .dimensions = {2, 12, 3},
2248 .numberOfConsumers = 0,
2249 .scale = 0.0f,
2250 .zeroPoint = 0,
2251 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2252 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2253 }
2254 };
2255
2256 const std::vector<Operation> operations = {
2257 {
2258 .type = OperationType::CHANNEL_SHUFFLE,
2259 .inputs = {0, 1, 2},
2260 .outputs = {3},
2261 }
2262 };
2263
2264 const std::vector<uint32_t> inputIndexes = {0};
2265 const std::vector<uint32_t> outputIndexes = {3};
2266 std::vector<uint8_t> operandValues = {
2267 3, 0, 0, 0, 254, 255, 255, 255
2268 };
2269 const std::vector<hidl_memory> pools = {};
2270
2271 return {
2272 .operands = operands,
2273 .operations = operations,
2274 .inputIndexes = inputIndexes,
2275 .outputIndexes = outputIndexes,
2276 .operandValues = operandValues,
2277 .pools = pools,
2278 .relaxComputationFloat32toFloat16 = true,
2279 };
2280 }
2281
is_ignored_relaxed_dim3_axis1_neg(int i)2282 inline bool is_ignored_relaxed_dim3_axis1_neg(int i) {
2283 static std::set<int> ignore = {};
2284 return ignore.find(i) != ignore.end();
2285 }
2286
2287 // Create the model
createTestModel_relaxed_dim3_axis2()2288 Model createTestModel_relaxed_dim3_axis2() {
2289 const std::vector<Operand> operands = {
2290 {
2291 .type = OperandType::TENSOR_FLOAT32,
2292 .dimensions = {2, 3, 12},
2293 .numberOfConsumers = 1,
2294 .scale = 0.0f,
2295 .zeroPoint = 0,
2296 .lifetime = OperandLifeTime::MODEL_INPUT,
2297 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2298 },
2299 {
2300 .type = OperandType::INT32,
2301 .dimensions = {},
2302 .numberOfConsumers = 1,
2303 .scale = 0.0f,
2304 .zeroPoint = 0,
2305 .lifetime = OperandLifeTime::CONSTANT_COPY,
2306 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2307 },
2308 {
2309 .type = OperandType::INT32,
2310 .dimensions = {},
2311 .numberOfConsumers = 1,
2312 .scale = 0.0f,
2313 .zeroPoint = 0,
2314 .lifetime = OperandLifeTime::CONSTANT_COPY,
2315 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2316 },
2317 {
2318 .type = OperandType::TENSOR_FLOAT32,
2319 .dimensions = {2, 3, 12},
2320 .numberOfConsumers = 0,
2321 .scale = 0.0f,
2322 .zeroPoint = 0,
2323 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2324 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2325 }
2326 };
2327
2328 const std::vector<Operation> operations = {
2329 {
2330 .type = OperationType::CHANNEL_SHUFFLE,
2331 .inputs = {0, 1, 2},
2332 .outputs = {3},
2333 }
2334 };
2335
2336 const std::vector<uint32_t> inputIndexes = {0};
2337 const std::vector<uint32_t> outputIndexes = {3};
2338 std::vector<uint8_t> operandValues = {
2339 3, 0, 0, 0, 2, 0, 0, 0
2340 };
2341 const std::vector<hidl_memory> pools = {};
2342
2343 return {
2344 .operands = operands,
2345 .operations = operations,
2346 .inputIndexes = inputIndexes,
2347 .outputIndexes = outputIndexes,
2348 .operandValues = operandValues,
2349 .pools = pools,
2350 .relaxComputationFloat32toFloat16 = true,
2351 };
2352 }
2353
is_ignored_relaxed_dim3_axis2(int i)2354 inline bool is_ignored_relaxed_dim3_axis2(int i) {
2355 static std::set<int> ignore = {};
2356 return ignore.find(i) != ignore.end();
2357 }
2358
2359 // Create the model
createTestModel_relaxed_dim3_axis2_neg()2360 Model createTestModel_relaxed_dim3_axis2_neg() {
2361 const std::vector<Operand> operands = {
2362 {
2363 .type = OperandType::TENSOR_FLOAT32,
2364 .dimensions = {2, 3, 12},
2365 .numberOfConsumers = 1,
2366 .scale = 0.0f,
2367 .zeroPoint = 0,
2368 .lifetime = OperandLifeTime::MODEL_INPUT,
2369 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2370 },
2371 {
2372 .type = OperandType::INT32,
2373 .dimensions = {},
2374 .numberOfConsumers = 1,
2375 .scale = 0.0f,
2376 .zeroPoint = 0,
2377 .lifetime = OperandLifeTime::CONSTANT_COPY,
2378 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2379 },
2380 {
2381 .type = OperandType::INT32,
2382 .dimensions = {},
2383 .numberOfConsumers = 1,
2384 .scale = 0.0f,
2385 .zeroPoint = 0,
2386 .lifetime = OperandLifeTime::CONSTANT_COPY,
2387 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2388 },
2389 {
2390 .type = OperandType::TENSOR_FLOAT32,
2391 .dimensions = {2, 3, 12},
2392 .numberOfConsumers = 0,
2393 .scale = 0.0f,
2394 .zeroPoint = 0,
2395 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2396 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2397 }
2398 };
2399
2400 const std::vector<Operation> operations = {
2401 {
2402 .type = OperationType::CHANNEL_SHUFFLE,
2403 .inputs = {0, 1, 2},
2404 .outputs = {3},
2405 }
2406 };
2407
2408 const std::vector<uint32_t> inputIndexes = {0};
2409 const std::vector<uint32_t> outputIndexes = {3};
2410 std::vector<uint8_t> operandValues = {
2411 3, 0, 0, 0, 255, 255, 255, 255
2412 };
2413 const std::vector<hidl_memory> pools = {};
2414
2415 return {
2416 .operands = operands,
2417 .operations = operations,
2418 .inputIndexes = inputIndexes,
2419 .outputIndexes = outputIndexes,
2420 .operandValues = operandValues,
2421 .pools = pools,
2422 .relaxComputationFloat32toFloat16 = true,
2423 };
2424 }
2425
is_ignored_relaxed_dim3_axis2_neg(int i)2426 inline bool is_ignored_relaxed_dim3_axis2_neg(int i) {
2427 static std::set<int> ignore = {};
2428 return ignore.find(i) != ignore.end();
2429 }
2430
2431 // Create the model
createTestModel_relaxed_dim2_axis0()2432 Model createTestModel_relaxed_dim2_axis0() {
2433 const std::vector<Operand> operands = {
2434 {
2435 .type = OperandType::TENSOR_FLOAT32,
2436 .dimensions = {12, 3},
2437 .numberOfConsumers = 1,
2438 .scale = 0.0f,
2439 .zeroPoint = 0,
2440 .lifetime = OperandLifeTime::MODEL_INPUT,
2441 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2442 },
2443 {
2444 .type = OperandType::INT32,
2445 .dimensions = {},
2446 .numberOfConsumers = 1,
2447 .scale = 0.0f,
2448 .zeroPoint = 0,
2449 .lifetime = OperandLifeTime::CONSTANT_COPY,
2450 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2451 },
2452 {
2453 .type = OperandType::INT32,
2454 .dimensions = {},
2455 .numberOfConsumers = 1,
2456 .scale = 0.0f,
2457 .zeroPoint = 0,
2458 .lifetime = OperandLifeTime::CONSTANT_COPY,
2459 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2460 },
2461 {
2462 .type = OperandType::TENSOR_FLOAT32,
2463 .dimensions = {12, 3},
2464 .numberOfConsumers = 0,
2465 .scale = 0.0f,
2466 .zeroPoint = 0,
2467 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2468 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2469 }
2470 };
2471
2472 const std::vector<Operation> operations = {
2473 {
2474 .type = OperationType::CHANNEL_SHUFFLE,
2475 .inputs = {0, 1, 2},
2476 .outputs = {3},
2477 }
2478 };
2479
2480 const std::vector<uint32_t> inputIndexes = {0};
2481 const std::vector<uint32_t> outputIndexes = {3};
2482 std::vector<uint8_t> operandValues = {
2483 3, 0, 0, 0, 0, 0, 0, 0
2484 };
2485 const std::vector<hidl_memory> pools = {};
2486
2487 return {
2488 .operands = operands,
2489 .operations = operations,
2490 .inputIndexes = inputIndexes,
2491 .outputIndexes = outputIndexes,
2492 .operandValues = operandValues,
2493 .pools = pools,
2494 .relaxComputationFloat32toFloat16 = true,
2495 };
2496 }
2497
is_ignored_relaxed_dim2_axis0(int i)2498 inline bool is_ignored_relaxed_dim2_axis0(int i) {
2499 static std::set<int> ignore = {};
2500 return ignore.find(i) != ignore.end();
2501 }
2502
2503 // Create the model
createTestModel_relaxed_dim2_axis0_neg()2504 Model createTestModel_relaxed_dim2_axis0_neg() {
2505 const std::vector<Operand> operands = {
2506 {
2507 .type = OperandType::TENSOR_FLOAT32,
2508 .dimensions = {12, 3},
2509 .numberOfConsumers = 1,
2510 .scale = 0.0f,
2511 .zeroPoint = 0,
2512 .lifetime = OperandLifeTime::MODEL_INPUT,
2513 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2514 },
2515 {
2516 .type = OperandType::INT32,
2517 .dimensions = {},
2518 .numberOfConsumers = 1,
2519 .scale = 0.0f,
2520 .zeroPoint = 0,
2521 .lifetime = OperandLifeTime::CONSTANT_COPY,
2522 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2523 },
2524 {
2525 .type = OperandType::INT32,
2526 .dimensions = {},
2527 .numberOfConsumers = 1,
2528 .scale = 0.0f,
2529 .zeroPoint = 0,
2530 .lifetime = OperandLifeTime::CONSTANT_COPY,
2531 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2532 },
2533 {
2534 .type = OperandType::TENSOR_FLOAT32,
2535 .dimensions = {12, 3},
2536 .numberOfConsumers = 0,
2537 .scale = 0.0f,
2538 .zeroPoint = 0,
2539 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2540 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2541 }
2542 };
2543
2544 const std::vector<Operation> operations = {
2545 {
2546 .type = OperationType::CHANNEL_SHUFFLE,
2547 .inputs = {0, 1, 2},
2548 .outputs = {3},
2549 }
2550 };
2551
2552 const std::vector<uint32_t> inputIndexes = {0};
2553 const std::vector<uint32_t> outputIndexes = {3};
2554 std::vector<uint8_t> operandValues = {
2555 3, 0, 0, 0, 254, 255, 255, 255
2556 };
2557 const std::vector<hidl_memory> pools = {};
2558
2559 return {
2560 .operands = operands,
2561 .operations = operations,
2562 .inputIndexes = inputIndexes,
2563 .outputIndexes = outputIndexes,
2564 .operandValues = operandValues,
2565 .pools = pools,
2566 .relaxComputationFloat32toFloat16 = true,
2567 };
2568 }
2569
is_ignored_relaxed_dim2_axis0_neg(int i)2570 inline bool is_ignored_relaxed_dim2_axis0_neg(int i) {
2571 static std::set<int> ignore = {};
2572 return ignore.find(i) != ignore.end();
2573 }
2574
2575 // Create the model
createTestModel_relaxed_dim2_axis1()2576 Model createTestModel_relaxed_dim2_axis1() {
2577 const std::vector<Operand> operands = {
2578 {
2579 .type = OperandType::TENSOR_FLOAT32,
2580 .dimensions = {3, 12},
2581 .numberOfConsumers = 1,
2582 .scale = 0.0f,
2583 .zeroPoint = 0,
2584 .lifetime = OperandLifeTime::MODEL_INPUT,
2585 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2586 },
2587 {
2588 .type = OperandType::INT32,
2589 .dimensions = {},
2590 .numberOfConsumers = 1,
2591 .scale = 0.0f,
2592 .zeroPoint = 0,
2593 .lifetime = OperandLifeTime::CONSTANT_COPY,
2594 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2595 },
2596 {
2597 .type = OperandType::INT32,
2598 .dimensions = {},
2599 .numberOfConsumers = 1,
2600 .scale = 0.0f,
2601 .zeroPoint = 0,
2602 .lifetime = OperandLifeTime::CONSTANT_COPY,
2603 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2604 },
2605 {
2606 .type = OperandType::TENSOR_FLOAT32,
2607 .dimensions = {3, 12},
2608 .numberOfConsumers = 0,
2609 .scale = 0.0f,
2610 .zeroPoint = 0,
2611 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2612 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2613 }
2614 };
2615
2616 const std::vector<Operation> operations = {
2617 {
2618 .type = OperationType::CHANNEL_SHUFFLE,
2619 .inputs = {0, 1, 2},
2620 .outputs = {3},
2621 }
2622 };
2623
2624 const std::vector<uint32_t> inputIndexes = {0};
2625 const std::vector<uint32_t> outputIndexes = {3};
2626 std::vector<uint8_t> operandValues = {
2627 3, 0, 0, 0, 1, 0, 0, 0
2628 };
2629 const std::vector<hidl_memory> pools = {};
2630
2631 return {
2632 .operands = operands,
2633 .operations = operations,
2634 .inputIndexes = inputIndexes,
2635 .outputIndexes = outputIndexes,
2636 .operandValues = operandValues,
2637 .pools = pools,
2638 .relaxComputationFloat32toFloat16 = true,
2639 };
2640 }
2641
is_ignored_relaxed_dim2_axis1(int i)2642 inline bool is_ignored_relaxed_dim2_axis1(int i) {
2643 static std::set<int> ignore = {};
2644 return ignore.find(i) != ignore.end();
2645 }
2646
2647 // Create the model
createTestModel_relaxed_dim2_axis1_neg()2648 Model createTestModel_relaxed_dim2_axis1_neg() {
2649 const std::vector<Operand> operands = {
2650 {
2651 .type = OperandType::TENSOR_FLOAT32,
2652 .dimensions = {3, 12},
2653 .numberOfConsumers = 1,
2654 .scale = 0.0f,
2655 .zeroPoint = 0,
2656 .lifetime = OperandLifeTime::MODEL_INPUT,
2657 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2658 },
2659 {
2660 .type = OperandType::INT32,
2661 .dimensions = {},
2662 .numberOfConsumers = 1,
2663 .scale = 0.0f,
2664 .zeroPoint = 0,
2665 .lifetime = OperandLifeTime::CONSTANT_COPY,
2666 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2667 },
2668 {
2669 .type = OperandType::INT32,
2670 .dimensions = {},
2671 .numberOfConsumers = 1,
2672 .scale = 0.0f,
2673 .zeroPoint = 0,
2674 .lifetime = OperandLifeTime::CONSTANT_COPY,
2675 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2676 },
2677 {
2678 .type = OperandType::TENSOR_FLOAT32,
2679 .dimensions = {3, 12},
2680 .numberOfConsumers = 0,
2681 .scale = 0.0f,
2682 .zeroPoint = 0,
2683 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2684 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2685 }
2686 };
2687
2688 const std::vector<Operation> operations = {
2689 {
2690 .type = OperationType::CHANNEL_SHUFFLE,
2691 .inputs = {0, 1, 2},
2692 .outputs = {3},
2693 }
2694 };
2695
2696 const std::vector<uint32_t> inputIndexes = {0};
2697 const std::vector<uint32_t> outputIndexes = {3};
2698 std::vector<uint8_t> operandValues = {
2699 3, 0, 0, 0, 255, 255, 255, 255
2700 };
2701 const std::vector<hidl_memory> pools = {};
2702
2703 return {
2704 .operands = operands,
2705 .operations = operations,
2706 .inputIndexes = inputIndexes,
2707 .outputIndexes = outputIndexes,
2708 .operandValues = operandValues,
2709 .pools = pools,
2710 .relaxComputationFloat32toFloat16 = true,
2711 };
2712 }
2713
is_ignored_relaxed_dim2_axis1_neg(int i)2714 inline bool is_ignored_relaxed_dim2_axis1_neg(int i) {
2715 static std::set<int> ignore = {};
2716 return ignore.find(i) != ignore.end();
2717 }
2718
2719 // Create the model
createTestModel_relaxed_dim1_axis0()2720 Model createTestModel_relaxed_dim1_axis0() {
2721 const std::vector<Operand> operands = {
2722 {
2723 .type = OperandType::TENSOR_FLOAT32,
2724 .dimensions = {12},
2725 .numberOfConsumers = 1,
2726 .scale = 0.0f,
2727 .zeroPoint = 0,
2728 .lifetime = OperandLifeTime::MODEL_INPUT,
2729 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2730 },
2731 {
2732 .type = OperandType::INT32,
2733 .dimensions = {},
2734 .numberOfConsumers = 1,
2735 .scale = 0.0f,
2736 .zeroPoint = 0,
2737 .lifetime = OperandLifeTime::CONSTANT_COPY,
2738 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2739 },
2740 {
2741 .type = OperandType::INT32,
2742 .dimensions = {},
2743 .numberOfConsumers = 1,
2744 .scale = 0.0f,
2745 .zeroPoint = 0,
2746 .lifetime = OperandLifeTime::CONSTANT_COPY,
2747 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2748 },
2749 {
2750 .type = OperandType::TENSOR_FLOAT32,
2751 .dimensions = {12},
2752 .numberOfConsumers = 0,
2753 .scale = 0.0f,
2754 .zeroPoint = 0,
2755 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2756 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2757 }
2758 };
2759
2760 const std::vector<Operation> operations = {
2761 {
2762 .type = OperationType::CHANNEL_SHUFFLE,
2763 .inputs = {0, 1, 2},
2764 .outputs = {3},
2765 }
2766 };
2767
2768 const std::vector<uint32_t> inputIndexes = {0};
2769 const std::vector<uint32_t> outputIndexes = {3};
2770 std::vector<uint8_t> operandValues = {
2771 3, 0, 0, 0, 0, 0, 0, 0
2772 };
2773 const std::vector<hidl_memory> pools = {};
2774
2775 return {
2776 .operands = operands,
2777 .operations = operations,
2778 .inputIndexes = inputIndexes,
2779 .outputIndexes = outputIndexes,
2780 .operandValues = operandValues,
2781 .pools = pools,
2782 .relaxComputationFloat32toFloat16 = true,
2783 };
2784 }
2785
is_ignored_relaxed_dim1_axis0(int i)2786 inline bool is_ignored_relaxed_dim1_axis0(int i) {
2787 static std::set<int> ignore = {};
2788 return ignore.find(i) != ignore.end();
2789 }
2790
2791 // Create the model
createTestModel_relaxed_dim1_axis0_neg()2792 Model createTestModel_relaxed_dim1_axis0_neg() {
2793 const std::vector<Operand> operands = {
2794 {
2795 .type = OperandType::TENSOR_FLOAT32,
2796 .dimensions = {12},
2797 .numberOfConsumers = 1,
2798 .scale = 0.0f,
2799 .zeroPoint = 0,
2800 .lifetime = OperandLifeTime::MODEL_INPUT,
2801 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2802 },
2803 {
2804 .type = OperandType::INT32,
2805 .dimensions = {},
2806 .numberOfConsumers = 1,
2807 .scale = 0.0f,
2808 .zeroPoint = 0,
2809 .lifetime = OperandLifeTime::CONSTANT_COPY,
2810 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2811 },
2812 {
2813 .type = OperandType::INT32,
2814 .dimensions = {},
2815 .numberOfConsumers = 1,
2816 .scale = 0.0f,
2817 .zeroPoint = 0,
2818 .lifetime = OperandLifeTime::CONSTANT_COPY,
2819 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2820 },
2821 {
2822 .type = OperandType::TENSOR_FLOAT32,
2823 .dimensions = {12},
2824 .numberOfConsumers = 0,
2825 .scale = 0.0f,
2826 .zeroPoint = 0,
2827 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2828 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2829 }
2830 };
2831
2832 const std::vector<Operation> operations = {
2833 {
2834 .type = OperationType::CHANNEL_SHUFFLE,
2835 .inputs = {0, 1, 2},
2836 .outputs = {3},
2837 }
2838 };
2839
2840 const std::vector<uint32_t> inputIndexes = {0};
2841 const std::vector<uint32_t> outputIndexes = {3};
2842 std::vector<uint8_t> operandValues = {
2843 3, 0, 0, 0, 255, 255, 255, 255
2844 };
2845 const std::vector<hidl_memory> pools = {};
2846
2847 return {
2848 .operands = operands,
2849 .operations = operations,
2850 .inputIndexes = inputIndexes,
2851 .outputIndexes = outputIndexes,
2852 .operandValues = operandValues,
2853 .pools = pools,
2854 .relaxComputationFloat32toFloat16 = true,
2855 };
2856 }
2857
is_ignored_relaxed_dim1_axis0_neg(int i)2858 inline bool is_ignored_relaxed_dim1_axis0_neg(int i) {
2859 static std::set<int> ignore = {};
2860 return ignore.find(i) != ignore.end();
2861 }
2862
2863 // Create the model
createTestModel_quant8_dim4_axis0()2864 Model createTestModel_quant8_dim4_axis0() {
2865 const std::vector<Operand> operands = {
2866 {
2867 .type = OperandType::TENSOR_QUANT8_ASYMM,
2868 .dimensions = {12, 2, 2, 3},
2869 .numberOfConsumers = 1,
2870 .scale = 0.25f,
2871 .zeroPoint = 128,
2872 .lifetime = OperandLifeTime::MODEL_INPUT,
2873 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2874 },
2875 {
2876 .type = OperandType::INT32,
2877 .dimensions = {},
2878 .numberOfConsumers = 1,
2879 .scale = 0.0f,
2880 .zeroPoint = 0,
2881 .lifetime = OperandLifeTime::CONSTANT_COPY,
2882 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2883 },
2884 {
2885 .type = OperandType::INT32,
2886 .dimensions = {},
2887 .numberOfConsumers = 1,
2888 .scale = 0.0f,
2889 .zeroPoint = 0,
2890 .lifetime = OperandLifeTime::CONSTANT_COPY,
2891 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2892 },
2893 {
2894 .type = OperandType::TENSOR_QUANT8_ASYMM,
2895 .dimensions = {12, 2, 2, 3},
2896 .numberOfConsumers = 0,
2897 .scale = 0.25f,
2898 .zeroPoint = 128,
2899 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2900 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2901 }
2902 };
2903
2904 const std::vector<Operation> operations = {
2905 {
2906 .type = OperationType::CHANNEL_SHUFFLE,
2907 .inputs = {0, 1, 2},
2908 .outputs = {3},
2909 }
2910 };
2911
2912 const std::vector<uint32_t> inputIndexes = {0};
2913 const std::vector<uint32_t> outputIndexes = {3};
2914 std::vector<uint8_t> operandValues = {
2915 3, 0, 0, 0, 0, 0, 0, 0
2916 };
2917 const std::vector<hidl_memory> pools = {};
2918
2919 return {
2920 .operands = operands,
2921 .operations = operations,
2922 .inputIndexes = inputIndexes,
2923 .outputIndexes = outputIndexes,
2924 .operandValues = operandValues,
2925 .pools = pools,
2926 };
2927 }
2928
is_ignored_quant8_dim4_axis0(int i)2929 inline bool is_ignored_quant8_dim4_axis0(int i) {
2930 static std::set<int> ignore = {};
2931 return ignore.find(i) != ignore.end();
2932 }
2933
2934 // Create the model
createTestModel_quant8_dim4_axis0_neg()2935 Model createTestModel_quant8_dim4_axis0_neg() {
2936 const std::vector<Operand> operands = {
2937 {
2938 .type = OperandType::TENSOR_QUANT8_ASYMM,
2939 .dimensions = {12, 2, 2, 3},
2940 .numberOfConsumers = 1,
2941 .scale = 0.25f,
2942 .zeroPoint = 128,
2943 .lifetime = OperandLifeTime::MODEL_INPUT,
2944 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2945 },
2946 {
2947 .type = OperandType::INT32,
2948 .dimensions = {},
2949 .numberOfConsumers = 1,
2950 .scale = 0.0f,
2951 .zeroPoint = 0,
2952 .lifetime = OperandLifeTime::CONSTANT_COPY,
2953 .location = {.poolIndex = 0, .offset = 0, .length = 4},
2954 },
2955 {
2956 .type = OperandType::INT32,
2957 .dimensions = {},
2958 .numberOfConsumers = 1,
2959 .scale = 0.0f,
2960 .zeroPoint = 0,
2961 .lifetime = OperandLifeTime::CONSTANT_COPY,
2962 .location = {.poolIndex = 0, .offset = 4, .length = 4},
2963 },
2964 {
2965 .type = OperandType::TENSOR_QUANT8_ASYMM,
2966 .dimensions = {12, 2, 2, 3},
2967 .numberOfConsumers = 0,
2968 .scale = 0.25f,
2969 .zeroPoint = 128,
2970 .lifetime = OperandLifeTime::MODEL_OUTPUT,
2971 .location = {.poolIndex = 0, .offset = 0, .length = 0},
2972 }
2973 };
2974
2975 const std::vector<Operation> operations = {
2976 {
2977 .type = OperationType::CHANNEL_SHUFFLE,
2978 .inputs = {0, 1, 2},
2979 .outputs = {3},
2980 }
2981 };
2982
2983 const std::vector<uint32_t> inputIndexes = {0};
2984 const std::vector<uint32_t> outputIndexes = {3};
2985 std::vector<uint8_t> operandValues = {
2986 3, 0, 0, 0, 252, 255, 255, 255
2987 };
2988 const std::vector<hidl_memory> pools = {};
2989
2990 return {
2991 .operands = operands,
2992 .operations = operations,
2993 .inputIndexes = inputIndexes,
2994 .outputIndexes = outputIndexes,
2995 .operandValues = operandValues,
2996 .pools = pools,
2997 };
2998 }
2999
is_ignored_quant8_dim4_axis0_neg(int i)3000 inline bool is_ignored_quant8_dim4_axis0_neg(int i) {
3001 static std::set<int> ignore = {};
3002 return ignore.find(i) != ignore.end();
3003 }
3004
3005 // Create the model
createTestModel_quant8_dim4_axis1()3006 Model createTestModel_quant8_dim4_axis1() {
3007 const std::vector<Operand> operands = {
3008 {
3009 .type = OperandType::TENSOR_QUANT8_ASYMM,
3010 .dimensions = {2, 12, 2, 3},
3011 .numberOfConsumers = 1,
3012 .scale = 0.25f,
3013 .zeroPoint = 128,
3014 .lifetime = OperandLifeTime::MODEL_INPUT,
3015 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3016 },
3017 {
3018 .type = OperandType::INT32,
3019 .dimensions = {},
3020 .numberOfConsumers = 1,
3021 .scale = 0.0f,
3022 .zeroPoint = 0,
3023 .lifetime = OperandLifeTime::CONSTANT_COPY,
3024 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3025 },
3026 {
3027 .type = OperandType::INT32,
3028 .dimensions = {},
3029 .numberOfConsumers = 1,
3030 .scale = 0.0f,
3031 .zeroPoint = 0,
3032 .lifetime = OperandLifeTime::CONSTANT_COPY,
3033 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3034 },
3035 {
3036 .type = OperandType::TENSOR_QUANT8_ASYMM,
3037 .dimensions = {2, 12, 2, 3},
3038 .numberOfConsumers = 0,
3039 .scale = 0.25f,
3040 .zeroPoint = 128,
3041 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3042 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3043 }
3044 };
3045
3046 const std::vector<Operation> operations = {
3047 {
3048 .type = OperationType::CHANNEL_SHUFFLE,
3049 .inputs = {0, 1, 2},
3050 .outputs = {3},
3051 }
3052 };
3053
3054 const std::vector<uint32_t> inputIndexes = {0};
3055 const std::vector<uint32_t> outputIndexes = {3};
3056 std::vector<uint8_t> operandValues = {
3057 3, 0, 0, 0, 1, 0, 0, 0
3058 };
3059 const std::vector<hidl_memory> pools = {};
3060
3061 return {
3062 .operands = operands,
3063 .operations = operations,
3064 .inputIndexes = inputIndexes,
3065 .outputIndexes = outputIndexes,
3066 .operandValues = operandValues,
3067 .pools = pools,
3068 };
3069 }
3070
is_ignored_quant8_dim4_axis1(int i)3071 inline bool is_ignored_quant8_dim4_axis1(int i) {
3072 static std::set<int> ignore = {};
3073 return ignore.find(i) != ignore.end();
3074 }
3075
3076 // Create the model
createTestModel_quant8_dim4_axis1_neg()3077 Model createTestModel_quant8_dim4_axis1_neg() {
3078 const std::vector<Operand> operands = {
3079 {
3080 .type = OperandType::TENSOR_QUANT8_ASYMM,
3081 .dimensions = {2, 12, 2, 3},
3082 .numberOfConsumers = 1,
3083 .scale = 0.25f,
3084 .zeroPoint = 128,
3085 .lifetime = OperandLifeTime::MODEL_INPUT,
3086 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3087 },
3088 {
3089 .type = OperandType::INT32,
3090 .dimensions = {},
3091 .numberOfConsumers = 1,
3092 .scale = 0.0f,
3093 .zeroPoint = 0,
3094 .lifetime = OperandLifeTime::CONSTANT_COPY,
3095 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3096 },
3097 {
3098 .type = OperandType::INT32,
3099 .dimensions = {},
3100 .numberOfConsumers = 1,
3101 .scale = 0.0f,
3102 .zeroPoint = 0,
3103 .lifetime = OperandLifeTime::CONSTANT_COPY,
3104 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3105 },
3106 {
3107 .type = OperandType::TENSOR_QUANT8_ASYMM,
3108 .dimensions = {2, 12, 2, 3},
3109 .numberOfConsumers = 0,
3110 .scale = 0.25f,
3111 .zeroPoint = 128,
3112 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3113 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3114 }
3115 };
3116
3117 const std::vector<Operation> operations = {
3118 {
3119 .type = OperationType::CHANNEL_SHUFFLE,
3120 .inputs = {0, 1, 2},
3121 .outputs = {3},
3122 }
3123 };
3124
3125 const std::vector<uint32_t> inputIndexes = {0};
3126 const std::vector<uint32_t> outputIndexes = {3};
3127 std::vector<uint8_t> operandValues = {
3128 3, 0, 0, 0, 253, 255, 255, 255
3129 };
3130 const std::vector<hidl_memory> pools = {};
3131
3132 return {
3133 .operands = operands,
3134 .operations = operations,
3135 .inputIndexes = inputIndexes,
3136 .outputIndexes = outputIndexes,
3137 .operandValues = operandValues,
3138 .pools = pools,
3139 };
3140 }
3141
is_ignored_quant8_dim4_axis1_neg(int i)3142 inline bool is_ignored_quant8_dim4_axis1_neg(int i) {
3143 static std::set<int> ignore = {};
3144 return ignore.find(i) != ignore.end();
3145 }
3146
3147 // Create the model
createTestModel_quant8_dim4_axis2()3148 Model createTestModel_quant8_dim4_axis2() {
3149 const std::vector<Operand> operands = {
3150 {
3151 .type = OperandType::TENSOR_QUANT8_ASYMM,
3152 .dimensions = {2, 2, 12, 3},
3153 .numberOfConsumers = 1,
3154 .scale = 0.25f,
3155 .zeroPoint = 128,
3156 .lifetime = OperandLifeTime::MODEL_INPUT,
3157 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3158 },
3159 {
3160 .type = OperandType::INT32,
3161 .dimensions = {},
3162 .numberOfConsumers = 1,
3163 .scale = 0.0f,
3164 .zeroPoint = 0,
3165 .lifetime = OperandLifeTime::CONSTANT_COPY,
3166 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3167 },
3168 {
3169 .type = OperandType::INT32,
3170 .dimensions = {},
3171 .numberOfConsumers = 1,
3172 .scale = 0.0f,
3173 .zeroPoint = 0,
3174 .lifetime = OperandLifeTime::CONSTANT_COPY,
3175 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3176 },
3177 {
3178 .type = OperandType::TENSOR_QUANT8_ASYMM,
3179 .dimensions = {2, 2, 12, 3},
3180 .numberOfConsumers = 0,
3181 .scale = 0.25f,
3182 .zeroPoint = 128,
3183 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3184 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3185 }
3186 };
3187
3188 const std::vector<Operation> operations = {
3189 {
3190 .type = OperationType::CHANNEL_SHUFFLE,
3191 .inputs = {0, 1, 2},
3192 .outputs = {3},
3193 }
3194 };
3195
3196 const std::vector<uint32_t> inputIndexes = {0};
3197 const std::vector<uint32_t> outputIndexes = {3};
3198 std::vector<uint8_t> operandValues = {
3199 3, 0, 0, 0, 2, 0, 0, 0
3200 };
3201 const std::vector<hidl_memory> pools = {};
3202
3203 return {
3204 .operands = operands,
3205 .operations = operations,
3206 .inputIndexes = inputIndexes,
3207 .outputIndexes = outputIndexes,
3208 .operandValues = operandValues,
3209 .pools = pools,
3210 };
3211 }
3212
is_ignored_quant8_dim4_axis2(int i)3213 inline bool is_ignored_quant8_dim4_axis2(int i) {
3214 static std::set<int> ignore = {};
3215 return ignore.find(i) != ignore.end();
3216 }
3217
3218 // Create the model
createTestModel_quant8_dim4_axis2_neg()3219 Model createTestModel_quant8_dim4_axis2_neg() {
3220 const std::vector<Operand> operands = {
3221 {
3222 .type = OperandType::TENSOR_QUANT8_ASYMM,
3223 .dimensions = {2, 2, 12, 3},
3224 .numberOfConsumers = 1,
3225 .scale = 0.25f,
3226 .zeroPoint = 128,
3227 .lifetime = OperandLifeTime::MODEL_INPUT,
3228 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3229 },
3230 {
3231 .type = OperandType::INT32,
3232 .dimensions = {},
3233 .numberOfConsumers = 1,
3234 .scale = 0.0f,
3235 .zeroPoint = 0,
3236 .lifetime = OperandLifeTime::CONSTANT_COPY,
3237 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3238 },
3239 {
3240 .type = OperandType::INT32,
3241 .dimensions = {},
3242 .numberOfConsumers = 1,
3243 .scale = 0.0f,
3244 .zeroPoint = 0,
3245 .lifetime = OperandLifeTime::CONSTANT_COPY,
3246 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3247 },
3248 {
3249 .type = OperandType::TENSOR_QUANT8_ASYMM,
3250 .dimensions = {2, 2, 12, 3},
3251 .numberOfConsumers = 0,
3252 .scale = 0.25f,
3253 .zeroPoint = 128,
3254 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3255 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3256 }
3257 };
3258
3259 const std::vector<Operation> operations = {
3260 {
3261 .type = OperationType::CHANNEL_SHUFFLE,
3262 .inputs = {0, 1, 2},
3263 .outputs = {3},
3264 }
3265 };
3266
3267 const std::vector<uint32_t> inputIndexes = {0};
3268 const std::vector<uint32_t> outputIndexes = {3};
3269 std::vector<uint8_t> operandValues = {
3270 3, 0, 0, 0, 254, 255, 255, 255
3271 };
3272 const std::vector<hidl_memory> pools = {};
3273
3274 return {
3275 .operands = operands,
3276 .operations = operations,
3277 .inputIndexes = inputIndexes,
3278 .outputIndexes = outputIndexes,
3279 .operandValues = operandValues,
3280 .pools = pools,
3281 };
3282 }
3283
is_ignored_quant8_dim4_axis2_neg(int i)3284 inline bool is_ignored_quant8_dim4_axis2_neg(int i) {
3285 static std::set<int> ignore = {};
3286 return ignore.find(i) != ignore.end();
3287 }
3288
3289 // Create the model
createTestModel_quant8_dim4_axis3()3290 Model createTestModel_quant8_dim4_axis3() {
3291 const std::vector<Operand> operands = {
3292 {
3293 .type = OperandType::TENSOR_QUANT8_ASYMM,
3294 .dimensions = {2, 2, 3, 12},
3295 .numberOfConsumers = 1,
3296 .scale = 0.25f,
3297 .zeroPoint = 128,
3298 .lifetime = OperandLifeTime::MODEL_INPUT,
3299 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3300 },
3301 {
3302 .type = OperandType::INT32,
3303 .dimensions = {},
3304 .numberOfConsumers = 1,
3305 .scale = 0.0f,
3306 .zeroPoint = 0,
3307 .lifetime = OperandLifeTime::CONSTANT_COPY,
3308 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3309 },
3310 {
3311 .type = OperandType::INT32,
3312 .dimensions = {},
3313 .numberOfConsumers = 1,
3314 .scale = 0.0f,
3315 .zeroPoint = 0,
3316 .lifetime = OperandLifeTime::CONSTANT_COPY,
3317 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3318 },
3319 {
3320 .type = OperandType::TENSOR_QUANT8_ASYMM,
3321 .dimensions = {2, 2, 3, 12},
3322 .numberOfConsumers = 0,
3323 .scale = 0.25f,
3324 .zeroPoint = 128,
3325 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3326 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3327 }
3328 };
3329
3330 const std::vector<Operation> operations = {
3331 {
3332 .type = OperationType::CHANNEL_SHUFFLE,
3333 .inputs = {0, 1, 2},
3334 .outputs = {3},
3335 }
3336 };
3337
3338 const std::vector<uint32_t> inputIndexes = {0};
3339 const std::vector<uint32_t> outputIndexes = {3};
3340 std::vector<uint8_t> operandValues = {
3341 3, 0, 0, 0, 3, 0, 0, 0
3342 };
3343 const std::vector<hidl_memory> pools = {};
3344
3345 return {
3346 .operands = operands,
3347 .operations = operations,
3348 .inputIndexes = inputIndexes,
3349 .outputIndexes = outputIndexes,
3350 .operandValues = operandValues,
3351 .pools = pools,
3352 };
3353 }
3354
is_ignored_quant8_dim4_axis3(int i)3355 inline bool is_ignored_quant8_dim4_axis3(int i) {
3356 static std::set<int> ignore = {};
3357 return ignore.find(i) != ignore.end();
3358 }
3359
3360 // Create the model
createTestModel_quant8_dim4_axis3_neg()3361 Model createTestModel_quant8_dim4_axis3_neg() {
3362 const std::vector<Operand> operands = {
3363 {
3364 .type = OperandType::TENSOR_QUANT8_ASYMM,
3365 .dimensions = {2, 2, 3, 12},
3366 .numberOfConsumers = 1,
3367 .scale = 0.25f,
3368 .zeroPoint = 128,
3369 .lifetime = OperandLifeTime::MODEL_INPUT,
3370 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3371 },
3372 {
3373 .type = OperandType::INT32,
3374 .dimensions = {},
3375 .numberOfConsumers = 1,
3376 .scale = 0.0f,
3377 .zeroPoint = 0,
3378 .lifetime = OperandLifeTime::CONSTANT_COPY,
3379 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3380 },
3381 {
3382 .type = OperandType::INT32,
3383 .dimensions = {},
3384 .numberOfConsumers = 1,
3385 .scale = 0.0f,
3386 .zeroPoint = 0,
3387 .lifetime = OperandLifeTime::CONSTANT_COPY,
3388 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3389 },
3390 {
3391 .type = OperandType::TENSOR_QUANT8_ASYMM,
3392 .dimensions = {2, 2, 3, 12},
3393 .numberOfConsumers = 0,
3394 .scale = 0.25f,
3395 .zeroPoint = 128,
3396 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3397 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3398 }
3399 };
3400
3401 const std::vector<Operation> operations = {
3402 {
3403 .type = OperationType::CHANNEL_SHUFFLE,
3404 .inputs = {0, 1, 2},
3405 .outputs = {3},
3406 }
3407 };
3408
3409 const std::vector<uint32_t> inputIndexes = {0};
3410 const std::vector<uint32_t> outputIndexes = {3};
3411 std::vector<uint8_t> operandValues = {
3412 3, 0, 0, 0, 255, 255, 255, 255
3413 };
3414 const std::vector<hidl_memory> pools = {};
3415
3416 return {
3417 .operands = operands,
3418 .operations = operations,
3419 .inputIndexes = inputIndexes,
3420 .outputIndexes = outputIndexes,
3421 .operandValues = operandValues,
3422 .pools = pools,
3423 };
3424 }
3425
is_ignored_quant8_dim4_axis3_neg(int i)3426 inline bool is_ignored_quant8_dim4_axis3_neg(int i) {
3427 static std::set<int> ignore = {};
3428 return ignore.find(i) != ignore.end();
3429 }
3430
3431 // Create the model
createTestModel_quant8_dim3_axis0()3432 Model createTestModel_quant8_dim3_axis0() {
3433 const std::vector<Operand> operands = {
3434 {
3435 .type = OperandType::TENSOR_QUANT8_ASYMM,
3436 .dimensions = {12, 2, 3},
3437 .numberOfConsumers = 1,
3438 .scale = 0.25f,
3439 .zeroPoint = 128,
3440 .lifetime = OperandLifeTime::MODEL_INPUT,
3441 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3442 },
3443 {
3444 .type = OperandType::INT32,
3445 .dimensions = {},
3446 .numberOfConsumers = 1,
3447 .scale = 0.0f,
3448 .zeroPoint = 0,
3449 .lifetime = OperandLifeTime::CONSTANT_COPY,
3450 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3451 },
3452 {
3453 .type = OperandType::INT32,
3454 .dimensions = {},
3455 .numberOfConsumers = 1,
3456 .scale = 0.0f,
3457 .zeroPoint = 0,
3458 .lifetime = OperandLifeTime::CONSTANT_COPY,
3459 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3460 },
3461 {
3462 .type = OperandType::TENSOR_QUANT8_ASYMM,
3463 .dimensions = {12, 2, 3},
3464 .numberOfConsumers = 0,
3465 .scale = 0.25f,
3466 .zeroPoint = 128,
3467 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3468 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3469 }
3470 };
3471
3472 const std::vector<Operation> operations = {
3473 {
3474 .type = OperationType::CHANNEL_SHUFFLE,
3475 .inputs = {0, 1, 2},
3476 .outputs = {3},
3477 }
3478 };
3479
3480 const std::vector<uint32_t> inputIndexes = {0};
3481 const std::vector<uint32_t> outputIndexes = {3};
3482 std::vector<uint8_t> operandValues = {
3483 3, 0, 0, 0, 0, 0, 0, 0
3484 };
3485 const std::vector<hidl_memory> pools = {};
3486
3487 return {
3488 .operands = operands,
3489 .operations = operations,
3490 .inputIndexes = inputIndexes,
3491 .outputIndexes = outputIndexes,
3492 .operandValues = operandValues,
3493 .pools = pools,
3494 };
3495 }
3496
is_ignored_quant8_dim3_axis0(int i)3497 inline bool is_ignored_quant8_dim3_axis0(int i) {
3498 static std::set<int> ignore = {};
3499 return ignore.find(i) != ignore.end();
3500 }
3501
3502 // Create the model
createTestModel_quant8_dim3_axis0_neg()3503 Model createTestModel_quant8_dim3_axis0_neg() {
3504 const std::vector<Operand> operands = {
3505 {
3506 .type = OperandType::TENSOR_QUANT8_ASYMM,
3507 .dimensions = {12, 2, 3},
3508 .numberOfConsumers = 1,
3509 .scale = 0.25f,
3510 .zeroPoint = 128,
3511 .lifetime = OperandLifeTime::MODEL_INPUT,
3512 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3513 },
3514 {
3515 .type = OperandType::INT32,
3516 .dimensions = {},
3517 .numberOfConsumers = 1,
3518 .scale = 0.0f,
3519 .zeroPoint = 0,
3520 .lifetime = OperandLifeTime::CONSTANT_COPY,
3521 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3522 },
3523 {
3524 .type = OperandType::INT32,
3525 .dimensions = {},
3526 .numberOfConsumers = 1,
3527 .scale = 0.0f,
3528 .zeroPoint = 0,
3529 .lifetime = OperandLifeTime::CONSTANT_COPY,
3530 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3531 },
3532 {
3533 .type = OperandType::TENSOR_QUANT8_ASYMM,
3534 .dimensions = {12, 2, 3},
3535 .numberOfConsumers = 0,
3536 .scale = 0.25f,
3537 .zeroPoint = 128,
3538 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3539 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3540 }
3541 };
3542
3543 const std::vector<Operation> operations = {
3544 {
3545 .type = OperationType::CHANNEL_SHUFFLE,
3546 .inputs = {0, 1, 2},
3547 .outputs = {3},
3548 }
3549 };
3550
3551 const std::vector<uint32_t> inputIndexes = {0};
3552 const std::vector<uint32_t> outputIndexes = {3};
3553 std::vector<uint8_t> operandValues = {
3554 3, 0, 0, 0, 253, 255, 255, 255
3555 };
3556 const std::vector<hidl_memory> pools = {};
3557
3558 return {
3559 .operands = operands,
3560 .operations = operations,
3561 .inputIndexes = inputIndexes,
3562 .outputIndexes = outputIndexes,
3563 .operandValues = operandValues,
3564 .pools = pools,
3565 };
3566 }
3567
is_ignored_quant8_dim3_axis0_neg(int i)3568 inline bool is_ignored_quant8_dim3_axis0_neg(int i) {
3569 static std::set<int> ignore = {};
3570 return ignore.find(i) != ignore.end();
3571 }
3572
3573 // Create the model
createTestModel_quant8_dim3_axis1()3574 Model createTestModel_quant8_dim3_axis1() {
3575 const std::vector<Operand> operands = {
3576 {
3577 .type = OperandType::TENSOR_QUANT8_ASYMM,
3578 .dimensions = {2, 12, 3},
3579 .numberOfConsumers = 1,
3580 .scale = 0.25f,
3581 .zeroPoint = 128,
3582 .lifetime = OperandLifeTime::MODEL_INPUT,
3583 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3584 },
3585 {
3586 .type = OperandType::INT32,
3587 .dimensions = {},
3588 .numberOfConsumers = 1,
3589 .scale = 0.0f,
3590 .zeroPoint = 0,
3591 .lifetime = OperandLifeTime::CONSTANT_COPY,
3592 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3593 },
3594 {
3595 .type = OperandType::INT32,
3596 .dimensions = {},
3597 .numberOfConsumers = 1,
3598 .scale = 0.0f,
3599 .zeroPoint = 0,
3600 .lifetime = OperandLifeTime::CONSTANT_COPY,
3601 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3602 },
3603 {
3604 .type = OperandType::TENSOR_QUANT8_ASYMM,
3605 .dimensions = {2, 12, 3},
3606 .numberOfConsumers = 0,
3607 .scale = 0.25f,
3608 .zeroPoint = 128,
3609 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3610 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3611 }
3612 };
3613
3614 const std::vector<Operation> operations = {
3615 {
3616 .type = OperationType::CHANNEL_SHUFFLE,
3617 .inputs = {0, 1, 2},
3618 .outputs = {3},
3619 }
3620 };
3621
3622 const std::vector<uint32_t> inputIndexes = {0};
3623 const std::vector<uint32_t> outputIndexes = {3};
3624 std::vector<uint8_t> operandValues = {
3625 3, 0, 0, 0, 1, 0, 0, 0
3626 };
3627 const std::vector<hidl_memory> pools = {};
3628
3629 return {
3630 .operands = operands,
3631 .operations = operations,
3632 .inputIndexes = inputIndexes,
3633 .outputIndexes = outputIndexes,
3634 .operandValues = operandValues,
3635 .pools = pools,
3636 };
3637 }
3638
is_ignored_quant8_dim3_axis1(int i)3639 inline bool is_ignored_quant8_dim3_axis1(int i) {
3640 static std::set<int> ignore = {};
3641 return ignore.find(i) != ignore.end();
3642 }
3643
3644 // Create the model
createTestModel_quant8_dim3_axis1_neg()3645 Model createTestModel_quant8_dim3_axis1_neg() {
3646 const std::vector<Operand> operands = {
3647 {
3648 .type = OperandType::TENSOR_QUANT8_ASYMM,
3649 .dimensions = {2, 12, 3},
3650 .numberOfConsumers = 1,
3651 .scale = 0.25f,
3652 .zeroPoint = 128,
3653 .lifetime = OperandLifeTime::MODEL_INPUT,
3654 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3655 },
3656 {
3657 .type = OperandType::INT32,
3658 .dimensions = {},
3659 .numberOfConsumers = 1,
3660 .scale = 0.0f,
3661 .zeroPoint = 0,
3662 .lifetime = OperandLifeTime::CONSTANT_COPY,
3663 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3664 },
3665 {
3666 .type = OperandType::INT32,
3667 .dimensions = {},
3668 .numberOfConsumers = 1,
3669 .scale = 0.0f,
3670 .zeroPoint = 0,
3671 .lifetime = OperandLifeTime::CONSTANT_COPY,
3672 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3673 },
3674 {
3675 .type = OperandType::TENSOR_QUANT8_ASYMM,
3676 .dimensions = {2, 12, 3},
3677 .numberOfConsumers = 0,
3678 .scale = 0.25f,
3679 .zeroPoint = 128,
3680 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3681 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3682 }
3683 };
3684
3685 const std::vector<Operation> operations = {
3686 {
3687 .type = OperationType::CHANNEL_SHUFFLE,
3688 .inputs = {0, 1, 2},
3689 .outputs = {3},
3690 }
3691 };
3692
3693 const std::vector<uint32_t> inputIndexes = {0};
3694 const std::vector<uint32_t> outputIndexes = {3};
3695 std::vector<uint8_t> operandValues = {
3696 3, 0, 0, 0, 254, 255, 255, 255
3697 };
3698 const std::vector<hidl_memory> pools = {};
3699
3700 return {
3701 .operands = operands,
3702 .operations = operations,
3703 .inputIndexes = inputIndexes,
3704 .outputIndexes = outputIndexes,
3705 .operandValues = operandValues,
3706 .pools = pools,
3707 };
3708 }
3709
is_ignored_quant8_dim3_axis1_neg(int i)3710 inline bool is_ignored_quant8_dim3_axis1_neg(int i) {
3711 static std::set<int> ignore = {};
3712 return ignore.find(i) != ignore.end();
3713 }
3714
3715 // Create the model
createTestModel_quant8_dim3_axis2()3716 Model createTestModel_quant8_dim3_axis2() {
3717 const std::vector<Operand> operands = {
3718 {
3719 .type = OperandType::TENSOR_QUANT8_ASYMM,
3720 .dimensions = {2, 3, 12},
3721 .numberOfConsumers = 1,
3722 .scale = 0.25f,
3723 .zeroPoint = 128,
3724 .lifetime = OperandLifeTime::MODEL_INPUT,
3725 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3726 },
3727 {
3728 .type = OperandType::INT32,
3729 .dimensions = {},
3730 .numberOfConsumers = 1,
3731 .scale = 0.0f,
3732 .zeroPoint = 0,
3733 .lifetime = OperandLifeTime::CONSTANT_COPY,
3734 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3735 },
3736 {
3737 .type = OperandType::INT32,
3738 .dimensions = {},
3739 .numberOfConsumers = 1,
3740 .scale = 0.0f,
3741 .zeroPoint = 0,
3742 .lifetime = OperandLifeTime::CONSTANT_COPY,
3743 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3744 },
3745 {
3746 .type = OperandType::TENSOR_QUANT8_ASYMM,
3747 .dimensions = {2, 3, 12},
3748 .numberOfConsumers = 0,
3749 .scale = 0.25f,
3750 .zeroPoint = 128,
3751 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3752 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3753 }
3754 };
3755
3756 const std::vector<Operation> operations = {
3757 {
3758 .type = OperationType::CHANNEL_SHUFFLE,
3759 .inputs = {0, 1, 2},
3760 .outputs = {3},
3761 }
3762 };
3763
3764 const std::vector<uint32_t> inputIndexes = {0};
3765 const std::vector<uint32_t> outputIndexes = {3};
3766 std::vector<uint8_t> operandValues = {
3767 3, 0, 0, 0, 2, 0, 0, 0
3768 };
3769 const std::vector<hidl_memory> pools = {};
3770
3771 return {
3772 .operands = operands,
3773 .operations = operations,
3774 .inputIndexes = inputIndexes,
3775 .outputIndexes = outputIndexes,
3776 .operandValues = operandValues,
3777 .pools = pools,
3778 };
3779 }
3780
is_ignored_quant8_dim3_axis2(int i)3781 inline bool is_ignored_quant8_dim3_axis2(int i) {
3782 static std::set<int> ignore = {};
3783 return ignore.find(i) != ignore.end();
3784 }
3785
3786 // Create the model
createTestModel_quant8_dim3_axis2_neg()3787 Model createTestModel_quant8_dim3_axis2_neg() {
3788 const std::vector<Operand> operands = {
3789 {
3790 .type = OperandType::TENSOR_QUANT8_ASYMM,
3791 .dimensions = {2, 3, 12},
3792 .numberOfConsumers = 1,
3793 .scale = 0.25f,
3794 .zeroPoint = 128,
3795 .lifetime = OperandLifeTime::MODEL_INPUT,
3796 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3797 },
3798 {
3799 .type = OperandType::INT32,
3800 .dimensions = {},
3801 .numberOfConsumers = 1,
3802 .scale = 0.0f,
3803 .zeroPoint = 0,
3804 .lifetime = OperandLifeTime::CONSTANT_COPY,
3805 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3806 },
3807 {
3808 .type = OperandType::INT32,
3809 .dimensions = {},
3810 .numberOfConsumers = 1,
3811 .scale = 0.0f,
3812 .zeroPoint = 0,
3813 .lifetime = OperandLifeTime::CONSTANT_COPY,
3814 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3815 },
3816 {
3817 .type = OperandType::TENSOR_QUANT8_ASYMM,
3818 .dimensions = {2, 3, 12},
3819 .numberOfConsumers = 0,
3820 .scale = 0.25f,
3821 .zeroPoint = 128,
3822 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3823 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3824 }
3825 };
3826
3827 const std::vector<Operation> operations = {
3828 {
3829 .type = OperationType::CHANNEL_SHUFFLE,
3830 .inputs = {0, 1, 2},
3831 .outputs = {3},
3832 }
3833 };
3834
3835 const std::vector<uint32_t> inputIndexes = {0};
3836 const std::vector<uint32_t> outputIndexes = {3};
3837 std::vector<uint8_t> operandValues = {
3838 3, 0, 0, 0, 255, 255, 255, 255
3839 };
3840 const std::vector<hidl_memory> pools = {};
3841
3842 return {
3843 .operands = operands,
3844 .operations = operations,
3845 .inputIndexes = inputIndexes,
3846 .outputIndexes = outputIndexes,
3847 .operandValues = operandValues,
3848 .pools = pools,
3849 };
3850 }
3851
is_ignored_quant8_dim3_axis2_neg(int i)3852 inline bool is_ignored_quant8_dim3_axis2_neg(int i) {
3853 static std::set<int> ignore = {};
3854 return ignore.find(i) != ignore.end();
3855 }
3856
3857 // Create the model
createTestModel_quant8_dim2_axis0()3858 Model createTestModel_quant8_dim2_axis0() {
3859 const std::vector<Operand> operands = {
3860 {
3861 .type = OperandType::TENSOR_QUANT8_ASYMM,
3862 .dimensions = {12, 3},
3863 .numberOfConsumers = 1,
3864 .scale = 0.25f,
3865 .zeroPoint = 128,
3866 .lifetime = OperandLifeTime::MODEL_INPUT,
3867 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3868 },
3869 {
3870 .type = OperandType::INT32,
3871 .dimensions = {},
3872 .numberOfConsumers = 1,
3873 .scale = 0.0f,
3874 .zeroPoint = 0,
3875 .lifetime = OperandLifeTime::CONSTANT_COPY,
3876 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3877 },
3878 {
3879 .type = OperandType::INT32,
3880 .dimensions = {},
3881 .numberOfConsumers = 1,
3882 .scale = 0.0f,
3883 .zeroPoint = 0,
3884 .lifetime = OperandLifeTime::CONSTANT_COPY,
3885 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3886 },
3887 {
3888 .type = OperandType::TENSOR_QUANT8_ASYMM,
3889 .dimensions = {12, 3},
3890 .numberOfConsumers = 0,
3891 .scale = 0.25f,
3892 .zeroPoint = 128,
3893 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3894 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3895 }
3896 };
3897
3898 const std::vector<Operation> operations = {
3899 {
3900 .type = OperationType::CHANNEL_SHUFFLE,
3901 .inputs = {0, 1, 2},
3902 .outputs = {3},
3903 }
3904 };
3905
3906 const std::vector<uint32_t> inputIndexes = {0};
3907 const std::vector<uint32_t> outputIndexes = {3};
3908 std::vector<uint8_t> operandValues = {
3909 3, 0, 0, 0, 0, 0, 0, 0
3910 };
3911 const std::vector<hidl_memory> pools = {};
3912
3913 return {
3914 .operands = operands,
3915 .operations = operations,
3916 .inputIndexes = inputIndexes,
3917 .outputIndexes = outputIndexes,
3918 .operandValues = operandValues,
3919 .pools = pools,
3920 };
3921 }
3922
is_ignored_quant8_dim2_axis0(int i)3923 inline bool is_ignored_quant8_dim2_axis0(int i) {
3924 static std::set<int> ignore = {};
3925 return ignore.find(i) != ignore.end();
3926 }
3927
3928 // Create the model
createTestModel_quant8_dim2_axis0_neg()3929 Model createTestModel_quant8_dim2_axis0_neg() {
3930 const std::vector<Operand> operands = {
3931 {
3932 .type = OperandType::TENSOR_QUANT8_ASYMM,
3933 .dimensions = {12, 3},
3934 .numberOfConsumers = 1,
3935 .scale = 0.25f,
3936 .zeroPoint = 128,
3937 .lifetime = OperandLifeTime::MODEL_INPUT,
3938 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3939 },
3940 {
3941 .type = OperandType::INT32,
3942 .dimensions = {},
3943 .numberOfConsumers = 1,
3944 .scale = 0.0f,
3945 .zeroPoint = 0,
3946 .lifetime = OperandLifeTime::CONSTANT_COPY,
3947 .location = {.poolIndex = 0, .offset = 0, .length = 4},
3948 },
3949 {
3950 .type = OperandType::INT32,
3951 .dimensions = {},
3952 .numberOfConsumers = 1,
3953 .scale = 0.0f,
3954 .zeroPoint = 0,
3955 .lifetime = OperandLifeTime::CONSTANT_COPY,
3956 .location = {.poolIndex = 0, .offset = 4, .length = 4},
3957 },
3958 {
3959 .type = OperandType::TENSOR_QUANT8_ASYMM,
3960 .dimensions = {12, 3},
3961 .numberOfConsumers = 0,
3962 .scale = 0.25f,
3963 .zeroPoint = 128,
3964 .lifetime = OperandLifeTime::MODEL_OUTPUT,
3965 .location = {.poolIndex = 0, .offset = 0, .length = 0},
3966 }
3967 };
3968
3969 const std::vector<Operation> operations = {
3970 {
3971 .type = OperationType::CHANNEL_SHUFFLE,
3972 .inputs = {0, 1, 2},
3973 .outputs = {3},
3974 }
3975 };
3976
3977 const std::vector<uint32_t> inputIndexes = {0};
3978 const std::vector<uint32_t> outputIndexes = {3};
3979 std::vector<uint8_t> operandValues = {
3980 3, 0, 0, 0, 254, 255, 255, 255
3981 };
3982 const std::vector<hidl_memory> pools = {};
3983
3984 return {
3985 .operands = operands,
3986 .operations = operations,
3987 .inputIndexes = inputIndexes,
3988 .outputIndexes = outputIndexes,
3989 .operandValues = operandValues,
3990 .pools = pools,
3991 };
3992 }
3993
is_ignored_quant8_dim2_axis0_neg(int i)3994 inline bool is_ignored_quant8_dim2_axis0_neg(int i) {
3995 static std::set<int> ignore = {};
3996 return ignore.find(i) != ignore.end();
3997 }
3998
3999 // Create the model
createTestModel_quant8_dim2_axis1()4000 Model createTestModel_quant8_dim2_axis1() {
4001 const std::vector<Operand> operands = {
4002 {
4003 .type = OperandType::TENSOR_QUANT8_ASYMM,
4004 .dimensions = {3, 12},
4005 .numberOfConsumers = 1,
4006 .scale = 0.25f,
4007 .zeroPoint = 128,
4008 .lifetime = OperandLifeTime::MODEL_INPUT,
4009 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4010 },
4011 {
4012 .type = OperandType::INT32,
4013 .dimensions = {},
4014 .numberOfConsumers = 1,
4015 .scale = 0.0f,
4016 .zeroPoint = 0,
4017 .lifetime = OperandLifeTime::CONSTANT_COPY,
4018 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4019 },
4020 {
4021 .type = OperandType::INT32,
4022 .dimensions = {},
4023 .numberOfConsumers = 1,
4024 .scale = 0.0f,
4025 .zeroPoint = 0,
4026 .lifetime = OperandLifeTime::CONSTANT_COPY,
4027 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4028 },
4029 {
4030 .type = OperandType::TENSOR_QUANT8_ASYMM,
4031 .dimensions = {3, 12},
4032 .numberOfConsumers = 0,
4033 .scale = 0.25f,
4034 .zeroPoint = 128,
4035 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4036 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4037 }
4038 };
4039
4040 const std::vector<Operation> operations = {
4041 {
4042 .type = OperationType::CHANNEL_SHUFFLE,
4043 .inputs = {0, 1, 2},
4044 .outputs = {3},
4045 }
4046 };
4047
4048 const std::vector<uint32_t> inputIndexes = {0};
4049 const std::vector<uint32_t> outputIndexes = {3};
4050 std::vector<uint8_t> operandValues = {
4051 3, 0, 0, 0, 1, 0, 0, 0
4052 };
4053 const std::vector<hidl_memory> pools = {};
4054
4055 return {
4056 .operands = operands,
4057 .operations = operations,
4058 .inputIndexes = inputIndexes,
4059 .outputIndexes = outputIndexes,
4060 .operandValues = operandValues,
4061 .pools = pools,
4062 };
4063 }
4064
is_ignored_quant8_dim2_axis1(int i)4065 inline bool is_ignored_quant8_dim2_axis1(int i) {
4066 static std::set<int> ignore = {};
4067 return ignore.find(i) != ignore.end();
4068 }
4069
4070 // Create the model
createTestModel_quant8_dim2_axis1_neg()4071 Model createTestModel_quant8_dim2_axis1_neg() {
4072 const std::vector<Operand> operands = {
4073 {
4074 .type = OperandType::TENSOR_QUANT8_ASYMM,
4075 .dimensions = {3, 12},
4076 .numberOfConsumers = 1,
4077 .scale = 0.25f,
4078 .zeroPoint = 128,
4079 .lifetime = OperandLifeTime::MODEL_INPUT,
4080 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4081 },
4082 {
4083 .type = OperandType::INT32,
4084 .dimensions = {},
4085 .numberOfConsumers = 1,
4086 .scale = 0.0f,
4087 .zeroPoint = 0,
4088 .lifetime = OperandLifeTime::CONSTANT_COPY,
4089 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4090 },
4091 {
4092 .type = OperandType::INT32,
4093 .dimensions = {},
4094 .numberOfConsumers = 1,
4095 .scale = 0.0f,
4096 .zeroPoint = 0,
4097 .lifetime = OperandLifeTime::CONSTANT_COPY,
4098 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4099 },
4100 {
4101 .type = OperandType::TENSOR_QUANT8_ASYMM,
4102 .dimensions = {3, 12},
4103 .numberOfConsumers = 0,
4104 .scale = 0.25f,
4105 .zeroPoint = 128,
4106 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4107 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4108 }
4109 };
4110
4111 const std::vector<Operation> operations = {
4112 {
4113 .type = OperationType::CHANNEL_SHUFFLE,
4114 .inputs = {0, 1, 2},
4115 .outputs = {3},
4116 }
4117 };
4118
4119 const std::vector<uint32_t> inputIndexes = {0};
4120 const std::vector<uint32_t> outputIndexes = {3};
4121 std::vector<uint8_t> operandValues = {
4122 3, 0, 0, 0, 255, 255, 255, 255
4123 };
4124 const std::vector<hidl_memory> pools = {};
4125
4126 return {
4127 .operands = operands,
4128 .operations = operations,
4129 .inputIndexes = inputIndexes,
4130 .outputIndexes = outputIndexes,
4131 .operandValues = operandValues,
4132 .pools = pools,
4133 };
4134 }
4135
is_ignored_quant8_dim2_axis1_neg(int i)4136 inline bool is_ignored_quant8_dim2_axis1_neg(int i) {
4137 static std::set<int> ignore = {};
4138 return ignore.find(i) != ignore.end();
4139 }
4140
4141 // Create the model
createTestModel_quant8_dim1_axis0()4142 Model createTestModel_quant8_dim1_axis0() {
4143 const std::vector<Operand> operands = {
4144 {
4145 .type = OperandType::TENSOR_QUANT8_ASYMM,
4146 .dimensions = {12},
4147 .numberOfConsumers = 1,
4148 .scale = 0.25f,
4149 .zeroPoint = 128,
4150 .lifetime = OperandLifeTime::MODEL_INPUT,
4151 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4152 },
4153 {
4154 .type = OperandType::INT32,
4155 .dimensions = {},
4156 .numberOfConsumers = 1,
4157 .scale = 0.0f,
4158 .zeroPoint = 0,
4159 .lifetime = OperandLifeTime::CONSTANT_COPY,
4160 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4161 },
4162 {
4163 .type = OperandType::INT32,
4164 .dimensions = {},
4165 .numberOfConsumers = 1,
4166 .scale = 0.0f,
4167 .zeroPoint = 0,
4168 .lifetime = OperandLifeTime::CONSTANT_COPY,
4169 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4170 },
4171 {
4172 .type = OperandType::TENSOR_QUANT8_ASYMM,
4173 .dimensions = {12},
4174 .numberOfConsumers = 0,
4175 .scale = 0.25f,
4176 .zeroPoint = 128,
4177 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4178 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4179 }
4180 };
4181
4182 const std::vector<Operation> operations = {
4183 {
4184 .type = OperationType::CHANNEL_SHUFFLE,
4185 .inputs = {0, 1, 2},
4186 .outputs = {3},
4187 }
4188 };
4189
4190 const std::vector<uint32_t> inputIndexes = {0};
4191 const std::vector<uint32_t> outputIndexes = {3};
4192 std::vector<uint8_t> operandValues = {
4193 3, 0, 0, 0, 0, 0, 0, 0
4194 };
4195 const std::vector<hidl_memory> pools = {};
4196
4197 return {
4198 .operands = operands,
4199 .operations = operations,
4200 .inputIndexes = inputIndexes,
4201 .outputIndexes = outputIndexes,
4202 .operandValues = operandValues,
4203 .pools = pools,
4204 };
4205 }
4206
is_ignored_quant8_dim1_axis0(int i)4207 inline bool is_ignored_quant8_dim1_axis0(int i) {
4208 static std::set<int> ignore = {};
4209 return ignore.find(i) != ignore.end();
4210 }
4211
4212 // Create the model
createTestModel_quant8_dim1_axis0_neg()4213 Model createTestModel_quant8_dim1_axis0_neg() {
4214 const std::vector<Operand> operands = {
4215 {
4216 .type = OperandType::TENSOR_QUANT8_ASYMM,
4217 .dimensions = {12},
4218 .numberOfConsumers = 1,
4219 .scale = 0.25f,
4220 .zeroPoint = 128,
4221 .lifetime = OperandLifeTime::MODEL_INPUT,
4222 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4223 },
4224 {
4225 .type = OperandType::INT32,
4226 .dimensions = {},
4227 .numberOfConsumers = 1,
4228 .scale = 0.0f,
4229 .zeroPoint = 0,
4230 .lifetime = OperandLifeTime::CONSTANT_COPY,
4231 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4232 },
4233 {
4234 .type = OperandType::INT32,
4235 .dimensions = {},
4236 .numberOfConsumers = 1,
4237 .scale = 0.0f,
4238 .zeroPoint = 0,
4239 .lifetime = OperandLifeTime::CONSTANT_COPY,
4240 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4241 },
4242 {
4243 .type = OperandType::TENSOR_QUANT8_ASYMM,
4244 .dimensions = {12},
4245 .numberOfConsumers = 0,
4246 .scale = 0.25f,
4247 .zeroPoint = 128,
4248 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4249 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4250 }
4251 };
4252
4253 const std::vector<Operation> operations = {
4254 {
4255 .type = OperationType::CHANNEL_SHUFFLE,
4256 .inputs = {0, 1, 2},
4257 .outputs = {3},
4258 }
4259 };
4260
4261 const std::vector<uint32_t> inputIndexes = {0};
4262 const std::vector<uint32_t> outputIndexes = {3};
4263 std::vector<uint8_t> operandValues = {
4264 3, 0, 0, 0, 255, 255, 255, 255
4265 };
4266 const std::vector<hidl_memory> pools = {};
4267
4268 return {
4269 .operands = operands,
4270 .operations = operations,
4271 .inputIndexes = inputIndexes,
4272 .outputIndexes = outputIndexes,
4273 .operandValues = operandValues,
4274 .pools = pools,
4275 };
4276 }
4277
is_ignored_quant8_dim1_axis0_neg(int i)4278 inline bool is_ignored_quant8_dim1_axis0_neg(int i) {
4279 static std::set<int> ignore = {};
4280 return ignore.find(i) != ignore.end();
4281 }
4282
4283 // Create the model
createTestModel_float16_dim4_axis0()4284 Model createTestModel_float16_dim4_axis0() {
4285 const std::vector<Operand> operands = {
4286 {
4287 .type = OperandType::TENSOR_FLOAT16,
4288 .dimensions = {12, 2, 2, 3},
4289 .numberOfConsumers = 1,
4290 .scale = 0.0f,
4291 .zeroPoint = 0,
4292 .lifetime = OperandLifeTime::MODEL_INPUT,
4293 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4294 },
4295 {
4296 .type = OperandType::INT32,
4297 .dimensions = {},
4298 .numberOfConsumers = 1,
4299 .scale = 0.0f,
4300 .zeroPoint = 0,
4301 .lifetime = OperandLifeTime::CONSTANT_COPY,
4302 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4303 },
4304 {
4305 .type = OperandType::INT32,
4306 .dimensions = {},
4307 .numberOfConsumers = 1,
4308 .scale = 0.0f,
4309 .zeroPoint = 0,
4310 .lifetime = OperandLifeTime::CONSTANT_COPY,
4311 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4312 },
4313 {
4314 .type = OperandType::TENSOR_FLOAT16,
4315 .dimensions = {12, 2, 2, 3},
4316 .numberOfConsumers = 0,
4317 .scale = 0.0f,
4318 .zeroPoint = 0,
4319 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4320 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4321 }
4322 };
4323
4324 const std::vector<Operation> operations = {
4325 {
4326 .type = OperationType::CHANNEL_SHUFFLE,
4327 .inputs = {0, 1, 2},
4328 .outputs = {3},
4329 }
4330 };
4331
4332 const std::vector<uint32_t> inputIndexes = {0};
4333 const std::vector<uint32_t> outputIndexes = {3};
4334 std::vector<uint8_t> operandValues = {
4335 3, 0, 0, 0, 0, 0, 0, 0
4336 };
4337 const std::vector<hidl_memory> pools = {};
4338
4339 return {
4340 .operands = operands,
4341 .operations = operations,
4342 .inputIndexes = inputIndexes,
4343 .outputIndexes = outputIndexes,
4344 .operandValues = operandValues,
4345 .pools = pools,
4346 };
4347 }
4348
is_ignored_float16_dim4_axis0(int i)4349 inline bool is_ignored_float16_dim4_axis0(int i) {
4350 static std::set<int> ignore = {};
4351 return ignore.find(i) != ignore.end();
4352 }
4353
4354 // Create the model
createTestModel_float16_dim4_axis0_neg()4355 Model createTestModel_float16_dim4_axis0_neg() {
4356 const std::vector<Operand> operands = {
4357 {
4358 .type = OperandType::TENSOR_FLOAT16,
4359 .dimensions = {12, 2, 2, 3},
4360 .numberOfConsumers = 1,
4361 .scale = 0.0f,
4362 .zeroPoint = 0,
4363 .lifetime = OperandLifeTime::MODEL_INPUT,
4364 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4365 },
4366 {
4367 .type = OperandType::INT32,
4368 .dimensions = {},
4369 .numberOfConsumers = 1,
4370 .scale = 0.0f,
4371 .zeroPoint = 0,
4372 .lifetime = OperandLifeTime::CONSTANT_COPY,
4373 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4374 },
4375 {
4376 .type = OperandType::INT32,
4377 .dimensions = {},
4378 .numberOfConsumers = 1,
4379 .scale = 0.0f,
4380 .zeroPoint = 0,
4381 .lifetime = OperandLifeTime::CONSTANT_COPY,
4382 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4383 },
4384 {
4385 .type = OperandType::TENSOR_FLOAT16,
4386 .dimensions = {12, 2, 2, 3},
4387 .numberOfConsumers = 0,
4388 .scale = 0.0f,
4389 .zeroPoint = 0,
4390 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4391 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4392 }
4393 };
4394
4395 const std::vector<Operation> operations = {
4396 {
4397 .type = OperationType::CHANNEL_SHUFFLE,
4398 .inputs = {0, 1, 2},
4399 .outputs = {3},
4400 }
4401 };
4402
4403 const std::vector<uint32_t> inputIndexes = {0};
4404 const std::vector<uint32_t> outputIndexes = {3};
4405 std::vector<uint8_t> operandValues = {
4406 3, 0, 0, 0, 252, 255, 255, 255
4407 };
4408 const std::vector<hidl_memory> pools = {};
4409
4410 return {
4411 .operands = operands,
4412 .operations = operations,
4413 .inputIndexes = inputIndexes,
4414 .outputIndexes = outputIndexes,
4415 .operandValues = operandValues,
4416 .pools = pools,
4417 };
4418 }
4419
is_ignored_float16_dim4_axis0_neg(int i)4420 inline bool is_ignored_float16_dim4_axis0_neg(int i) {
4421 static std::set<int> ignore = {};
4422 return ignore.find(i) != ignore.end();
4423 }
4424
4425 // Create the model
createTestModel_float16_dim4_axis1()4426 Model createTestModel_float16_dim4_axis1() {
4427 const std::vector<Operand> operands = {
4428 {
4429 .type = OperandType::TENSOR_FLOAT16,
4430 .dimensions = {2, 12, 2, 3},
4431 .numberOfConsumers = 1,
4432 .scale = 0.0f,
4433 .zeroPoint = 0,
4434 .lifetime = OperandLifeTime::MODEL_INPUT,
4435 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4436 },
4437 {
4438 .type = OperandType::INT32,
4439 .dimensions = {},
4440 .numberOfConsumers = 1,
4441 .scale = 0.0f,
4442 .zeroPoint = 0,
4443 .lifetime = OperandLifeTime::CONSTANT_COPY,
4444 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4445 },
4446 {
4447 .type = OperandType::INT32,
4448 .dimensions = {},
4449 .numberOfConsumers = 1,
4450 .scale = 0.0f,
4451 .zeroPoint = 0,
4452 .lifetime = OperandLifeTime::CONSTANT_COPY,
4453 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4454 },
4455 {
4456 .type = OperandType::TENSOR_FLOAT16,
4457 .dimensions = {2, 12, 2, 3},
4458 .numberOfConsumers = 0,
4459 .scale = 0.0f,
4460 .zeroPoint = 0,
4461 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4462 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4463 }
4464 };
4465
4466 const std::vector<Operation> operations = {
4467 {
4468 .type = OperationType::CHANNEL_SHUFFLE,
4469 .inputs = {0, 1, 2},
4470 .outputs = {3},
4471 }
4472 };
4473
4474 const std::vector<uint32_t> inputIndexes = {0};
4475 const std::vector<uint32_t> outputIndexes = {3};
4476 std::vector<uint8_t> operandValues = {
4477 3, 0, 0, 0, 1, 0, 0, 0
4478 };
4479 const std::vector<hidl_memory> pools = {};
4480
4481 return {
4482 .operands = operands,
4483 .operations = operations,
4484 .inputIndexes = inputIndexes,
4485 .outputIndexes = outputIndexes,
4486 .operandValues = operandValues,
4487 .pools = pools,
4488 };
4489 }
4490
is_ignored_float16_dim4_axis1(int i)4491 inline bool is_ignored_float16_dim4_axis1(int i) {
4492 static std::set<int> ignore = {};
4493 return ignore.find(i) != ignore.end();
4494 }
4495
4496 // Create the model
createTestModel_float16_dim4_axis1_neg()4497 Model createTestModel_float16_dim4_axis1_neg() {
4498 const std::vector<Operand> operands = {
4499 {
4500 .type = OperandType::TENSOR_FLOAT16,
4501 .dimensions = {2, 12, 2, 3},
4502 .numberOfConsumers = 1,
4503 .scale = 0.0f,
4504 .zeroPoint = 0,
4505 .lifetime = OperandLifeTime::MODEL_INPUT,
4506 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4507 },
4508 {
4509 .type = OperandType::INT32,
4510 .dimensions = {},
4511 .numberOfConsumers = 1,
4512 .scale = 0.0f,
4513 .zeroPoint = 0,
4514 .lifetime = OperandLifeTime::CONSTANT_COPY,
4515 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4516 },
4517 {
4518 .type = OperandType::INT32,
4519 .dimensions = {},
4520 .numberOfConsumers = 1,
4521 .scale = 0.0f,
4522 .zeroPoint = 0,
4523 .lifetime = OperandLifeTime::CONSTANT_COPY,
4524 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4525 },
4526 {
4527 .type = OperandType::TENSOR_FLOAT16,
4528 .dimensions = {2, 12, 2, 3},
4529 .numberOfConsumers = 0,
4530 .scale = 0.0f,
4531 .zeroPoint = 0,
4532 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4533 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4534 }
4535 };
4536
4537 const std::vector<Operation> operations = {
4538 {
4539 .type = OperationType::CHANNEL_SHUFFLE,
4540 .inputs = {0, 1, 2},
4541 .outputs = {3},
4542 }
4543 };
4544
4545 const std::vector<uint32_t> inputIndexes = {0};
4546 const std::vector<uint32_t> outputIndexes = {3};
4547 std::vector<uint8_t> operandValues = {
4548 3, 0, 0, 0, 253, 255, 255, 255
4549 };
4550 const std::vector<hidl_memory> pools = {};
4551
4552 return {
4553 .operands = operands,
4554 .operations = operations,
4555 .inputIndexes = inputIndexes,
4556 .outputIndexes = outputIndexes,
4557 .operandValues = operandValues,
4558 .pools = pools,
4559 };
4560 }
4561
is_ignored_float16_dim4_axis1_neg(int i)4562 inline bool is_ignored_float16_dim4_axis1_neg(int i) {
4563 static std::set<int> ignore = {};
4564 return ignore.find(i) != ignore.end();
4565 }
4566
4567 // Create the model
createTestModel_float16_dim4_axis2()4568 Model createTestModel_float16_dim4_axis2() {
4569 const std::vector<Operand> operands = {
4570 {
4571 .type = OperandType::TENSOR_FLOAT16,
4572 .dimensions = {2, 2, 12, 3},
4573 .numberOfConsumers = 1,
4574 .scale = 0.0f,
4575 .zeroPoint = 0,
4576 .lifetime = OperandLifeTime::MODEL_INPUT,
4577 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4578 },
4579 {
4580 .type = OperandType::INT32,
4581 .dimensions = {},
4582 .numberOfConsumers = 1,
4583 .scale = 0.0f,
4584 .zeroPoint = 0,
4585 .lifetime = OperandLifeTime::CONSTANT_COPY,
4586 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4587 },
4588 {
4589 .type = OperandType::INT32,
4590 .dimensions = {},
4591 .numberOfConsumers = 1,
4592 .scale = 0.0f,
4593 .zeroPoint = 0,
4594 .lifetime = OperandLifeTime::CONSTANT_COPY,
4595 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4596 },
4597 {
4598 .type = OperandType::TENSOR_FLOAT16,
4599 .dimensions = {2, 2, 12, 3},
4600 .numberOfConsumers = 0,
4601 .scale = 0.0f,
4602 .zeroPoint = 0,
4603 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4604 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4605 }
4606 };
4607
4608 const std::vector<Operation> operations = {
4609 {
4610 .type = OperationType::CHANNEL_SHUFFLE,
4611 .inputs = {0, 1, 2},
4612 .outputs = {3},
4613 }
4614 };
4615
4616 const std::vector<uint32_t> inputIndexes = {0};
4617 const std::vector<uint32_t> outputIndexes = {3};
4618 std::vector<uint8_t> operandValues = {
4619 3, 0, 0, 0, 2, 0, 0, 0
4620 };
4621 const std::vector<hidl_memory> pools = {};
4622
4623 return {
4624 .operands = operands,
4625 .operations = operations,
4626 .inputIndexes = inputIndexes,
4627 .outputIndexes = outputIndexes,
4628 .operandValues = operandValues,
4629 .pools = pools,
4630 };
4631 }
4632
is_ignored_float16_dim4_axis2(int i)4633 inline bool is_ignored_float16_dim4_axis2(int i) {
4634 static std::set<int> ignore = {};
4635 return ignore.find(i) != ignore.end();
4636 }
4637
4638 // Create the model
createTestModel_float16_dim4_axis2_neg()4639 Model createTestModel_float16_dim4_axis2_neg() {
4640 const std::vector<Operand> operands = {
4641 {
4642 .type = OperandType::TENSOR_FLOAT16,
4643 .dimensions = {2, 2, 12, 3},
4644 .numberOfConsumers = 1,
4645 .scale = 0.0f,
4646 .zeroPoint = 0,
4647 .lifetime = OperandLifeTime::MODEL_INPUT,
4648 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4649 },
4650 {
4651 .type = OperandType::INT32,
4652 .dimensions = {},
4653 .numberOfConsumers = 1,
4654 .scale = 0.0f,
4655 .zeroPoint = 0,
4656 .lifetime = OperandLifeTime::CONSTANT_COPY,
4657 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4658 },
4659 {
4660 .type = OperandType::INT32,
4661 .dimensions = {},
4662 .numberOfConsumers = 1,
4663 .scale = 0.0f,
4664 .zeroPoint = 0,
4665 .lifetime = OperandLifeTime::CONSTANT_COPY,
4666 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4667 },
4668 {
4669 .type = OperandType::TENSOR_FLOAT16,
4670 .dimensions = {2, 2, 12, 3},
4671 .numberOfConsumers = 0,
4672 .scale = 0.0f,
4673 .zeroPoint = 0,
4674 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4675 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4676 }
4677 };
4678
4679 const std::vector<Operation> operations = {
4680 {
4681 .type = OperationType::CHANNEL_SHUFFLE,
4682 .inputs = {0, 1, 2},
4683 .outputs = {3},
4684 }
4685 };
4686
4687 const std::vector<uint32_t> inputIndexes = {0};
4688 const std::vector<uint32_t> outputIndexes = {3};
4689 std::vector<uint8_t> operandValues = {
4690 3, 0, 0, 0, 254, 255, 255, 255
4691 };
4692 const std::vector<hidl_memory> pools = {};
4693
4694 return {
4695 .operands = operands,
4696 .operations = operations,
4697 .inputIndexes = inputIndexes,
4698 .outputIndexes = outputIndexes,
4699 .operandValues = operandValues,
4700 .pools = pools,
4701 };
4702 }
4703
is_ignored_float16_dim4_axis2_neg(int i)4704 inline bool is_ignored_float16_dim4_axis2_neg(int i) {
4705 static std::set<int> ignore = {};
4706 return ignore.find(i) != ignore.end();
4707 }
4708
4709 // Create the model
createTestModel_float16_dim4_axis3()4710 Model createTestModel_float16_dim4_axis3() {
4711 const std::vector<Operand> operands = {
4712 {
4713 .type = OperandType::TENSOR_FLOAT16,
4714 .dimensions = {2, 2, 3, 12},
4715 .numberOfConsumers = 1,
4716 .scale = 0.0f,
4717 .zeroPoint = 0,
4718 .lifetime = OperandLifeTime::MODEL_INPUT,
4719 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4720 },
4721 {
4722 .type = OperandType::INT32,
4723 .dimensions = {},
4724 .numberOfConsumers = 1,
4725 .scale = 0.0f,
4726 .zeroPoint = 0,
4727 .lifetime = OperandLifeTime::CONSTANT_COPY,
4728 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4729 },
4730 {
4731 .type = OperandType::INT32,
4732 .dimensions = {},
4733 .numberOfConsumers = 1,
4734 .scale = 0.0f,
4735 .zeroPoint = 0,
4736 .lifetime = OperandLifeTime::CONSTANT_COPY,
4737 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4738 },
4739 {
4740 .type = OperandType::TENSOR_FLOAT16,
4741 .dimensions = {2, 2, 3, 12},
4742 .numberOfConsumers = 0,
4743 .scale = 0.0f,
4744 .zeroPoint = 0,
4745 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4746 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4747 }
4748 };
4749
4750 const std::vector<Operation> operations = {
4751 {
4752 .type = OperationType::CHANNEL_SHUFFLE,
4753 .inputs = {0, 1, 2},
4754 .outputs = {3},
4755 }
4756 };
4757
4758 const std::vector<uint32_t> inputIndexes = {0};
4759 const std::vector<uint32_t> outputIndexes = {3};
4760 std::vector<uint8_t> operandValues = {
4761 3, 0, 0, 0, 3, 0, 0, 0
4762 };
4763 const std::vector<hidl_memory> pools = {};
4764
4765 return {
4766 .operands = operands,
4767 .operations = operations,
4768 .inputIndexes = inputIndexes,
4769 .outputIndexes = outputIndexes,
4770 .operandValues = operandValues,
4771 .pools = pools,
4772 };
4773 }
4774
is_ignored_float16_dim4_axis3(int i)4775 inline bool is_ignored_float16_dim4_axis3(int i) {
4776 static std::set<int> ignore = {};
4777 return ignore.find(i) != ignore.end();
4778 }
4779
4780 // Create the model
createTestModel_float16_dim4_axis3_neg()4781 Model createTestModel_float16_dim4_axis3_neg() {
4782 const std::vector<Operand> operands = {
4783 {
4784 .type = OperandType::TENSOR_FLOAT16,
4785 .dimensions = {2, 2, 3, 12},
4786 .numberOfConsumers = 1,
4787 .scale = 0.0f,
4788 .zeroPoint = 0,
4789 .lifetime = OperandLifeTime::MODEL_INPUT,
4790 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4791 },
4792 {
4793 .type = OperandType::INT32,
4794 .dimensions = {},
4795 .numberOfConsumers = 1,
4796 .scale = 0.0f,
4797 .zeroPoint = 0,
4798 .lifetime = OperandLifeTime::CONSTANT_COPY,
4799 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4800 },
4801 {
4802 .type = OperandType::INT32,
4803 .dimensions = {},
4804 .numberOfConsumers = 1,
4805 .scale = 0.0f,
4806 .zeroPoint = 0,
4807 .lifetime = OperandLifeTime::CONSTANT_COPY,
4808 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4809 },
4810 {
4811 .type = OperandType::TENSOR_FLOAT16,
4812 .dimensions = {2, 2, 3, 12},
4813 .numberOfConsumers = 0,
4814 .scale = 0.0f,
4815 .zeroPoint = 0,
4816 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4817 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4818 }
4819 };
4820
4821 const std::vector<Operation> operations = {
4822 {
4823 .type = OperationType::CHANNEL_SHUFFLE,
4824 .inputs = {0, 1, 2},
4825 .outputs = {3},
4826 }
4827 };
4828
4829 const std::vector<uint32_t> inputIndexes = {0};
4830 const std::vector<uint32_t> outputIndexes = {3};
4831 std::vector<uint8_t> operandValues = {
4832 3, 0, 0, 0, 255, 255, 255, 255
4833 };
4834 const std::vector<hidl_memory> pools = {};
4835
4836 return {
4837 .operands = operands,
4838 .operations = operations,
4839 .inputIndexes = inputIndexes,
4840 .outputIndexes = outputIndexes,
4841 .operandValues = operandValues,
4842 .pools = pools,
4843 };
4844 }
4845
is_ignored_float16_dim4_axis3_neg(int i)4846 inline bool is_ignored_float16_dim4_axis3_neg(int i) {
4847 static std::set<int> ignore = {};
4848 return ignore.find(i) != ignore.end();
4849 }
4850
4851 // Create the model
createTestModel_float16_dim3_axis0()4852 Model createTestModel_float16_dim3_axis0() {
4853 const std::vector<Operand> operands = {
4854 {
4855 .type = OperandType::TENSOR_FLOAT16,
4856 .dimensions = {12, 2, 3},
4857 .numberOfConsumers = 1,
4858 .scale = 0.0f,
4859 .zeroPoint = 0,
4860 .lifetime = OperandLifeTime::MODEL_INPUT,
4861 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4862 },
4863 {
4864 .type = OperandType::INT32,
4865 .dimensions = {},
4866 .numberOfConsumers = 1,
4867 .scale = 0.0f,
4868 .zeroPoint = 0,
4869 .lifetime = OperandLifeTime::CONSTANT_COPY,
4870 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4871 },
4872 {
4873 .type = OperandType::INT32,
4874 .dimensions = {},
4875 .numberOfConsumers = 1,
4876 .scale = 0.0f,
4877 .zeroPoint = 0,
4878 .lifetime = OperandLifeTime::CONSTANT_COPY,
4879 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4880 },
4881 {
4882 .type = OperandType::TENSOR_FLOAT16,
4883 .dimensions = {12, 2, 3},
4884 .numberOfConsumers = 0,
4885 .scale = 0.0f,
4886 .zeroPoint = 0,
4887 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4888 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4889 }
4890 };
4891
4892 const std::vector<Operation> operations = {
4893 {
4894 .type = OperationType::CHANNEL_SHUFFLE,
4895 .inputs = {0, 1, 2},
4896 .outputs = {3},
4897 }
4898 };
4899
4900 const std::vector<uint32_t> inputIndexes = {0};
4901 const std::vector<uint32_t> outputIndexes = {3};
4902 std::vector<uint8_t> operandValues = {
4903 3, 0, 0, 0, 0, 0, 0, 0
4904 };
4905 const std::vector<hidl_memory> pools = {};
4906
4907 return {
4908 .operands = operands,
4909 .operations = operations,
4910 .inputIndexes = inputIndexes,
4911 .outputIndexes = outputIndexes,
4912 .operandValues = operandValues,
4913 .pools = pools,
4914 };
4915 }
4916
is_ignored_float16_dim3_axis0(int i)4917 inline bool is_ignored_float16_dim3_axis0(int i) {
4918 static std::set<int> ignore = {};
4919 return ignore.find(i) != ignore.end();
4920 }
4921
4922 // Create the model
createTestModel_float16_dim3_axis0_neg()4923 Model createTestModel_float16_dim3_axis0_neg() {
4924 const std::vector<Operand> operands = {
4925 {
4926 .type = OperandType::TENSOR_FLOAT16,
4927 .dimensions = {12, 2, 3},
4928 .numberOfConsumers = 1,
4929 .scale = 0.0f,
4930 .zeroPoint = 0,
4931 .lifetime = OperandLifeTime::MODEL_INPUT,
4932 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4933 },
4934 {
4935 .type = OperandType::INT32,
4936 .dimensions = {},
4937 .numberOfConsumers = 1,
4938 .scale = 0.0f,
4939 .zeroPoint = 0,
4940 .lifetime = OperandLifeTime::CONSTANT_COPY,
4941 .location = {.poolIndex = 0, .offset = 0, .length = 4},
4942 },
4943 {
4944 .type = OperandType::INT32,
4945 .dimensions = {},
4946 .numberOfConsumers = 1,
4947 .scale = 0.0f,
4948 .zeroPoint = 0,
4949 .lifetime = OperandLifeTime::CONSTANT_COPY,
4950 .location = {.poolIndex = 0, .offset = 4, .length = 4},
4951 },
4952 {
4953 .type = OperandType::TENSOR_FLOAT16,
4954 .dimensions = {12, 2, 3},
4955 .numberOfConsumers = 0,
4956 .scale = 0.0f,
4957 .zeroPoint = 0,
4958 .lifetime = OperandLifeTime::MODEL_OUTPUT,
4959 .location = {.poolIndex = 0, .offset = 0, .length = 0},
4960 }
4961 };
4962
4963 const std::vector<Operation> operations = {
4964 {
4965 .type = OperationType::CHANNEL_SHUFFLE,
4966 .inputs = {0, 1, 2},
4967 .outputs = {3},
4968 }
4969 };
4970
4971 const std::vector<uint32_t> inputIndexes = {0};
4972 const std::vector<uint32_t> outputIndexes = {3};
4973 std::vector<uint8_t> operandValues = {
4974 3, 0, 0, 0, 253, 255, 255, 255
4975 };
4976 const std::vector<hidl_memory> pools = {};
4977
4978 return {
4979 .operands = operands,
4980 .operations = operations,
4981 .inputIndexes = inputIndexes,
4982 .outputIndexes = outputIndexes,
4983 .operandValues = operandValues,
4984 .pools = pools,
4985 };
4986 }
4987
is_ignored_float16_dim3_axis0_neg(int i)4988 inline bool is_ignored_float16_dim3_axis0_neg(int i) {
4989 static std::set<int> ignore = {};
4990 return ignore.find(i) != ignore.end();
4991 }
4992
4993 // Create the model
createTestModel_float16_dim3_axis1()4994 Model createTestModel_float16_dim3_axis1() {
4995 const std::vector<Operand> operands = {
4996 {
4997 .type = OperandType::TENSOR_FLOAT16,
4998 .dimensions = {2, 12, 3},
4999 .numberOfConsumers = 1,
5000 .scale = 0.0f,
5001 .zeroPoint = 0,
5002 .lifetime = OperandLifeTime::MODEL_INPUT,
5003 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5004 },
5005 {
5006 .type = OperandType::INT32,
5007 .dimensions = {},
5008 .numberOfConsumers = 1,
5009 .scale = 0.0f,
5010 .zeroPoint = 0,
5011 .lifetime = OperandLifeTime::CONSTANT_COPY,
5012 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5013 },
5014 {
5015 .type = OperandType::INT32,
5016 .dimensions = {},
5017 .numberOfConsumers = 1,
5018 .scale = 0.0f,
5019 .zeroPoint = 0,
5020 .lifetime = OperandLifeTime::CONSTANT_COPY,
5021 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5022 },
5023 {
5024 .type = OperandType::TENSOR_FLOAT16,
5025 .dimensions = {2, 12, 3},
5026 .numberOfConsumers = 0,
5027 .scale = 0.0f,
5028 .zeroPoint = 0,
5029 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5030 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5031 }
5032 };
5033
5034 const std::vector<Operation> operations = {
5035 {
5036 .type = OperationType::CHANNEL_SHUFFLE,
5037 .inputs = {0, 1, 2},
5038 .outputs = {3},
5039 }
5040 };
5041
5042 const std::vector<uint32_t> inputIndexes = {0};
5043 const std::vector<uint32_t> outputIndexes = {3};
5044 std::vector<uint8_t> operandValues = {
5045 3, 0, 0, 0, 1, 0, 0, 0
5046 };
5047 const std::vector<hidl_memory> pools = {};
5048
5049 return {
5050 .operands = operands,
5051 .operations = operations,
5052 .inputIndexes = inputIndexes,
5053 .outputIndexes = outputIndexes,
5054 .operandValues = operandValues,
5055 .pools = pools,
5056 };
5057 }
5058
is_ignored_float16_dim3_axis1(int i)5059 inline bool is_ignored_float16_dim3_axis1(int i) {
5060 static std::set<int> ignore = {};
5061 return ignore.find(i) != ignore.end();
5062 }
5063
5064 // Create the model
createTestModel_float16_dim3_axis1_neg()5065 Model createTestModel_float16_dim3_axis1_neg() {
5066 const std::vector<Operand> operands = {
5067 {
5068 .type = OperandType::TENSOR_FLOAT16,
5069 .dimensions = {2, 12, 3},
5070 .numberOfConsumers = 1,
5071 .scale = 0.0f,
5072 .zeroPoint = 0,
5073 .lifetime = OperandLifeTime::MODEL_INPUT,
5074 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5075 },
5076 {
5077 .type = OperandType::INT32,
5078 .dimensions = {},
5079 .numberOfConsumers = 1,
5080 .scale = 0.0f,
5081 .zeroPoint = 0,
5082 .lifetime = OperandLifeTime::CONSTANT_COPY,
5083 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5084 },
5085 {
5086 .type = OperandType::INT32,
5087 .dimensions = {},
5088 .numberOfConsumers = 1,
5089 .scale = 0.0f,
5090 .zeroPoint = 0,
5091 .lifetime = OperandLifeTime::CONSTANT_COPY,
5092 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5093 },
5094 {
5095 .type = OperandType::TENSOR_FLOAT16,
5096 .dimensions = {2, 12, 3},
5097 .numberOfConsumers = 0,
5098 .scale = 0.0f,
5099 .zeroPoint = 0,
5100 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5101 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5102 }
5103 };
5104
5105 const std::vector<Operation> operations = {
5106 {
5107 .type = OperationType::CHANNEL_SHUFFLE,
5108 .inputs = {0, 1, 2},
5109 .outputs = {3},
5110 }
5111 };
5112
5113 const std::vector<uint32_t> inputIndexes = {0};
5114 const std::vector<uint32_t> outputIndexes = {3};
5115 std::vector<uint8_t> operandValues = {
5116 3, 0, 0, 0, 254, 255, 255, 255
5117 };
5118 const std::vector<hidl_memory> pools = {};
5119
5120 return {
5121 .operands = operands,
5122 .operations = operations,
5123 .inputIndexes = inputIndexes,
5124 .outputIndexes = outputIndexes,
5125 .operandValues = operandValues,
5126 .pools = pools,
5127 };
5128 }
5129
is_ignored_float16_dim3_axis1_neg(int i)5130 inline bool is_ignored_float16_dim3_axis1_neg(int i) {
5131 static std::set<int> ignore = {};
5132 return ignore.find(i) != ignore.end();
5133 }
5134
5135 // Create the model
createTestModel_float16_dim3_axis2()5136 Model createTestModel_float16_dim3_axis2() {
5137 const std::vector<Operand> operands = {
5138 {
5139 .type = OperandType::TENSOR_FLOAT16,
5140 .dimensions = {2, 3, 12},
5141 .numberOfConsumers = 1,
5142 .scale = 0.0f,
5143 .zeroPoint = 0,
5144 .lifetime = OperandLifeTime::MODEL_INPUT,
5145 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5146 },
5147 {
5148 .type = OperandType::INT32,
5149 .dimensions = {},
5150 .numberOfConsumers = 1,
5151 .scale = 0.0f,
5152 .zeroPoint = 0,
5153 .lifetime = OperandLifeTime::CONSTANT_COPY,
5154 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5155 },
5156 {
5157 .type = OperandType::INT32,
5158 .dimensions = {},
5159 .numberOfConsumers = 1,
5160 .scale = 0.0f,
5161 .zeroPoint = 0,
5162 .lifetime = OperandLifeTime::CONSTANT_COPY,
5163 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5164 },
5165 {
5166 .type = OperandType::TENSOR_FLOAT16,
5167 .dimensions = {2, 3, 12},
5168 .numberOfConsumers = 0,
5169 .scale = 0.0f,
5170 .zeroPoint = 0,
5171 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5172 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5173 }
5174 };
5175
5176 const std::vector<Operation> operations = {
5177 {
5178 .type = OperationType::CHANNEL_SHUFFLE,
5179 .inputs = {0, 1, 2},
5180 .outputs = {3},
5181 }
5182 };
5183
5184 const std::vector<uint32_t> inputIndexes = {0};
5185 const std::vector<uint32_t> outputIndexes = {3};
5186 std::vector<uint8_t> operandValues = {
5187 3, 0, 0, 0, 2, 0, 0, 0
5188 };
5189 const std::vector<hidl_memory> pools = {};
5190
5191 return {
5192 .operands = operands,
5193 .operations = operations,
5194 .inputIndexes = inputIndexes,
5195 .outputIndexes = outputIndexes,
5196 .operandValues = operandValues,
5197 .pools = pools,
5198 };
5199 }
5200
is_ignored_float16_dim3_axis2(int i)5201 inline bool is_ignored_float16_dim3_axis2(int i) {
5202 static std::set<int> ignore = {};
5203 return ignore.find(i) != ignore.end();
5204 }
5205
5206 // Create the model
createTestModel_float16_dim3_axis2_neg()5207 Model createTestModel_float16_dim3_axis2_neg() {
5208 const std::vector<Operand> operands = {
5209 {
5210 .type = OperandType::TENSOR_FLOAT16,
5211 .dimensions = {2, 3, 12},
5212 .numberOfConsumers = 1,
5213 .scale = 0.0f,
5214 .zeroPoint = 0,
5215 .lifetime = OperandLifeTime::MODEL_INPUT,
5216 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5217 },
5218 {
5219 .type = OperandType::INT32,
5220 .dimensions = {},
5221 .numberOfConsumers = 1,
5222 .scale = 0.0f,
5223 .zeroPoint = 0,
5224 .lifetime = OperandLifeTime::CONSTANT_COPY,
5225 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5226 },
5227 {
5228 .type = OperandType::INT32,
5229 .dimensions = {},
5230 .numberOfConsumers = 1,
5231 .scale = 0.0f,
5232 .zeroPoint = 0,
5233 .lifetime = OperandLifeTime::CONSTANT_COPY,
5234 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5235 },
5236 {
5237 .type = OperandType::TENSOR_FLOAT16,
5238 .dimensions = {2, 3, 12},
5239 .numberOfConsumers = 0,
5240 .scale = 0.0f,
5241 .zeroPoint = 0,
5242 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5243 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5244 }
5245 };
5246
5247 const std::vector<Operation> operations = {
5248 {
5249 .type = OperationType::CHANNEL_SHUFFLE,
5250 .inputs = {0, 1, 2},
5251 .outputs = {3},
5252 }
5253 };
5254
5255 const std::vector<uint32_t> inputIndexes = {0};
5256 const std::vector<uint32_t> outputIndexes = {3};
5257 std::vector<uint8_t> operandValues = {
5258 3, 0, 0, 0, 255, 255, 255, 255
5259 };
5260 const std::vector<hidl_memory> pools = {};
5261
5262 return {
5263 .operands = operands,
5264 .operations = operations,
5265 .inputIndexes = inputIndexes,
5266 .outputIndexes = outputIndexes,
5267 .operandValues = operandValues,
5268 .pools = pools,
5269 };
5270 }
5271
is_ignored_float16_dim3_axis2_neg(int i)5272 inline bool is_ignored_float16_dim3_axis2_neg(int i) {
5273 static std::set<int> ignore = {};
5274 return ignore.find(i) != ignore.end();
5275 }
5276
5277 // Create the model
createTestModel_float16_dim2_axis0()5278 Model createTestModel_float16_dim2_axis0() {
5279 const std::vector<Operand> operands = {
5280 {
5281 .type = OperandType::TENSOR_FLOAT16,
5282 .dimensions = {12, 3},
5283 .numberOfConsumers = 1,
5284 .scale = 0.0f,
5285 .zeroPoint = 0,
5286 .lifetime = OperandLifeTime::MODEL_INPUT,
5287 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5288 },
5289 {
5290 .type = OperandType::INT32,
5291 .dimensions = {},
5292 .numberOfConsumers = 1,
5293 .scale = 0.0f,
5294 .zeroPoint = 0,
5295 .lifetime = OperandLifeTime::CONSTANT_COPY,
5296 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5297 },
5298 {
5299 .type = OperandType::INT32,
5300 .dimensions = {},
5301 .numberOfConsumers = 1,
5302 .scale = 0.0f,
5303 .zeroPoint = 0,
5304 .lifetime = OperandLifeTime::CONSTANT_COPY,
5305 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5306 },
5307 {
5308 .type = OperandType::TENSOR_FLOAT16,
5309 .dimensions = {12, 3},
5310 .numberOfConsumers = 0,
5311 .scale = 0.0f,
5312 .zeroPoint = 0,
5313 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5314 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5315 }
5316 };
5317
5318 const std::vector<Operation> operations = {
5319 {
5320 .type = OperationType::CHANNEL_SHUFFLE,
5321 .inputs = {0, 1, 2},
5322 .outputs = {3},
5323 }
5324 };
5325
5326 const std::vector<uint32_t> inputIndexes = {0};
5327 const std::vector<uint32_t> outputIndexes = {3};
5328 std::vector<uint8_t> operandValues = {
5329 3, 0, 0, 0, 0, 0, 0, 0
5330 };
5331 const std::vector<hidl_memory> pools = {};
5332
5333 return {
5334 .operands = operands,
5335 .operations = operations,
5336 .inputIndexes = inputIndexes,
5337 .outputIndexes = outputIndexes,
5338 .operandValues = operandValues,
5339 .pools = pools,
5340 };
5341 }
5342
is_ignored_float16_dim2_axis0(int i)5343 inline bool is_ignored_float16_dim2_axis0(int i) {
5344 static std::set<int> ignore = {};
5345 return ignore.find(i) != ignore.end();
5346 }
5347
5348 // Create the model
createTestModel_float16_dim2_axis0_neg()5349 Model createTestModel_float16_dim2_axis0_neg() {
5350 const std::vector<Operand> operands = {
5351 {
5352 .type = OperandType::TENSOR_FLOAT16,
5353 .dimensions = {12, 3},
5354 .numberOfConsumers = 1,
5355 .scale = 0.0f,
5356 .zeroPoint = 0,
5357 .lifetime = OperandLifeTime::MODEL_INPUT,
5358 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5359 },
5360 {
5361 .type = OperandType::INT32,
5362 .dimensions = {},
5363 .numberOfConsumers = 1,
5364 .scale = 0.0f,
5365 .zeroPoint = 0,
5366 .lifetime = OperandLifeTime::CONSTANT_COPY,
5367 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5368 },
5369 {
5370 .type = OperandType::INT32,
5371 .dimensions = {},
5372 .numberOfConsumers = 1,
5373 .scale = 0.0f,
5374 .zeroPoint = 0,
5375 .lifetime = OperandLifeTime::CONSTANT_COPY,
5376 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5377 },
5378 {
5379 .type = OperandType::TENSOR_FLOAT16,
5380 .dimensions = {12, 3},
5381 .numberOfConsumers = 0,
5382 .scale = 0.0f,
5383 .zeroPoint = 0,
5384 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5385 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5386 }
5387 };
5388
5389 const std::vector<Operation> operations = {
5390 {
5391 .type = OperationType::CHANNEL_SHUFFLE,
5392 .inputs = {0, 1, 2},
5393 .outputs = {3},
5394 }
5395 };
5396
5397 const std::vector<uint32_t> inputIndexes = {0};
5398 const std::vector<uint32_t> outputIndexes = {3};
5399 std::vector<uint8_t> operandValues = {
5400 3, 0, 0, 0, 254, 255, 255, 255
5401 };
5402 const std::vector<hidl_memory> pools = {};
5403
5404 return {
5405 .operands = operands,
5406 .operations = operations,
5407 .inputIndexes = inputIndexes,
5408 .outputIndexes = outputIndexes,
5409 .operandValues = operandValues,
5410 .pools = pools,
5411 };
5412 }
5413
is_ignored_float16_dim2_axis0_neg(int i)5414 inline bool is_ignored_float16_dim2_axis0_neg(int i) {
5415 static std::set<int> ignore = {};
5416 return ignore.find(i) != ignore.end();
5417 }
5418
5419 // Create the model
createTestModel_float16_dim2_axis1()5420 Model createTestModel_float16_dim2_axis1() {
5421 const std::vector<Operand> operands = {
5422 {
5423 .type = OperandType::TENSOR_FLOAT16,
5424 .dimensions = {3, 12},
5425 .numberOfConsumers = 1,
5426 .scale = 0.0f,
5427 .zeroPoint = 0,
5428 .lifetime = OperandLifeTime::MODEL_INPUT,
5429 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5430 },
5431 {
5432 .type = OperandType::INT32,
5433 .dimensions = {},
5434 .numberOfConsumers = 1,
5435 .scale = 0.0f,
5436 .zeroPoint = 0,
5437 .lifetime = OperandLifeTime::CONSTANT_COPY,
5438 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5439 },
5440 {
5441 .type = OperandType::INT32,
5442 .dimensions = {},
5443 .numberOfConsumers = 1,
5444 .scale = 0.0f,
5445 .zeroPoint = 0,
5446 .lifetime = OperandLifeTime::CONSTANT_COPY,
5447 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5448 },
5449 {
5450 .type = OperandType::TENSOR_FLOAT16,
5451 .dimensions = {3, 12},
5452 .numberOfConsumers = 0,
5453 .scale = 0.0f,
5454 .zeroPoint = 0,
5455 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5456 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5457 }
5458 };
5459
5460 const std::vector<Operation> operations = {
5461 {
5462 .type = OperationType::CHANNEL_SHUFFLE,
5463 .inputs = {0, 1, 2},
5464 .outputs = {3},
5465 }
5466 };
5467
5468 const std::vector<uint32_t> inputIndexes = {0};
5469 const std::vector<uint32_t> outputIndexes = {3};
5470 std::vector<uint8_t> operandValues = {
5471 3, 0, 0, 0, 1, 0, 0, 0
5472 };
5473 const std::vector<hidl_memory> pools = {};
5474
5475 return {
5476 .operands = operands,
5477 .operations = operations,
5478 .inputIndexes = inputIndexes,
5479 .outputIndexes = outputIndexes,
5480 .operandValues = operandValues,
5481 .pools = pools,
5482 };
5483 }
5484
is_ignored_float16_dim2_axis1(int i)5485 inline bool is_ignored_float16_dim2_axis1(int i) {
5486 static std::set<int> ignore = {};
5487 return ignore.find(i) != ignore.end();
5488 }
5489
5490 // Create the model
createTestModel_float16_dim2_axis1_neg()5491 Model createTestModel_float16_dim2_axis1_neg() {
5492 const std::vector<Operand> operands = {
5493 {
5494 .type = OperandType::TENSOR_FLOAT16,
5495 .dimensions = {3, 12},
5496 .numberOfConsumers = 1,
5497 .scale = 0.0f,
5498 .zeroPoint = 0,
5499 .lifetime = OperandLifeTime::MODEL_INPUT,
5500 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5501 },
5502 {
5503 .type = OperandType::INT32,
5504 .dimensions = {},
5505 .numberOfConsumers = 1,
5506 .scale = 0.0f,
5507 .zeroPoint = 0,
5508 .lifetime = OperandLifeTime::CONSTANT_COPY,
5509 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5510 },
5511 {
5512 .type = OperandType::INT32,
5513 .dimensions = {},
5514 .numberOfConsumers = 1,
5515 .scale = 0.0f,
5516 .zeroPoint = 0,
5517 .lifetime = OperandLifeTime::CONSTANT_COPY,
5518 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5519 },
5520 {
5521 .type = OperandType::TENSOR_FLOAT16,
5522 .dimensions = {3, 12},
5523 .numberOfConsumers = 0,
5524 .scale = 0.0f,
5525 .zeroPoint = 0,
5526 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5527 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5528 }
5529 };
5530
5531 const std::vector<Operation> operations = {
5532 {
5533 .type = OperationType::CHANNEL_SHUFFLE,
5534 .inputs = {0, 1, 2},
5535 .outputs = {3},
5536 }
5537 };
5538
5539 const std::vector<uint32_t> inputIndexes = {0};
5540 const std::vector<uint32_t> outputIndexes = {3};
5541 std::vector<uint8_t> operandValues = {
5542 3, 0, 0, 0, 255, 255, 255, 255
5543 };
5544 const std::vector<hidl_memory> pools = {};
5545
5546 return {
5547 .operands = operands,
5548 .operations = operations,
5549 .inputIndexes = inputIndexes,
5550 .outputIndexes = outputIndexes,
5551 .operandValues = operandValues,
5552 .pools = pools,
5553 };
5554 }
5555
is_ignored_float16_dim2_axis1_neg(int i)5556 inline bool is_ignored_float16_dim2_axis1_neg(int i) {
5557 static std::set<int> ignore = {};
5558 return ignore.find(i) != ignore.end();
5559 }
5560
5561 // Create the model
createTestModel_float16_dim1_axis0()5562 Model createTestModel_float16_dim1_axis0() {
5563 const std::vector<Operand> operands = {
5564 {
5565 .type = OperandType::TENSOR_FLOAT16,
5566 .dimensions = {12},
5567 .numberOfConsumers = 1,
5568 .scale = 0.0f,
5569 .zeroPoint = 0,
5570 .lifetime = OperandLifeTime::MODEL_INPUT,
5571 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5572 },
5573 {
5574 .type = OperandType::INT32,
5575 .dimensions = {},
5576 .numberOfConsumers = 1,
5577 .scale = 0.0f,
5578 .zeroPoint = 0,
5579 .lifetime = OperandLifeTime::CONSTANT_COPY,
5580 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5581 },
5582 {
5583 .type = OperandType::INT32,
5584 .dimensions = {},
5585 .numberOfConsumers = 1,
5586 .scale = 0.0f,
5587 .zeroPoint = 0,
5588 .lifetime = OperandLifeTime::CONSTANT_COPY,
5589 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5590 },
5591 {
5592 .type = OperandType::TENSOR_FLOAT16,
5593 .dimensions = {12},
5594 .numberOfConsumers = 0,
5595 .scale = 0.0f,
5596 .zeroPoint = 0,
5597 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5598 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5599 }
5600 };
5601
5602 const std::vector<Operation> operations = {
5603 {
5604 .type = OperationType::CHANNEL_SHUFFLE,
5605 .inputs = {0, 1, 2},
5606 .outputs = {3},
5607 }
5608 };
5609
5610 const std::vector<uint32_t> inputIndexes = {0};
5611 const std::vector<uint32_t> outputIndexes = {3};
5612 std::vector<uint8_t> operandValues = {
5613 3, 0, 0, 0, 0, 0, 0, 0
5614 };
5615 const std::vector<hidl_memory> pools = {};
5616
5617 return {
5618 .operands = operands,
5619 .operations = operations,
5620 .inputIndexes = inputIndexes,
5621 .outputIndexes = outputIndexes,
5622 .operandValues = operandValues,
5623 .pools = pools,
5624 };
5625 }
5626
is_ignored_float16_dim1_axis0(int i)5627 inline bool is_ignored_float16_dim1_axis0(int i) {
5628 static std::set<int> ignore = {};
5629 return ignore.find(i) != ignore.end();
5630 }
5631
5632 // Create the model
createTestModel_float16_dim1_axis0_neg()5633 Model createTestModel_float16_dim1_axis0_neg() {
5634 const std::vector<Operand> operands = {
5635 {
5636 .type = OperandType::TENSOR_FLOAT16,
5637 .dimensions = {12},
5638 .numberOfConsumers = 1,
5639 .scale = 0.0f,
5640 .zeroPoint = 0,
5641 .lifetime = OperandLifeTime::MODEL_INPUT,
5642 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5643 },
5644 {
5645 .type = OperandType::INT32,
5646 .dimensions = {},
5647 .numberOfConsumers = 1,
5648 .scale = 0.0f,
5649 .zeroPoint = 0,
5650 .lifetime = OperandLifeTime::CONSTANT_COPY,
5651 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5652 },
5653 {
5654 .type = OperandType::INT32,
5655 .dimensions = {},
5656 .numberOfConsumers = 1,
5657 .scale = 0.0f,
5658 .zeroPoint = 0,
5659 .lifetime = OperandLifeTime::CONSTANT_COPY,
5660 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5661 },
5662 {
5663 .type = OperandType::TENSOR_FLOAT16,
5664 .dimensions = {12},
5665 .numberOfConsumers = 0,
5666 .scale = 0.0f,
5667 .zeroPoint = 0,
5668 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5669 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5670 }
5671 };
5672
5673 const std::vector<Operation> operations = {
5674 {
5675 .type = OperationType::CHANNEL_SHUFFLE,
5676 .inputs = {0, 1, 2},
5677 .outputs = {3},
5678 }
5679 };
5680
5681 const std::vector<uint32_t> inputIndexes = {0};
5682 const std::vector<uint32_t> outputIndexes = {3};
5683 std::vector<uint8_t> operandValues = {
5684 3, 0, 0, 0, 255, 255, 255, 255
5685 };
5686 const std::vector<hidl_memory> pools = {};
5687
5688 return {
5689 .operands = operands,
5690 .operations = operations,
5691 .inputIndexes = inputIndexes,
5692 .outputIndexes = outputIndexes,
5693 .operandValues = operandValues,
5694 .pools = pools,
5695 };
5696 }
5697
is_ignored_float16_dim1_axis0_neg(int i)5698 inline bool is_ignored_float16_dim1_axis0_neg(int i) {
5699 static std::set<int> ignore = {};
5700 return ignore.find(i) != ignore.end();
5701 }
5702
5703 // Create the model
createTestModel_dynamic_output_shape_dim4_axis0()5704 Model createTestModel_dynamic_output_shape_dim4_axis0() {
5705 const std::vector<Operand> operands = {
5706 {
5707 .type = OperandType::TENSOR_FLOAT32,
5708 .dimensions = {12, 2, 2, 3},
5709 .numberOfConsumers = 1,
5710 .scale = 0.0f,
5711 .zeroPoint = 0,
5712 .lifetime = OperandLifeTime::MODEL_INPUT,
5713 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5714 },
5715 {
5716 .type = OperandType::INT32,
5717 .dimensions = {},
5718 .numberOfConsumers = 1,
5719 .scale = 0.0f,
5720 .zeroPoint = 0,
5721 .lifetime = OperandLifeTime::CONSTANT_COPY,
5722 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5723 },
5724 {
5725 .type = OperandType::INT32,
5726 .dimensions = {},
5727 .numberOfConsumers = 1,
5728 .scale = 0.0f,
5729 .zeroPoint = 0,
5730 .lifetime = OperandLifeTime::CONSTANT_COPY,
5731 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5732 },
5733 {
5734 .type = OperandType::TENSOR_FLOAT32,
5735 .dimensions = {0, 0, 0, 0},
5736 .numberOfConsumers = 0,
5737 .scale = 0.0f,
5738 .zeroPoint = 0,
5739 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5740 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5741 }
5742 };
5743
5744 const std::vector<Operation> operations = {
5745 {
5746 .type = OperationType::CHANNEL_SHUFFLE,
5747 .inputs = {0, 1, 2},
5748 .outputs = {3},
5749 }
5750 };
5751
5752 const std::vector<uint32_t> inputIndexes = {0};
5753 const std::vector<uint32_t> outputIndexes = {3};
5754 std::vector<uint8_t> operandValues = {
5755 3, 0, 0, 0, 0, 0, 0, 0
5756 };
5757 const std::vector<hidl_memory> pools = {};
5758
5759 return {
5760 .operands = operands,
5761 .operations = operations,
5762 .inputIndexes = inputIndexes,
5763 .outputIndexes = outputIndexes,
5764 .operandValues = operandValues,
5765 .pools = pools,
5766 };
5767 }
5768
is_ignored_dynamic_output_shape_dim4_axis0(int i)5769 inline bool is_ignored_dynamic_output_shape_dim4_axis0(int i) {
5770 static std::set<int> ignore = {};
5771 return ignore.find(i) != ignore.end();
5772 }
5773
5774 // Create the model
createTestModel_dynamic_output_shape_dim4_axis0_neg()5775 Model createTestModel_dynamic_output_shape_dim4_axis0_neg() {
5776 const std::vector<Operand> operands = {
5777 {
5778 .type = OperandType::TENSOR_FLOAT32,
5779 .dimensions = {12, 2, 2, 3},
5780 .numberOfConsumers = 1,
5781 .scale = 0.0f,
5782 .zeroPoint = 0,
5783 .lifetime = OperandLifeTime::MODEL_INPUT,
5784 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5785 },
5786 {
5787 .type = OperandType::INT32,
5788 .dimensions = {},
5789 .numberOfConsumers = 1,
5790 .scale = 0.0f,
5791 .zeroPoint = 0,
5792 .lifetime = OperandLifeTime::CONSTANT_COPY,
5793 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5794 },
5795 {
5796 .type = OperandType::INT32,
5797 .dimensions = {},
5798 .numberOfConsumers = 1,
5799 .scale = 0.0f,
5800 .zeroPoint = 0,
5801 .lifetime = OperandLifeTime::CONSTANT_COPY,
5802 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5803 },
5804 {
5805 .type = OperandType::TENSOR_FLOAT32,
5806 .dimensions = {0, 0, 0, 0},
5807 .numberOfConsumers = 0,
5808 .scale = 0.0f,
5809 .zeroPoint = 0,
5810 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5811 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5812 }
5813 };
5814
5815 const std::vector<Operation> operations = {
5816 {
5817 .type = OperationType::CHANNEL_SHUFFLE,
5818 .inputs = {0, 1, 2},
5819 .outputs = {3},
5820 }
5821 };
5822
5823 const std::vector<uint32_t> inputIndexes = {0};
5824 const std::vector<uint32_t> outputIndexes = {3};
5825 std::vector<uint8_t> operandValues = {
5826 3, 0, 0, 0, 252, 255, 255, 255
5827 };
5828 const std::vector<hidl_memory> pools = {};
5829
5830 return {
5831 .operands = operands,
5832 .operations = operations,
5833 .inputIndexes = inputIndexes,
5834 .outputIndexes = outputIndexes,
5835 .operandValues = operandValues,
5836 .pools = pools,
5837 };
5838 }
5839
is_ignored_dynamic_output_shape_dim4_axis0_neg(int i)5840 inline bool is_ignored_dynamic_output_shape_dim4_axis0_neg(int i) {
5841 static std::set<int> ignore = {};
5842 return ignore.find(i) != ignore.end();
5843 }
5844
5845 // Create the model
createTestModel_dynamic_output_shape_dim4_axis1()5846 Model createTestModel_dynamic_output_shape_dim4_axis1() {
5847 const std::vector<Operand> operands = {
5848 {
5849 .type = OperandType::TENSOR_FLOAT32,
5850 .dimensions = {2, 12, 2, 3},
5851 .numberOfConsumers = 1,
5852 .scale = 0.0f,
5853 .zeroPoint = 0,
5854 .lifetime = OperandLifeTime::MODEL_INPUT,
5855 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5856 },
5857 {
5858 .type = OperandType::INT32,
5859 .dimensions = {},
5860 .numberOfConsumers = 1,
5861 .scale = 0.0f,
5862 .zeroPoint = 0,
5863 .lifetime = OperandLifeTime::CONSTANT_COPY,
5864 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5865 },
5866 {
5867 .type = OperandType::INT32,
5868 .dimensions = {},
5869 .numberOfConsumers = 1,
5870 .scale = 0.0f,
5871 .zeroPoint = 0,
5872 .lifetime = OperandLifeTime::CONSTANT_COPY,
5873 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5874 },
5875 {
5876 .type = OperandType::TENSOR_FLOAT32,
5877 .dimensions = {0, 0, 0, 0},
5878 .numberOfConsumers = 0,
5879 .scale = 0.0f,
5880 .zeroPoint = 0,
5881 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5882 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5883 }
5884 };
5885
5886 const std::vector<Operation> operations = {
5887 {
5888 .type = OperationType::CHANNEL_SHUFFLE,
5889 .inputs = {0, 1, 2},
5890 .outputs = {3},
5891 }
5892 };
5893
5894 const std::vector<uint32_t> inputIndexes = {0};
5895 const std::vector<uint32_t> outputIndexes = {3};
5896 std::vector<uint8_t> operandValues = {
5897 3, 0, 0, 0, 1, 0, 0, 0
5898 };
5899 const std::vector<hidl_memory> pools = {};
5900
5901 return {
5902 .operands = operands,
5903 .operations = operations,
5904 .inputIndexes = inputIndexes,
5905 .outputIndexes = outputIndexes,
5906 .operandValues = operandValues,
5907 .pools = pools,
5908 };
5909 }
5910
is_ignored_dynamic_output_shape_dim4_axis1(int i)5911 inline bool is_ignored_dynamic_output_shape_dim4_axis1(int i) {
5912 static std::set<int> ignore = {};
5913 return ignore.find(i) != ignore.end();
5914 }
5915
5916 // Create the model
createTestModel_dynamic_output_shape_dim4_axis1_neg()5917 Model createTestModel_dynamic_output_shape_dim4_axis1_neg() {
5918 const std::vector<Operand> operands = {
5919 {
5920 .type = OperandType::TENSOR_FLOAT32,
5921 .dimensions = {2, 12, 2, 3},
5922 .numberOfConsumers = 1,
5923 .scale = 0.0f,
5924 .zeroPoint = 0,
5925 .lifetime = OperandLifeTime::MODEL_INPUT,
5926 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5927 },
5928 {
5929 .type = OperandType::INT32,
5930 .dimensions = {},
5931 .numberOfConsumers = 1,
5932 .scale = 0.0f,
5933 .zeroPoint = 0,
5934 .lifetime = OperandLifeTime::CONSTANT_COPY,
5935 .location = {.poolIndex = 0, .offset = 0, .length = 4},
5936 },
5937 {
5938 .type = OperandType::INT32,
5939 .dimensions = {},
5940 .numberOfConsumers = 1,
5941 .scale = 0.0f,
5942 .zeroPoint = 0,
5943 .lifetime = OperandLifeTime::CONSTANT_COPY,
5944 .location = {.poolIndex = 0, .offset = 4, .length = 4},
5945 },
5946 {
5947 .type = OperandType::TENSOR_FLOAT32,
5948 .dimensions = {0, 0, 0, 0},
5949 .numberOfConsumers = 0,
5950 .scale = 0.0f,
5951 .zeroPoint = 0,
5952 .lifetime = OperandLifeTime::MODEL_OUTPUT,
5953 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5954 }
5955 };
5956
5957 const std::vector<Operation> operations = {
5958 {
5959 .type = OperationType::CHANNEL_SHUFFLE,
5960 .inputs = {0, 1, 2},
5961 .outputs = {3},
5962 }
5963 };
5964
5965 const std::vector<uint32_t> inputIndexes = {0};
5966 const std::vector<uint32_t> outputIndexes = {3};
5967 std::vector<uint8_t> operandValues = {
5968 3, 0, 0, 0, 253, 255, 255, 255
5969 };
5970 const std::vector<hidl_memory> pools = {};
5971
5972 return {
5973 .operands = operands,
5974 .operations = operations,
5975 .inputIndexes = inputIndexes,
5976 .outputIndexes = outputIndexes,
5977 .operandValues = operandValues,
5978 .pools = pools,
5979 };
5980 }
5981
is_ignored_dynamic_output_shape_dim4_axis1_neg(int i)5982 inline bool is_ignored_dynamic_output_shape_dim4_axis1_neg(int i) {
5983 static std::set<int> ignore = {};
5984 return ignore.find(i) != ignore.end();
5985 }
5986
5987 // Create the model
createTestModel_dynamic_output_shape_dim4_axis2()5988 Model createTestModel_dynamic_output_shape_dim4_axis2() {
5989 const std::vector<Operand> operands = {
5990 {
5991 .type = OperandType::TENSOR_FLOAT32,
5992 .dimensions = {2, 2, 12, 3},
5993 .numberOfConsumers = 1,
5994 .scale = 0.0f,
5995 .zeroPoint = 0,
5996 .lifetime = OperandLifeTime::MODEL_INPUT,
5997 .location = {.poolIndex = 0, .offset = 0, .length = 0},
5998 },
5999 {
6000 .type = OperandType::INT32,
6001 .dimensions = {},
6002 .numberOfConsumers = 1,
6003 .scale = 0.0f,
6004 .zeroPoint = 0,
6005 .lifetime = OperandLifeTime::CONSTANT_COPY,
6006 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6007 },
6008 {
6009 .type = OperandType::INT32,
6010 .dimensions = {},
6011 .numberOfConsumers = 1,
6012 .scale = 0.0f,
6013 .zeroPoint = 0,
6014 .lifetime = OperandLifeTime::CONSTANT_COPY,
6015 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6016 },
6017 {
6018 .type = OperandType::TENSOR_FLOAT32,
6019 .dimensions = {0, 0, 0, 0},
6020 .numberOfConsumers = 0,
6021 .scale = 0.0f,
6022 .zeroPoint = 0,
6023 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6024 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6025 }
6026 };
6027
6028 const std::vector<Operation> operations = {
6029 {
6030 .type = OperationType::CHANNEL_SHUFFLE,
6031 .inputs = {0, 1, 2},
6032 .outputs = {3},
6033 }
6034 };
6035
6036 const std::vector<uint32_t> inputIndexes = {0};
6037 const std::vector<uint32_t> outputIndexes = {3};
6038 std::vector<uint8_t> operandValues = {
6039 3, 0, 0, 0, 2, 0, 0, 0
6040 };
6041 const std::vector<hidl_memory> pools = {};
6042
6043 return {
6044 .operands = operands,
6045 .operations = operations,
6046 .inputIndexes = inputIndexes,
6047 .outputIndexes = outputIndexes,
6048 .operandValues = operandValues,
6049 .pools = pools,
6050 };
6051 }
6052
is_ignored_dynamic_output_shape_dim4_axis2(int i)6053 inline bool is_ignored_dynamic_output_shape_dim4_axis2(int i) {
6054 static std::set<int> ignore = {};
6055 return ignore.find(i) != ignore.end();
6056 }
6057
6058 // Create the model
createTestModel_dynamic_output_shape_dim4_axis2_neg()6059 Model createTestModel_dynamic_output_shape_dim4_axis2_neg() {
6060 const std::vector<Operand> operands = {
6061 {
6062 .type = OperandType::TENSOR_FLOAT32,
6063 .dimensions = {2, 2, 12, 3},
6064 .numberOfConsumers = 1,
6065 .scale = 0.0f,
6066 .zeroPoint = 0,
6067 .lifetime = OperandLifeTime::MODEL_INPUT,
6068 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6069 },
6070 {
6071 .type = OperandType::INT32,
6072 .dimensions = {},
6073 .numberOfConsumers = 1,
6074 .scale = 0.0f,
6075 .zeroPoint = 0,
6076 .lifetime = OperandLifeTime::CONSTANT_COPY,
6077 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6078 },
6079 {
6080 .type = OperandType::INT32,
6081 .dimensions = {},
6082 .numberOfConsumers = 1,
6083 .scale = 0.0f,
6084 .zeroPoint = 0,
6085 .lifetime = OperandLifeTime::CONSTANT_COPY,
6086 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6087 },
6088 {
6089 .type = OperandType::TENSOR_FLOAT32,
6090 .dimensions = {0, 0, 0, 0},
6091 .numberOfConsumers = 0,
6092 .scale = 0.0f,
6093 .zeroPoint = 0,
6094 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6095 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6096 }
6097 };
6098
6099 const std::vector<Operation> operations = {
6100 {
6101 .type = OperationType::CHANNEL_SHUFFLE,
6102 .inputs = {0, 1, 2},
6103 .outputs = {3},
6104 }
6105 };
6106
6107 const std::vector<uint32_t> inputIndexes = {0};
6108 const std::vector<uint32_t> outputIndexes = {3};
6109 std::vector<uint8_t> operandValues = {
6110 3, 0, 0, 0, 254, 255, 255, 255
6111 };
6112 const std::vector<hidl_memory> pools = {};
6113
6114 return {
6115 .operands = operands,
6116 .operations = operations,
6117 .inputIndexes = inputIndexes,
6118 .outputIndexes = outputIndexes,
6119 .operandValues = operandValues,
6120 .pools = pools,
6121 };
6122 }
6123
is_ignored_dynamic_output_shape_dim4_axis2_neg(int i)6124 inline bool is_ignored_dynamic_output_shape_dim4_axis2_neg(int i) {
6125 static std::set<int> ignore = {};
6126 return ignore.find(i) != ignore.end();
6127 }
6128
6129 // Create the model
createTestModel_dynamic_output_shape_dim4_axis3()6130 Model createTestModel_dynamic_output_shape_dim4_axis3() {
6131 const std::vector<Operand> operands = {
6132 {
6133 .type = OperandType::TENSOR_FLOAT32,
6134 .dimensions = {2, 2, 3, 12},
6135 .numberOfConsumers = 1,
6136 .scale = 0.0f,
6137 .zeroPoint = 0,
6138 .lifetime = OperandLifeTime::MODEL_INPUT,
6139 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6140 },
6141 {
6142 .type = OperandType::INT32,
6143 .dimensions = {},
6144 .numberOfConsumers = 1,
6145 .scale = 0.0f,
6146 .zeroPoint = 0,
6147 .lifetime = OperandLifeTime::CONSTANT_COPY,
6148 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6149 },
6150 {
6151 .type = OperandType::INT32,
6152 .dimensions = {},
6153 .numberOfConsumers = 1,
6154 .scale = 0.0f,
6155 .zeroPoint = 0,
6156 .lifetime = OperandLifeTime::CONSTANT_COPY,
6157 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6158 },
6159 {
6160 .type = OperandType::TENSOR_FLOAT32,
6161 .dimensions = {0, 0, 0, 0},
6162 .numberOfConsumers = 0,
6163 .scale = 0.0f,
6164 .zeroPoint = 0,
6165 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6166 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6167 }
6168 };
6169
6170 const std::vector<Operation> operations = {
6171 {
6172 .type = OperationType::CHANNEL_SHUFFLE,
6173 .inputs = {0, 1, 2},
6174 .outputs = {3},
6175 }
6176 };
6177
6178 const std::vector<uint32_t> inputIndexes = {0};
6179 const std::vector<uint32_t> outputIndexes = {3};
6180 std::vector<uint8_t> operandValues = {
6181 3, 0, 0, 0, 3, 0, 0, 0
6182 };
6183 const std::vector<hidl_memory> pools = {};
6184
6185 return {
6186 .operands = operands,
6187 .operations = operations,
6188 .inputIndexes = inputIndexes,
6189 .outputIndexes = outputIndexes,
6190 .operandValues = operandValues,
6191 .pools = pools,
6192 };
6193 }
6194
is_ignored_dynamic_output_shape_dim4_axis3(int i)6195 inline bool is_ignored_dynamic_output_shape_dim4_axis3(int i) {
6196 static std::set<int> ignore = {};
6197 return ignore.find(i) != ignore.end();
6198 }
6199
6200 // Create the model
createTestModel_dynamic_output_shape_dim4_axis3_neg()6201 Model createTestModel_dynamic_output_shape_dim4_axis3_neg() {
6202 const std::vector<Operand> operands = {
6203 {
6204 .type = OperandType::TENSOR_FLOAT32,
6205 .dimensions = {2, 2, 3, 12},
6206 .numberOfConsumers = 1,
6207 .scale = 0.0f,
6208 .zeroPoint = 0,
6209 .lifetime = OperandLifeTime::MODEL_INPUT,
6210 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6211 },
6212 {
6213 .type = OperandType::INT32,
6214 .dimensions = {},
6215 .numberOfConsumers = 1,
6216 .scale = 0.0f,
6217 .zeroPoint = 0,
6218 .lifetime = OperandLifeTime::CONSTANT_COPY,
6219 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6220 },
6221 {
6222 .type = OperandType::INT32,
6223 .dimensions = {},
6224 .numberOfConsumers = 1,
6225 .scale = 0.0f,
6226 .zeroPoint = 0,
6227 .lifetime = OperandLifeTime::CONSTANT_COPY,
6228 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6229 },
6230 {
6231 .type = OperandType::TENSOR_FLOAT32,
6232 .dimensions = {0, 0, 0, 0},
6233 .numberOfConsumers = 0,
6234 .scale = 0.0f,
6235 .zeroPoint = 0,
6236 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6237 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6238 }
6239 };
6240
6241 const std::vector<Operation> operations = {
6242 {
6243 .type = OperationType::CHANNEL_SHUFFLE,
6244 .inputs = {0, 1, 2},
6245 .outputs = {3},
6246 }
6247 };
6248
6249 const std::vector<uint32_t> inputIndexes = {0};
6250 const std::vector<uint32_t> outputIndexes = {3};
6251 std::vector<uint8_t> operandValues = {
6252 3, 0, 0, 0, 255, 255, 255, 255
6253 };
6254 const std::vector<hidl_memory> pools = {};
6255
6256 return {
6257 .operands = operands,
6258 .operations = operations,
6259 .inputIndexes = inputIndexes,
6260 .outputIndexes = outputIndexes,
6261 .operandValues = operandValues,
6262 .pools = pools,
6263 };
6264 }
6265
is_ignored_dynamic_output_shape_dim4_axis3_neg(int i)6266 inline bool is_ignored_dynamic_output_shape_dim4_axis3_neg(int i) {
6267 static std::set<int> ignore = {};
6268 return ignore.find(i) != ignore.end();
6269 }
6270
6271 // Create the model
createTestModel_dynamic_output_shape_dim3_axis0()6272 Model createTestModel_dynamic_output_shape_dim3_axis0() {
6273 const std::vector<Operand> operands = {
6274 {
6275 .type = OperandType::TENSOR_FLOAT32,
6276 .dimensions = {12, 2, 3},
6277 .numberOfConsumers = 1,
6278 .scale = 0.0f,
6279 .zeroPoint = 0,
6280 .lifetime = OperandLifeTime::MODEL_INPUT,
6281 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6282 },
6283 {
6284 .type = OperandType::INT32,
6285 .dimensions = {},
6286 .numberOfConsumers = 1,
6287 .scale = 0.0f,
6288 .zeroPoint = 0,
6289 .lifetime = OperandLifeTime::CONSTANT_COPY,
6290 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6291 },
6292 {
6293 .type = OperandType::INT32,
6294 .dimensions = {},
6295 .numberOfConsumers = 1,
6296 .scale = 0.0f,
6297 .zeroPoint = 0,
6298 .lifetime = OperandLifeTime::CONSTANT_COPY,
6299 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6300 },
6301 {
6302 .type = OperandType::TENSOR_FLOAT32,
6303 .dimensions = {0, 0, 0},
6304 .numberOfConsumers = 0,
6305 .scale = 0.0f,
6306 .zeroPoint = 0,
6307 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6308 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6309 }
6310 };
6311
6312 const std::vector<Operation> operations = {
6313 {
6314 .type = OperationType::CHANNEL_SHUFFLE,
6315 .inputs = {0, 1, 2},
6316 .outputs = {3},
6317 }
6318 };
6319
6320 const std::vector<uint32_t> inputIndexes = {0};
6321 const std::vector<uint32_t> outputIndexes = {3};
6322 std::vector<uint8_t> operandValues = {
6323 3, 0, 0, 0, 0, 0, 0, 0
6324 };
6325 const std::vector<hidl_memory> pools = {};
6326
6327 return {
6328 .operands = operands,
6329 .operations = operations,
6330 .inputIndexes = inputIndexes,
6331 .outputIndexes = outputIndexes,
6332 .operandValues = operandValues,
6333 .pools = pools,
6334 };
6335 }
6336
is_ignored_dynamic_output_shape_dim3_axis0(int i)6337 inline bool is_ignored_dynamic_output_shape_dim3_axis0(int i) {
6338 static std::set<int> ignore = {};
6339 return ignore.find(i) != ignore.end();
6340 }
6341
6342 // Create the model
createTestModel_dynamic_output_shape_dim3_axis0_neg()6343 Model createTestModel_dynamic_output_shape_dim3_axis0_neg() {
6344 const std::vector<Operand> operands = {
6345 {
6346 .type = OperandType::TENSOR_FLOAT32,
6347 .dimensions = {12, 2, 3},
6348 .numberOfConsumers = 1,
6349 .scale = 0.0f,
6350 .zeroPoint = 0,
6351 .lifetime = OperandLifeTime::MODEL_INPUT,
6352 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6353 },
6354 {
6355 .type = OperandType::INT32,
6356 .dimensions = {},
6357 .numberOfConsumers = 1,
6358 .scale = 0.0f,
6359 .zeroPoint = 0,
6360 .lifetime = OperandLifeTime::CONSTANT_COPY,
6361 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6362 },
6363 {
6364 .type = OperandType::INT32,
6365 .dimensions = {},
6366 .numberOfConsumers = 1,
6367 .scale = 0.0f,
6368 .zeroPoint = 0,
6369 .lifetime = OperandLifeTime::CONSTANT_COPY,
6370 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6371 },
6372 {
6373 .type = OperandType::TENSOR_FLOAT32,
6374 .dimensions = {0, 0, 0},
6375 .numberOfConsumers = 0,
6376 .scale = 0.0f,
6377 .zeroPoint = 0,
6378 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6379 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6380 }
6381 };
6382
6383 const std::vector<Operation> operations = {
6384 {
6385 .type = OperationType::CHANNEL_SHUFFLE,
6386 .inputs = {0, 1, 2},
6387 .outputs = {3},
6388 }
6389 };
6390
6391 const std::vector<uint32_t> inputIndexes = {0};
6392 const std::vector<uint32_t> outputIndexes = {3};
6393 std::vector<uint8_t> operandValues = {
6394 3, 0, 0, 0, 253, 255, 255, 255
6395 };
6396 const std::vector<hidl_memory> pools = {};
6397
6398 return {
6399 .operands = operands,
6400 .operations = operations,
6401 .inputIndexes = inputIndexes,
6402 .outputIndexes = outputIndexes,
6403 .operandValues = operandValues,
6404 .pools = pools,
6405 };
6406 }
6407
is_ignored_dynamic_output_shape_dim3_axis0_neg(int i)6408 inline bool is_ignored_dynamic_output_shape_dim3_axis0_neg(int i) {
6409 static std::set<int> ignore = {};
6410 return ignore.find(i) != ignore.end();
6411 }
6412
6413 // Create the model
createTestModel_dynamic_output_shape_dim3_axis1()6414 Model createTestModel_dynamic_output_shape_dim3_axis1() {
6415 const std::vector<Operand> operands = {
6416 {
6417 .type = OperandType::TENSOR_FLOAT32,
6418 .dimensions = {2, 12, 3},
6419 .numberOfConsumers = 1,
6420 .scale = 0.0f,
6421 .zeroPoint = 0,
6422 .lifetime = OperandLifeTime::MODEL_INPUT,
6423 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6424 },
6425 {
6426 .type = OperandType::INT32,
6427 .dimensions = {},
6428 .numberOfConsumers = 1,
6429 .scale = 0.0f,
6430 .zeroPoint = 0,
6431 .lifetime = OperandLifeTime::CONSTANT_COPY,
6432 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6433 },
6434 {
6435 .type = OperandType::INT32,
6436 .dimensions = {},
6437 .numberOfConsumers = 1,
6438 .scale = 0.0f,
6439 .zeroPoint = 0,
6440 .lifetime = OperandLifeTime::CONSTANT_COPY,
6441 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6442 },
6443 {
6444 .type = OperandType::TENSOR_FLOAT32,
6445 .dimensions = {0, 0, 0},
6446 .numberOfConsumers = 0,
6447 .scale = 0.0f,
6448 .zeroPoint = 0,
6449 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6450 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6451 }
6452 };
6453
6454 const std::vector<Operation> operations = {
6455 {
6456 .type = OperationType::CHANNEL_SHUFFLE,
6457 .inputs = {0, 1, 2},
6458 .outputs = {3},
6459 }
6460 };
6461
6462 const std::vector<uint32_t> inputIndexes = {0};
6463 const std::vector<uint32_t> outputIndexes = {3};
6464 std::vector<uint8_t> operandValues = {
6465 3, 0, 0, 0, 1, 0, 0, 0
6466 };
6467 const std::vector<hidl_memory> pools = {};
6468
6469 return {
6470 .operands = operands,
6471 .operations = operations,
6472 .inputIndexes = inputIndexes,
6473 .outputIndexes = outputIndexes,
6474 .operandValues = operandValues,
6475 .pools = pools,
6476 };
6477 }
6478
is_ignored_dynamic_output_shape_dim3_axis1(int i)6479 inline bool is_ignored_dynamic_output_shape_dim3_axis1(int i) {
6480 static std::set<int> ignore = {};
6481 return ignore.find(i) != ignore.end();
6482 }
6483
6484 // Create the model
createTestModel_dynamic_output_shape_dim3_axis1_neg()6485 Model createTestModel_dynamic_output_shape_dim3_axis1_neg() {
6486 const std::vector<Operand> operands = {
6487 {
6488 .type = OperandType::TENSOR_FLOAT32,
6489 .dimensions = {2, 12, 3},
6490 .numberOfConsumers = 1,
6491 .scale = 0.0f,
6492 .zeroPoint = 0,
6493 .lifetime = OperandLifeTime::MODEL_INPUT,
6494 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6495 },
6496 {
6497 .type = OperandType::INT32,
6498 .dimensions = {},
6499 .numberOfConsumers = 1,
6500 .scale = 0.0f,
6501 .zeroPoint = 0,
6502 .lifetime = OperandLifeTime::CONSTANT_COPY,
6503 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6504 },
6505 {
6506 .type = OperandType::INT32,
6507 .dimensions = {},
6508 .numberOfConsumers = 1,
6509 .scale = 0.0f,
6510 .zeroPoint = 0,
6511 .lifetime = OperandLifeTime::CONSTANT_COPY,
6512 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6513 },
6514 {
6515 .type = OperandType::TENSOR_FLOAT32,
6516 .dimensions = {0, 0, 0},
6517 .numberOfConsumers = 0,
6518 .scale = 0.0f,
6519 .zeroPoint = 0,
6520 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6521 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6522 }
6523 };
6524
6525 const std::vector<Operation> operations = {
6526 {
6527 .type = OperationType::CHANNEL_SHUFFLE,
6528 .inputs = {0, 1, 2},
6529 .outputs = {3},
6530 }
6531 };
6532
6533 const std::vector<uint32_t> inputIndexes = {0};
6534 const std::vector<uint32_t> outputIndexes = {3};
6535 std::vector<uint8_t> operandValues = {
6536 3, 0, 0, 0, 254, 255, 255, 255
6537 };
6538 const std::vector<hidl_memory> pools = {};
6539
6540 return {
6541 .operands = operands,
6542 .operations = operations,
6543 .inputIndexes = inputIndexes,
6544 .outputIndexes = outputIndexes,
6545 .operandValues = operandValues,
6546 .pools = pools,
6547 };
6548 }
6549
is_ignored_dynamic_output_shape_dim3_axis1_neg(int i)6550 inline bool is_ignored_dynamic_output_shape_dim3_axis1_neg(int i) {
6551 static std::set<int> ignore = {};
6552 return ignore.find(i) != ignore.end();
6553 }
6554
6555 // Create the model
createTestModel_dynamic_output_shape_dim3_axis2()6556 Model createTestModel_dynamic_output_shape_dim3_axis2() {
6557 const std::vector<Operand> operands = {
6558 {
6559 .type = OperandType::TENSOR_FLOAT32,
6560 .dimensions = {2, 3, 12},
6561 .numberOfConsumers = 1,
6562 .scale = 0.0f,
6563 .zeroPoint = 0,
6564 .lifetime = OperandLifeTime::MODEL_INPUT,
6565 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6566 },
6567 {
6568 .type = OperandType::INT32,
6569 .dimensions = {},
6570 .numberOfConsumers = 1,
6571 .scale = 0.0f,
6572 .zeroPoint = 0,
6573 .lifetime = OperandLifeTime::CONSTANT_COPY,
6574 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6575 },
6576 {
6577 .type = OperandType::INT32,
6578 .dimensions = {},
6579 .numberOfConsumers = 1,
6580 .scale = 0.0f,
6581 .zeroPoint = 0,
6582 .lifetime = OperandLifeTime::CONSTANT_COPY,
6583 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6584 },
6585 {
6586 .type = OperandType::TENSOR_FLOAT32,
6587 .dimensions = {0, 0, 0},
6588 .numberOfConsumers = 0,
6589 .scale = 0.0f,
6590 .zeroPoint = 0,
6591 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6592 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6593 }
6594 };
6595
6596 const std::vector<Operation> operations = {
6597 {
6598 .type = OperationType::CHANNEL_SHUFFLE,
6599 .inputs = {0, 1, 2},
6600 .outputs = {3},
6601 }
6602 };
6603
6604 const std::vector<uint32_t> inputIndexes = {0};
6605 const std::vector<uint32_t> outputIndexes = {3};
6606 std::vector<uint8_t> operandValues = {
6607 3, 0, 0, 0, 2, 0, 0, 0
6608 };
6609 const std::vector<hidl_memory> pools = {};
6610
6611 return {
6612 .operands = operands,
6613 .operations = operations,
6614 .inputIndexes = inputIndexes,
6615 .outputIndexes = outputIndexes,
6616 .operandValues = operandValues,
6617 .pools = pools,
6618 };
6619 }
6620
is_ignored_dynamic_output_shape_dim3_axis2(int i)6621 inline bool is_ignored_dynamic_output_shape_dim3_axis2(int i) {
6622 static std::set<int> ignore = {};
6623 return ignore.find(i) != ignore.end();
6624 }
6625
6626 // Create the model
createTestModel_dynamic_output_shape_dim3_axis2_neg()6627 Model createTestModel_dynamic_output_shape_dim3_axis2_neg() {
6628 const std::vector<Operand> operands = {
6629 {
6630 .type = OperandType::TENSOR_FLOAT32,
6631 .dimensions = {2, 3, 12},
6632 .numberOfConsumers = 1,
6633 .scale = 0.0f,
6634 .zeroPoint = 0,
6635 .lifetime = OperandLifeTime::MODEL_INPUT,
6636 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6637 },
6638 {
6639 .type = OperandType::INT32,
6640 .dimensions = {},
6641 .numberOfConsumers = 1,
6642 .scale = 0.0f,
6643 .zeroPoint = 0,
6644 .lifetime = OperandLifeTime::CONSTANT_COPY,
6645 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6646 },
6647 {
6648 .type = OperandType::INT32,
6649 .dimensions = {},
6650 .numberOfConsumers = 1,
6651 .scale = 0.0f,
6652 .zeroPoint = 0,
6653 .lifetime = OperandLifeTime::CONSTANT_COPY,
6654 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6655 },
6656 {
6657 .type = OperandType::TENSOR_FLOAT32,
6658 .dimensions = {0, 0, 0},
6659 .numberOfConsumers = 0,
6660 .scale = 0.0f,
6661 .zeroPoint = 0,
6662 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6663 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6664 }
6665 };
6666
6667 const std::vector<Operation> operations = {
6668 {
6669 .type = OperationType::CHANNEL_SHUFFLE,
6670 .inputs = {0, 1, 2},
6671 .outputs = {3},
6672 }
6673 };
6674
6675 const std::vector<uint32_t> inputIndexes = {0};
6676 const std::vector<uint32_t> outputIndexes = {3};
6677 std::vector<uint8_t> operandValues = {
6678 3, 0, 0, 0, 255, 255, 255, 255
6679 };
6680 const std::vector<hidl_memory> pools = {};
6681
6682 return {
6683 .operands = operands,
6684 .operations = operations,
6685 .inputIndexes = inputIndexes,
6686 .outputIndexes = outputIndexes,
6687 .operandValues = operandValues,
6688 .pools = pools,
6689 };
6690 }
6691
is_ignored_dynamic_output_shape_dim3_axis2_neg(int i)6692 inline bool is_ignored_dynamic_output_shape_dim3_axis2_neg(int i) {
6693 static std::set<int> ignore = {};
6694 return ignore.find(i) != ignore.end();
6695 }
6696
6697 // Create the model
createTestModel_dynamic_output_shape_dim2_axis0()6698 Model createTestModel_dynamic_output_shape_dim2_axis0() {
6699 const std::vector<Operand> operands = {
6700 {
6701 .type = OperandType::TENSOR_FLOAT32,
6702 .dimensions = {12, 3},
6703 .numberOfConsumers = 1,
6704 .scale = 0.0f,
6705 .zeroPoint = 0,
6706 .lifetime = OperandLifeTime::MODEL_INPUT,
6707 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6708 },
6709 {
6710 .type = OperandType::INT32,
6711 .dimensions = {},
6712 .numberOfConsumers = 1,
6713 .scale = 0.0f,
6714 .zeroPoint = 0,
6715 .lifetime = OperandLifeTime::CONSTANT_COPY,
6716 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6717 },
6718 {
6719 .type = OperandType::INT32,
6720 .dimensions = {},
6721 .numberOfConsumers = 1,
6722 .scale = 0.0f,
6723 .zeroPoint = 0,
6724 .lifetime = OperandLifeTime::CONSTANT_COPY,
6725 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6726 },
6727 {
6728 .type = OperandType::TENSOR_FLOAT32,
6729 .dimensions = {0, 0},
6730 .numberOfConsumers = 0,
6731 .scale = 0.0f,
6732 .zeroPoint = 0,
6733 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6734 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6735 }
6736 };
6737
6738 const std::vector<Operation> operations = {
6739 {
6740 .type = OperationType::CHANNEL_SHUFFLE,
6741 .inputs = {0, 1, 2},
6742 .outputs = {3},
6743 }
6744 };
6745
6746 const std::vector<uint32_t> inputIndexes = {0};
6747 const std::vector<uint32_t> outputIndexes = {3};
6748 std::vector<uint8_t> operandValues = {
6749 3, 0, 0, 0, 0, 0, 0, 0
6750 };
6751 const std::vector<hidl_memory> pools = {};
6752
6753 return {
6754 .operands = operands,
6755 .operations = operations,
6756 .inputIndexes = inputIndexes,
6757 .outputIndexes = outputIndexes,
6758 .operandValues = operandValues,
6759 .pools = pools,
6760 };
6761 }
6762
is_ignored_dynamic_output_shape_dim2_axis0(int i)6763 inline bool is_ignored_dynamic_output_shape_dim2_axis0(int i) {
6764 static std::set<int> ignore = {};
6765 return ignore.find(i) != ignore.end();
6766 }
6767
6768 // Create the model
createTestModel_dynamic_output_shape_dim2_axis0_neg()6769 Model createTestModel_dynamic_output_shape_dim2_axis0_neg() {
6770 const std::vector<Operand> operands = {
6771 {
6772 .type = OperandType::TENSOR_FLOAT32,
6773 .dimensions = {12, 3},
6774 .numberOfConsumers = 1,
6775 .scale = 0.0f,
6776 .zeroPoint = 0,
6777 .lifetime = OperandLifeTime::MODEL_INPUT,
6778 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6779 },
6780 {
6781 .type = OperandType::INT32,
6782 .dimensions = {},
6783 .numberOfConsumers = 1,
6784 .scale = 0.0f,
6785 .zeroPoint = 0,
6786 .lifetime = OperandLifeTime::CONSTANT_COPY,
6787 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6788 },
6789 {
6790 .type = OperandType::INT32,
6791 .dimensions = {},
6792 .numberOfConsumers = 1,
6793 .scale = 0.0f,
6794 .zeroPoint = 0,
6795 .lifetime = OperandLifeTime::CONSTANT_COPY,
6796 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6797 },
6798 {
6799 .type = OperandType::TENSOR_FLOAT32,
6800 .dimensions = {0, 0},
6801 .numberOfConsumers = 0,
6802 .scale = 0.0f,
6803 .zeroPoint = 0,
6804 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6805 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6806 }
6807 };
6808
6809 const std::vector<Operation> operations = {
6810 {
6811 .type = OperationType::CHANNEL_SHUFFLE,
6812 .inputs = {0, 1, 2},
6813 .outputs = {3},
6814 }
6815 };
6816
6817 const std::vector<uint32_t> inputIndexes = {0};
6818 const std::vector<uint32_t> outputIndexes = {3};
6819 std::vector<uint8_t> operandValues = {
6820 3, 0, 0, 0, 254, 255, 255, 255
6821 };
6822 const std::vector<hidl_memory> pools = {};
6823
6824 return {
6825 .operands = operands,
6826 .operations = operations,
6827 .inputIndexes = inputIndexes,
6828 .outputIndexes = outputIndexes,
6829 .operandValues = operandValues,
6830 .pools = pools,
6831 };
6832 }
6833
is_ignored_dynamic_output_shape_dim2_axis0_neg(int i)6834 inline bool is_ignored_dynamic_output_shape_dim2_axis0_neg(int i) {
6835 static std::set<int> ignore = {};
6836 return ignore.find(i) != ignore.end();
6837 }
6838
6839 // Create the model
createTestModel_dynamic_output_shape_dim2_axis1()6840 Model createTestModel_dynamic_output_shape_dim2_axis1() {
6841 const std::vector<Operand> operands = {
6842 {
6843 .type = OperandType::TENSOR_FLOAT32,
6844 .dimensions = {3, 12},
6845 .numberOfConsumers = 1,
6846 .scale = 0.0f,
6847 .zeroPoint = 0,
6848 .lifetime = OperandLifeTime::MODEL_INPUT,
6849 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6850 },
6851 {
6852 .type = OperandType::INT32,
6853 .dimensions = {},
6854 .numberOfConsumers = 1,
6855 .scale = 0.0f,
6856 .zeroPoint = 0,
6857 .lifetime = OperandLifeTime::CONSTANT_COPY,
6858 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6859 },
6860 {
6861 .type = OperandType::INT32,
6862 .dimensions = {},
6863 .numberOfConsumers = 1,
6864 .scale = 0.0f,
6865 .zeroPoint = 0,
6866 .lifetime = OperandLifeTime::CONSTANT_COPY,
6867 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6868 },
6869 {
6870 .type = OperandType::TENSOR_FLOAT32,
6871 .dimensions = {0, 0},
6872 .numberOfConsumers = 0,
6873 .scale = 0.0f,
6874 .zeroPoint = 0,
6875 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6876 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6877 }
6878 };
6879
6880 const std::vector<Operation> operations = {
6881 {
6882 .type = OperationType::CHANNEL_SHUFFLE,
6883 .inputs = {0, 1, 2},
6884 .outputs = {3},
6885 }
6886 };
6887
6888 const std::vector<uint32_t> inputIndexes = {0};
6889 const std::vector<uint32_t> outputIndexes = {3};
6890 std::vector<uint8_t> operandValues = {
6891 3, 0, 0, 0, 1, 0, 0, 0
6892 };
6893 const std::vector<hidl_memory> pools = {};
6894
6895 return {
6896 .operands = operands,
6897 .operations = operations,
6898 .inputIndexes = inputIndexes,
6899 .outputIndexes = outputIndexes,
6900 .operandValues = operandValues,
6901 .pools = pools,
6902 };
6903 }
6904
is_ignored_dynamic_output_shape_dim2_axis1(int i)6905 inline bool is_ignored_dynamic_output_shape_dim2_axis1(int i) {
6906 static std::set<int> ignore = {};
6907 return ignore.find(i) != ignore.end();
6908 }
6909
6910 // Create the model
createTestModel_dynamic_output_shape_dim2_axis1_neg()6911 Model createTestModel_dynamic_output_shape_dim2_axis1_neg() {
6912 const std::vector<Operand> operands = {
6913 {
6914 .type = OperandType::TENSOR_FLOAT32,
6915 .dimensions = {3, 12},
6916 .numberOfConsumers = 1,
6917 .scale = 0.0f,
6918 .zeroPoint = 0,
6919 .lifetime = OperandLifeTime::MODEL_INPUT,
6920 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6921 },
6922 {
6923 .type = OperandType::INT32,
6924 .dimensions = {},
6925 .numberOfConsumers = 1,
6926 .scale = 0.0f,
6927 .zeroPoint = 0,
6928 .lifetime = OperandLifeTime::CONSTANT_COPY,
6929 .location = {.poolIndex = 0, .offset = 0, .length = 4},
6930 },
6931 {
6932 .type = OperandType::INT32,
6933 .dimensions = {},
6934 .numberOfConsumers = 1,
6935 .scale = 0.0f,
6936 .zeroPoint = 0,
6937 .lifetime = OperandLifeTime::CONSTANT_COPY,
6938 .location = {.poolIndex = 0, .offset = 4, .length = 4},
6939 },
6940 {
6941 .type = OperandType::TENSOR_FLOAT32,
6942 .dimensions = {0, 0},
6943 .numberOfConsumers = 0,
6944 .scale = 0.0f,
6945 .zeroPoint = 0,
6946 .lifetime = OperandLifeTime::MODEL_OUTPUT,
6947 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6948 }
6949 };
6950
6951 const std::vector<Operation> operations = {
6952 {
6953 .type = OperationType::CHANNEL_SHUFFLE,
6954 .inputs = {0, 1, 2},
6955 .outputs = {3},
6956 }
6957 };
6958
6959 const std::vector<uint32_t> inputIndexes = {0};
6960 const std::vector<uint32_t> outputIndexes = {3};
6961 std::vector<uint8_t> operandValues = {
6962 3, 0, 0, 0, 255, 255, 255, 255
6963 };
6964 const std::vector<hidl_memory> pools = {};
6965
6966 return {
6967 .operands = operands,
6968 .operations = operations,
6969 .inputIndexes = inputIndexes,
6970 .outputIndexes = outputIndexes,
6971 .operandValues = operandValues,
6972 .pools = pools,
6973 };
6974 }
6975
is_ignored_dynamic_output_shape_dim2_axis1_neg(int i)6976 inline bool is_ignored_dynamic_output_shape_dim2_axis1_neg(int i) {
6977 static std::set<int> ignore = {};
6978 return ignore.find(i) != ignore.end();
6979 }
6980
6981 // Create the model
createTestModel_dynamic_output_shape_dim1_axis0()6982 Model createTestModel_dynamic_output_shape_dim1_axis0() {
6983 const std::vector<Operand> operands = {
6984 {
6985 .type = OperandType::TENSOR_FLOAT32,
6986 .dimensions = {12},
6987 .numberOfConsumers = 1,
6988 .scale = 0.0f,
6989 .zeroPoint = 0,
6990 .lifetime = OperandLifeTime::MODEL_INPUT,
6991 .location = {.poolIndex = 0, .offset = 0, .length = 0},
6992 },
6993 {
6994 .type = OperandType::INT32,
6995 .dimensions = {},
6996 .numberOfConsumers = 1,
6997 .scale = 0.0f,
6998 .zeroPoint = 0,
6999 .lifetime = OperandLifeTime::CONSTANT_COPY,
7000 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7001 },
7002 {
7003 .type = OperandType::INT32,
7004 .dimensions = {},
7005 .numberOfConsumers = 1,
7006 .scale = 0.0f,
7007 .zeroPoint = 0,
7008 .lifetime = OperandLifeTime::CONSTANT_COPY,
7009 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7010 },
7011 {
7012 .type = OperandType::TENSOR_FLOAT32,
7013 .dimensions = {0},
7014 .numberOfConsumers = 0,
7015 .scale = 0.0f,
7016 .zeroPoint = 0,
7017 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7018 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7019 }
7020 };
7021
7022 const std::vector<Operation> operations = {
7023 {
7024 .type = OperationType::CHANNEL_SHUFFLE,
7025 .inputs = {0, 1, 2},
7026 .outputs = {3},
7027 }
7028 };
7029
7030 const std::vector<uint32_t> inputIndexes = {0};
7031 const std::vector<uint32_t> outputIndexes = {3};
7032 std::vector<uint8_t> operandValues = {
7033 3, 0, 0, 0, 0, 0, 0, 0
7034 };
7035 const std::vector<hidl_memory> pools = {};
7036
7037 return {
7038 .operands = operands,
7039 .operations = operations,
7040 .inputIndexes = inputIndexes,
7041 .outputIndexes = outputIndexes,
7042 .operandValues = operandValues,
7043 .pools = pools,
7044 };
7045 }
7046
is_ignored_dynamic_output_shape_dim1_axis0(int i)7047 inline bool is_ignored_dynamic_output_shape_dim1_axis0(int i) {
7048 static std::set<int> ignore = {};
7049 return ignore.find(i) != ignore.end();
7050 }
7051
7052 // Create the model
createTestModel_dynamic_output_shape_dim1_axis0_neg()7053 Model createTestModel_dynamic_output_shape_dim1_axis0_neg() {
7054 const std::vector<Operand> operands = {
7055 {
7056 .type = OperandType::TENSOR_FLOAT32,
7057 .dimensions = {12},
7058 .numberOfConsumers = 1,
7059 .scale = 0.0f,
7060 .zeroPoint = 0,
7061 .lifetime = OperandLifeTime::MODEL_INPUT,
7062 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7063 },
7064 {
7065 .type = OperandType::INT32,
7066 .dimensions = {},
7067 .numberOfConsumers = 1,
7068 .scale = 0.0f,
7069 .zeroPoint = 0,
7070 .lifetime = OperandLifeTime::CONSTANT_COPY,
7071 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7072 },
7073 {
7074 .type = OperandType::INT32,
7075 .dimensions = {},
7076 .numberOfConsumers = 1,
7077 .scale = 0.0f,
7078 .zeroPoint = 0,
7079 .lifetime = OperandLifeTime::CONSTANT_COPY,
7080 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7081 },
7082 {
7083 .type = OperandType::TENSOR_FLOAT32,
7084 .dimensions = {0},
7085 .numberOfConsumers = 0,
7086 .scale = 0.0f,
7087 .zeroPoint = 0,
7088 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7089 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7090 }
7091 };
7092
7093 const std::vector<Operation> operations = {
7094 {
7095 .type = OperationType::CHANNEL_SHUFFLE,
7096 .inputs = {0, 1, 2},
7097 .outputs = {3},
7098 }
7099 };
7100
7101 const std::vector<uint32_t> inputIndexes = {0};
7102 const std::vector<uint32_t> outputIndexes = {3};
7103 std::vector<uint8_t> operandValues = {
7104 3, 0, 0, 0, 255, 255, 255, 255
7105 };
7106 const std::vector<hidl_memory> pools = {};
7107
7108 return {
7109 .operands = operands,
7110 .operations = operations,
7111 .inputIndexes = inputIndexes,
7112 .outputIndexes = outputIndexes,
7113 .operandValues = operandValues,
7114 .pools = pools,
7115 };
7116 }
7117
is_ignored_dynamic_output_shape_dim1_axis0_neg(int i)7118 inline bool is_ignored_dynamic_output_shape_dim1_axis0_neg(int i) {
7119 static std::set<int> ignore = {};
7120 return ignore.find(i) != ignore.end();
7121 }
7122
7123 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis0()7124 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis0() {
7125 const std::vector<Operand> operands = {
7126 {
7127 .type = OperandType::TENSOR_FLOAT32,
7128 .dimensions = {12, 2, 2, 3},
7129 .numberOfConsumers = 1,
7130 .scale = 0.0f,
7131 .zeroPoint = 0,
7132 .lifetime = OperandLifeTime::MODEL_INPUT,
7133 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7134 },
7135 {
7136 .type = OperandType::INT32,
7137 .dimensions = {},
7138 .numberOfConsumers = 1,
7139 .scale = 0.0f,
7140 .zeroPoint = 0,
7141 .lifetime = OperandLifeTime::CONSTANT_COPY,
7142 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7143 },
7144 {
7145 .type = OperandType::INT32,
7146 .dimensions = {},
7147 .numberOfConsumers = 1,
7148 .scale = 0.0f,
7149 .zeroPoint = 0,
7150 .lifetime = OperandLifeTime::CONSTANT_COPY,
7151 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7152 },
7153 {
7154 .type = OperandType::TENSOR_FLOAT32,
7155 .dimensions = {0, 0, 0, 0},
7156 .numberOfConsumers = 0,
7157 .scale = 0.0f,
7158 .zeroPoint = 0,
7159 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7160 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7161 }
7162 };
7163
7164 const std::vector<Operation> operations = {
7165 {
7166 .type = OperationType::CHANNEL_SHUFFLE,
7167 .inputs = {0, 1, 2},
7168 .outputs = {3},
7169 }
7170 };
7171
7172 const std::vector<uint32_t> inputIndexes = {0};
7173 const std::vector<uint32_t> outputIndexes = {3};
7174 std::vector<uint8_t> operandValues = {
7175 3, 0, 0, 0, 0, 0, 0, 0
7176 };
7177 const std::vector<hidl_memory> pools = {};
7178
7179 return {
7180 .operands = operands,
7181 .operations = operations,
7182 .inputIndexes = inputIndexes,
7183 .outputIndexes = outputIndexes,
7184 .operandValues = operandValues,
7185 .pools = pools,
7186 .relaxComputationFloat32toFloat16 = true,
7187 };
7188 }
7189
is_ignored_dynamic_output_shape_relaxed_dim4_axis0(int i)7190 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis0(int i) {
7191 static std::set<int> ignore = {};
7192 return ignore.find(i) != ignore.end();
7193 }
7194
7195 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis0_neg()7196 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis0_neg() {
7197 const std::vector<Operand> operands = {
7198 {
7199 .type = OperandType::TENSOR_FLOAT32,
7200 .dimensions = {12, 2, 2, 3},
7201 .numberOfConsumers = 1,
7202 .scale = 0.0f,
7203 .zeroPoint = 0,
7204 .lifetime = OperandLifeTime::MODEL_INPUT,
7205 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7206 },
7207 {
7208 .type = OperandType::INT32,
7209 .dimensions = {},
7210 .numberOfConsumers = 1,
7211 .scale = 0.0f,
7212 .zeroPoint = 0,
7213 .lifetime = OperandLifeTime::CONSTANT_COPY,
7214 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7215 },
7216 {
7217 .type = OperandType::INT32,
7218 .dimensions = {},
7219 .numberOfConsumers = 1,
7220 .scale = 0.0f,
7221 .zeroPoint = 0,
7222 .lifetime = OperandLifeTime::CONSTANT_COPY,
7223 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7224 },
7225 {
7226 .type = OperandType::TENSOR_FLOAT32,
7227 .dimensions = {0, 0, 0, 0},
7228 .numberOfConsumers = 0,
7229 .scale = 0.0f,
7230 .zeroPoint = 0,
7231 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7232 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7233 }
7234 };
7235
7236 const std::vector<Operation> operations = {
7237 {
7238 .type = OperationType::CHANNEL_SHUFFLE,
7239 .inputs = {0, 1, 2},
7240 .outputs = {3},
7241 }
7242 };
7243
7244 const std::vector<uint32_t> inputIndexes = {0};
7245 const std::vector<uint32_t> outputIndexes = {3};
7246 std::vector<uint8_t> operandValues = {
7247 3, 0, 0, 0, 252, 255, 255, 255
7248 };
7249 const std::vector<hidl_memory> pools = {};
7250
7251 return {
7252 .operands = operands,
7253 .operations = operations,
7254 .inputIndexes = inputIndexes,
7255 .outputIndexes = outputIndexes,
7256 .operandValues = operandValues,
7257 .pools = pools,
7258 .relaxComputationFloat32toFloat16 = true,
7259 };
7260 }
7261
is_ignored_dynamic_output_shape_relaxed_dim4_axis0_neg(int i)7262 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis0_neg(int i) {
7263 static std::set<int> ignore = {};
7264 return ignore.find(i) != ignore.end();
7265 }
7266
7267 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis1()7268 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis1() {
7269 const std::vector<Operand> operands = {
7270 {
7271 .type = OperandType::TENSOR_FLOAT32,
7272 .dimensions = {2, 12, 2, 3},
7273 .numberOfConsumers = 1,
7274 .scale = 0.0f,
7275 .zeroPoint = 0,
7276 .lifetime = OperandLifeTime::MODEL_INPUT,
7277 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7278 },
7279 {
7280 .type = OperandType::INT32,
7281 .dimensions = {},
7282 .numberOfConsumers = 1,
7283 .scale = 0.0f,
7284 .zeroPoint = 0,
7285 .lifetime = OperandLifeTime::CONSTANT_COPY,
7286 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7287 },
7288 {
7289 .type = OperandType::INT32,
7290 .dimensions = {},
7291 .numberOfConsumers = 1,
7292 .scale = 0.0f,
7293 .zeroPoint = 0,
7294 .lifetime = OperandLifeTime::CONSTANT_COPY,
7295 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7296 },
7297 {
7298 .type = OperandType::TENSOR_FLOAT32,
7299 .dimensions = {0, 0, 0, 0},
7300 .numberOfConsumers = 0,
7301 .scale = 0.0f,
7302 .zeroPoint = 0,
7303 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7304 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7305 }
7306 };
7307
7308 const std::vector<Operation> operations = {
7309 {
7310 .type = OperationType::CHANNEL_SHUFFLE,
7311 .inputs = {0, 1, 2},
7312 .outputs = {3},
7313 }
7314 };
7315
7316 const std::vector<uint32_t> inputIndexes = {0};
7317 const std::vector<uint32_t> outputIndexes = {3};
7318 std::vector<uint8_t> operandValues = {
7319 3, 0, 0, 0, 1, 0, 0, 0
7320 };
7321 const std::vector<hidl_memory> pools = {};
7322
7323 return {
7324 .operands = operands,
7325 .operations = operations,
7326 .inputIndexes = inputIndexes,
7327 .outputIndexes = outputIndexes,
7328 .operandValues = operandValues,
7329 .pools = pools,
7330 .relaxComputationFloat32toFloat16 = true,
7331 };
7332 }
7333
is_ignored_dynamic_output_shape_relaxed_dim4_axis1(int i)7334 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis1(int i) {
7335 static std::set<int> ignore = {};
7336 return ignore.find(i) != ignore.end();
7337 }
7338
7339 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis1_neg()7340 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis1_neg() {
7341 const std::vector<Operand> operands = {
7342 {
7343 .type = OperandType::TENSOR_FLOAT32,
7344 .dimensions = {2, 12, 2, 3},
7345 .numberOfConsumers = 1,
7346 .scale = 0.0f,
7347 .zeroPoint = 0,
7348 .lifetime = OperandLifeTime::MODEL_INPUT,
7349 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7350 },
7351 {
7352 .type = OperandType::INT32,
7353 .dimensions = {},
7354 .numberOfConsumers = 1,
7355 .scale = 0.0f,
7356 .zeroPoint = 0,
7357 .lifetime = OperandLifeTime::CONSTANT_COPY,
7358 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7359 },
7360 {
7361 .type = OperandType::INT32,
7362 .dimensions = {},
7363 .numberOfConsumers = 1,
7364 .scale = 0.0f,
7365 .zeroPoint = 0,
7366 .lifetime = OperandLifeTime::CONSTANT_COPY,
7367 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7368 },
7369 {
7370 .type = OperandType::TENSOR_FLOAT32,
7371 .dimensions = {0, 0, 0, 0},
7372 .numberOfConsumers = 0,
7373 .scale = 0.0f,
7374 .zeroPoint = 0,
7375 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7376 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7377 }
7378 };
7379
7380 const std::vector<Operation> operations = {
7381 {
7382 .type = OperationType::CHANNEL_SHUFFLE,
7383 .inputs = {0, 1, 2},
7384 .outputs = {3},
7385 }
7386 };
7387
7388 const std::vector<uint32_t> inputIndexes = {0};
7389 const std::vector<uint32_t> outputIndexes = {3};
7390 std::vector<uint8_t> operandValues = {
7391 3, 0, 0, 0, 253, 255, 255, 255
7392 };
7393 const std::vector<hidl_memory> pools = {};
7394
7395 return {
7396 .operands = operands,
7397 .operations = operations,
7398 .inputIndexes = inputIndexes,
7399 .outputIndexes = outputIndexes,
7400 .operandValues = operandValues,
7401 .pools = pools,
7402 .relaxComputationFloat32toFloat16 = true,
7403 };
7404 }
7405
is_ignored_dynamic_output_shape_relaxed_dim4_axis1_neg(int i)7406 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis1_neg(int i) {
7407 static std::set<int> ignore = {};
7408 return ignore.find(i) != ignore.end();
7409 }
7410
7411 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis2()7412 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis2() {
7413 const std::vector<Operand> operands = {
7414 {
7415 .type = OperandType::TENSOR_FLOAT32,
7416 .dimensions = {2, 2, 12, 3},
7417 .numberOfConsumers = 1,
7418 .scale = 0.0f,
7419 .zeroPoint = 0,
7420 .lifetime = OperandLifeTime::MODEL_INPUT,
7421 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7422 },
7423 {
7424 .type = OperandType::INT32,
7425 .dimensions = {},
7426 .numberOfConsumers = 1,
7427 .scale = 0.0f,
7428 .zeroPoint = 0,
7429 .lifetime = OperandLifeTime::CONSTANT_COPY,
7430 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7431 },
7432 {
7433 .type = OperandType::INT32,
7434 .dimensions = {},
7435 .numberOfConsumers = 1,
7436 .scale = 0.0f,
7437 .zeroPoint = 0,
7438 .lifetime = OperandLifeTime::CONSTANT_COPY,
7439 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7440 },
7441 {
7442 .type = OperandType::TENSOR_FLOAT32,
7443 .dimensions = {0, 0, 0, 0},
7444 .numberOfConsumers = 0,
7445 .scale = 0.0f,
7446 .zeroPoint = 0,
7447 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7448 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7449 }
7450 };
7451
7452 const std::vector<Operation> operations = {
7453 {
7454 .type = OperationType::CHANNEL_SHUFFLE,
7455 .inputs = {0, 1, 2},
7456 .outputs = {3},
7457 }
7458 };
7459
7460 const std::vector<uint32_t> inputIndexes = {0};
7461 const std::vector<uint32_t> outputIndexes = {3};
7462 std::vector<uint8_t> operandValues = {
7463 3, 0, 0, 0, 2, 0, 0, 0
7464 };
7465 const std::vector<hidl_memory> pools = {};
7466
7467 return {
7468 .operands = operands,
7469 .operations = operations,
7470 .inputIndexes = inputIndexes,
7471 .outputIndexes = outputIndexes,
7472 .operandValues = operandValues,
7473 .pools = pools,
7474 .relaxComputationFloat32toFloat16 = true,
7475 };
7476 }
7477
is_ignored_dynamic_output_shape_relaxed_dim4_axis2(int i)7478 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis2(int i) {
7479 static std::set<int> ignore = {};
7480 return ignore.find(i) != ignore.end();
7481 }
7482
7483 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis2_neg()7484 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis2_neg() {
7485 const std::vector<Operand> operands = {
7486 {
7487 .type = OperandType::TENSOR_FLOAT32,
7488 .dimensions = {2, 2, 12, 3},
7489 .numberOfConsumers = 1,
7490 .scale = 0.0f,
7491 .zeroPoint = 0,
7492 .lifetime = OperandLifeTime::MODEL_INPUT,
7493 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7494 },
7495 {
7496 .type = OperandType::INT32,
7497 .dimensions = {},
7498 .numberOfConsumers = 1,
7499 .scale = 0.0f,
7500 .zeroPoint = 0,
7501 .lifetime = OperandLifeTime::CONSTANT_COPY,
7502 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7503 },
7504 {
7505 .type = OperandType::INT32,
7506 .dimensions = {},
7507 .numberOfConsumers = 1,
7508 .scale = 0.0f,
7509 .zeroPoint = 0,
7510 .lifetime = OperandLifeTime::CONSTANT_COPY,
7511 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7512 },
7513 {
7514 .type = OperandType::TENSOR_FLOAT32,
7515 .dimensions = {0, 0, 0, 0},
7516 .numberOfConsumers = 0,
7517 .scale = 0.0f,
7518 .zeroPoint = 0,
7519 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7520 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7521 }
7522 };
7523
7524 const std::vector<Operation> operations = {
7525 {
7526 .type = OperationType::CHANNEL_SHUFFLE,
7527 .inputs = {0, 1, 2},
7528 .outputs = {3},
7529 }
7530 };
7531
7532 const std::vector<uint32_t> inputIndexes = {0};
7533 const std::vector<uint32_t> outputIndexes = {3};
7534 std::vector<uint8_t> operandValues = {
7535 3, 0, 0, 0, 254, 255, 255, 255
7536 };
7537 const std::vector<hidl_memory> pools = {};
7538
7539 return {
7540 .operands = operands,
7541 .operations = operations,
7542 .inputIndexes = inputIndexes,
7543 .outputIndexes = outputIndexes,
7544 .operandValues = operandValues,
7545 .pools = pools,
7546 .relaxComputationFloat32toFloat16 = true,
7547 };
7548 }
7549
is_ignored_dynamic_output_shape_relaxed_dim4_axis2_neg(int i)7550 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis2_neg(int i) {
7551 static std::set<int> ignore = {};
7552 return ignore.find(i) != ignore.end();
7553 }
7554
7555 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis3()7556 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis3() {
7557 const std::vector<Operand> operands = {
7558 {
7559 .type = OperandType::TENSOR_FLOAT32,
7560 .dimensions = {2, 2, 3, 12},
7561 .numberOfConsumers = 1,
7562 .scale = 0.0f,
7563 .zeroPoint = 0,
7564 .lifetime = OperandLifeTime::MODEL_INPUT,
7565 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7566 },
7567 {
7568 .type = OperandType::INT32,
7569 .dimensions = {},
7570 .numberOfConsumers = 1,
7571 .scale = 0.0f,
7572 .zeroPoint = 0,
7573 .lifetime = OperandLifeTime::CONSTANT_COPY,
7574 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7575 },
7576 {
7577 .type = OperandType::INT32,
7578 .dimensions = {},
7579 .numberOfConsumers = 1,
7580 .scale = 0.0f,
7581 .zeroPoint = 0,
7582 .lifetime = OperandLifeTime::CONSTANT_COPY,
7583 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7584 },
7585 {
7586 .type = OperandType::TENSOR_FLOAT32,
7587 .dimensions = {0, 0, 0, 0},
7588 .numberOfConsumers = 0,
7589 .scale = 0.0f,
7590 .zeroPoint = 0,
7591 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7592 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7593 }
7594 };
7595
7596 const std::vector<Operation> operations = {
7597 {
7598 .type = OperationType::CHANNEL_SHUFFLE,
7599 .inputs = {0, 1, 2},
7600 .outputs = {3},
7601 }
7602 };
7603
7604 const std::vector<uint32_t> inputIndexes = {0};
7605 const std::vector<uint32_t> outputIndexes = {3};
7606 std::vector<uint8_t> operandValues = {
7607 3, 0, 0, 0, 3, 0, 0, 0
7608 };
7609 const std::vector<hidl_memory> pools = {};
7610
7611 return {
7612 .operands = operands,
7613 .operations = operations,
7614 .inputIndexes = inputIndexes,
7615 .outputIndexes = outputIndexes,
7616 .operandValues = operandValues,
7617 .pools = pools,
7618 .relaxComputationFloat32toFloat16 = true,
7619 };
7620 }
7621
is_ignored_dynamic_output_shape_relaxed_dim4_axis3(int i)7622 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis3(int i) {
7623 static std::set<int> ignore = {};
7624 return ignore.find(i) != ignore.end();
7625 }
7626
7627 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim4_axis3_neg()7628 Model createTestModel_dynamic_output_shape_relaxed_dim4_axis3_neg() {
7629 const std::vector<Operand> operands = {
7630 {
7631 .type = OperandType::TENSOR_FLOAT32,
7632 .dimensions = {2, 2, 3, 12},
7633 .numberOfConsumers = 1,
7634 .scale = 0.0f,
7635 .zeroPoint = 0,
7636 .lifetime = OperandLifeTime::MODEL_INPUT,
7637 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7638 },
7639 {
7640 .type = OperandType::INT32,
7641 .dimensions = {},
7642 .numberOfConsumers = 1,
7643 .scale = 0.0f,
7644 .zeroPoint = 0,
7645 .lifetime = OperandLifeTime::CONSTANT_COPY,
7646 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7647 },
7648 {
7649 .type = OperandType::INT32,
7650 .dimensions = {},
7651 .numberOfConsumers = 1,
7652 .scale = 0.0f,
7653 .zeroPoint = 0,
7654 .lifetime = OperandLifeTime::CONSTANT_COPY,
7655 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7656 },
7657 {
7658 .type = OperandType::TENSOR_FLOAT32,
7659 .dimensions = {0, 0, 0, 0},
7660 .numberOfConsumers = 0,
7661 .scale = 0.0f,
7662 .zeroPoint = 0,
7663 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7664 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7665 }
7666 };
7667
7668 const std::vector<Operation> operations = {
7669 {
7670 .type = OperationType::CHANNEL_SHUFFLE,
7671 .inputs = {0, 1, 2},
7672 .outputs = {3},
7673 }
7674 };
7675
7676 const std::vector<uint32_t> inputIndexes = {0};
7677 const std::vector<uint32_t> outputIndexes = {3};
7678 std::vector<uint8_t> operandValues = {
7679 3, 0, 0, 0, 255, 255, 255, 255
7680 };
7681 const std::vector<hidl_memory> pools = {};
7682
7683 return {
7684 .operands = operands,
7685 .operations = operations,
7686 .inputIndexes = inputIndexes,
7687 .outputIndexes = outputIndexes,
7688 .operandValues = operandValues,
7689 .pools = pools,
7690 .relaxComputationFloat32toFloat16 = true,
7691 };
7692 }
7693
is_ignored_dynamic_output_shape_relaxed_dim4_axis3_neg(int i)7694 inline bool is_ignored_dynamic_output_shape_relaxed_dim4_axis3_neg(int i) {
7695 static std::set<int> ignore = {};
7696 return ignore.find(i) != ignore.end();
7697 }
7698
7699 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis0()7700 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis0() {
7701 const std::vector<Operand> operands = {
7702 {
7703 .type = OperandType::TENSOR_FLOAT32,
7704 .dimensions = {12, 2, 3},
7705 .numberOfConsumers = 1,
7706 .scale = 0.0f,
7707 .zeroPoint = 0,
7708 .lifetime = OperandLifeTime::MODEL_INPUT,
7709 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7710 },
7711 {
7712 .type = OperandType::INT32,
7713 .dimensions = {},
7714 .numberOfConsumers = 1,
7715 .scale = 0.0f,
7716 .zeroPoint = 0,
7717 .lifetime = OperandLifeTime::CONSTANT_COPY,
7718 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7719 },
7720 {
7721 .type = OperandType::INT32,
7722 .dimensions = {},
7723 .numberOfConsumers = 1,
7724 .scale = 0.0f,
7725 .zeroPoint = 0,
7726 .lifetime = OperandLifeTime::CONSTANT_COPY,
7727 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7728 },
7729 {
7730 .type = OperandType::TENSOR_FLOAT32,
7731 .dimensions = {0, 0, 0},
7732 .numberOfConsumers = 0,
7733 .scale = 0.0f,
7734 .zeroPoint = 0,
7735 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7736 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7737 }
7738 };
7739
7740 const std::vector<Operation> operations = {
7741 {
7742 .type = OperationType::CHANNEL_SHUFFLE,
7743 .inputs = {0, 1, 2},
7744 .outputs = {3},
7745 }
7746 };
7747
7748 const std::vector<uint32_t> inputIndexes = {0};
7749 const std::vector<uint32_t> outputIndexes = {3};
7750 std::vector<uint8_t> operandValues = {
7751 3, 0, 0, 0, 0, 0, 0, 0
7752 };
7753 const std::vector<hidl_memory> pools = {};
7754
7755 return {
7756 .operands = operands,
7757 .operations = operations,
7758 .inputIndexes = inputIndexes,
7759 .outputIndexes = outputIndexes,
7760 .operandValues = operandValues,
7761 .pools = pools,
7762 .relaxComputationFloat32toFloat16 = true,
7763 };
7764 }
7765
is_ignored_dynamic_output_shape_relaxed_dim3_axis0(int i)7766 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis0(int i) {
7767 static std::set<int> ignore = {};
7768 return ignore.find(i) != ignore.end();
7769 }
7770
7771 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis0_neg()7772 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis0_neg() {
7773 const std::vector<Operand> operands = {
7774 {
7775 .type = OperandType::TENSOR_FLOAT32,
7776 .dimensions = {12, 2, 3},
7777 .numberOfConsumers = 1,
7778 .scale = 0.0f,
7779 .zeroPoint = 0,
7780 .lifetime = OperandLifeTime::MODEL_INPUT,
7781 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7782 },
7783 {
7784 .type = OperandType::INT32,
7785 .dimensions = {},
7786 .numberOfConsumers = 1,
7787 .scale = 0.0f,
7788 .zeroPoint = 0,
7789 .lifetime = OperandLifeTime::CONSTANT_COPY,
7790 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7791 },
7792 {
7793 .type = OperandType::INT32,
7794 .dimensions = {},
7795 .numberOfConsumers = 1,
7796 .scale = 0.0f,
7797 .zeroPoint = 0,
7798 .lifetime = OperandLifeTime::CONSTANT_COPY,
7799 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7800 },
7801 {
7802 .type = OperandType::TENSOR_FLOAT32,
7803 .dimensions = {0, 0, 0},
7804 .numberOfConsumers = 0,
7805 .scale = 0.0f,
7806 .zeroPoint = 0,
7807 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7808 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7809 }
7810 };
7811
7812 const std::vector<Operation> operations = {
7813 {
7814 .type = OperationType::CHANNEL_SHUFFLE,
7815 .inputs = {0, 1, 2},
7816 .outputs = {3},
7817 }
7818 };
7819
7820 const std::vector<uint32_t> inputIndexes = {0};
7821 const std::vector<uint32_t> outputIndexes = {3};
7822 std::vector<uint8_t> operandValues = {
7823 3, 0, 0, 0, 253, 255, 255, 255
7824 };
7825 const std::vector<hidl_memory> pools = {};
7826
7827 return {
7828 .operands = operands,
7829 .operations = operations,
7830 .inputIndexes = inputIndexes,
7831 .outputIndexes = outputIndexes,
7832 .operandValues = operandValues,
7833 .pools = pools,
7834 .relaxComputationFloat32toFloat16 = true,
7835 };
7836 }
7837
is_ignored_dynamic_output_shape_relaxed_dim3_axis0_neg(int i)7838 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis0_neg(int i) {
7839 static std::set<int> ignore = {};
7840 return ignore.find(i) != ignore.end();
7841 }
7842
7843 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis1()7844 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis1() {
7845 const std::vector<Operand> operands = {
7846 {
7847 .type = OperandType::TENSOR_FLOAT32,
7848 .dimensions = {2, 12, 3},
7849 .numberOfConsumers = 1,
7850 .scale = 0.0f,
7851 .zeroPoint = 0,
7852 .lifetime = OperandLifeTime::MODEL_INPUT,
7853 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7854 },
7855 {
7856 .type = OperandType::INT32,
7857 .dimensions = {},
7858 .numberOfConsumers = 1,
7859 .scale = 0.0f,
7860 .zeroPoint = 0,
7861 .lifetime = OperandLifeTime::CONSTANT_COPY,
7862 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7863 },
7864 {
7865 .type = OperandType::INT32,
7866 .dimensions = {},
7867 .numberOfConsumers = 1,
7868 .scale = 0.0f,
7869 .zeroPoint = 0,
7870 .lifetime = OperandLifeTime::CONSTANT_COPY,
7871 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7872 },
7873 {
7874 .type = OperandType::TENSOR_FLOAT32,
7875 .dimensions = {0, 0, 0},
7876 .numberOfConsumers = 0,
7877 .scale = 0.0f,
7878 .zeroPoint = 0,
7879 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7880 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7881 }
7882 };
7883
7884 const std::vector<Operation> operations = {
7885 {
7886 .type = OperationType::CHANNEL_SHUFFLE,
7887 .inputs = {0, 1, 2},
7888 .outputs = {3},
7889 }
7890 };
7891
7892 const std::vector<uint32_t> inputIndexes = {0};
7893 const std::vector<uint32_t> outputIndexes = {3};
7894 std::vector<uint8_t> operandValues = {
7895 3, 0, 0, 0, 1, 0, 0, 0
7896 };
7897 const std::vector<hidl_memory> pools = {};
7898
7899 return {
7900 .operands = operands,
7901 .operations = operations,
7902 .inputIndexes = inputIndexes,
7903 .outputIndexes = outputIndexes,
7904 .operandValues = operandValues,
7905 .pools = pools,
7906 .relaxComputationFloat32toFloat16 = true,
7907 };
7908 }
7909
is_ignored_dynamic_output_shape_relaxed_dim3_axis1(int i)7910 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis1(int i) {
7911 static std::set<int> ignore = {};
7912 return ignore.find(i) != ignore.end();
7913 }
7914
7915 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis1_neg()7916 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis1_neg() {
7917 const std::vector<Operand> operands = {
7918 {
7919 .type = OperandType::TENSOR_FLOAT32,
7920 .dimensions = {2, 12, 3},
7921 .numberOfConsumers = 1,
7922 .scale = 0.0f,
7923 .zeroPoint = 0,
7924 .lifetime = OperandLifeTime::MODEL_INPUT,
7925 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7926 },
7927 {
7928 .type = OperandType::INT32,
7929 .dimensions = {},
7930 .numberOfConsumers = 1,
7931 .scale = 0.0f,
7932 .zeroPoint = 0,
7933 .lifetime = OperandLifeTime::CONSTANT_COPY,
7934 .location = {.poolIndex = 0, .offset = 0, .length = 4},
7935 },
7936 {
7937 .type = OperandType::INT32,
7938 .dimensions = {},
7939 .numberOfConsumers = 1,
7940 .scale = 0.0f,
7941 .zeroPoint = 0,
7942 .lifetime = OperandLifeTime::CONSTANT_COPY,
7943 .location = {.poolIndex = 0, .offset = 4, .length = 4},
7944 },
7945 {
7946 .type = OperandType::TENSOR_FLOAT32,
7947 .dimensions = {0, 0, 0},
7948 .numberOfConsumers = 0,
7949 .scale = 0.0f,
7950 .zeroPoint = 0,
7951 .lifetime = OperandLifeTime::MODEL_OUTPUT,
7952 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7953 }
7954 };
7955
7956 const std::vector<Operation> operations = {
7957 {
7958 .type = OperationType::CHANNEL_SHUFFLE,
7959 .inputs = {0, 1, 2},
7960 .outputs = {3},
7961 }
7962 };
7963
7964 const std::vector<uint32_t> inputIndexes = {0};
7965 const std::vector<uint32_t> outputIndexes = {3};
7966 std::vector<uint8_t> operandValues = {
7967 3, 0, 0, 0, 254, 255, 255, 255
7968 };
7969 const std::vector<hidl_memory> pools = {};
7970
7971 return {
7972 .operands = operands,
7973 .operations = operations,
7974 .inputIndexes = inputIndexes,
7975 .outputIndexes = outputIndexes,
7976 .operandValues = operandValues,
7977 .pools = pools,
7978 .relaxComputationFloat32toFloat16 = true,
7979 };
7980 }
7981
is_ignored_dynamic_output_shape_relaxed_dim3_axis1_neg(int i)7982 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis1_neg(int i) {
7983 static std::set<int> ignore = {};
7984 return ignore.find(i) != ignore.end();
7985 }
7986
7987 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis2()7988 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis2() {
7989 const std::vector<Operand> operands = {
7990 {
7991 .type = OperandType::TENSOR_FLOAT32,
7992 .dimensions = {2, 3, 12},
7993 .numberOfConsumers = 1,
7994 .scale = 0.0f,
7995 .zeroPoint = 0,
7996 .lifetime = OperandLifeTime::MODEL_INPUT,
7997 .location = {.poolIndex = 0, .offset = 0, .length = 0},
7998 },
7999 {
8000 .type = OperandType::INT32,
8001 .dimensions = {},
8002 .numberOfConsumers = 1,
8003 .scale = 0.0f,
8004 .zeroPoint = 0,
8005 .lifetime = OperandLifeTime::CONSTANT_COPY,
8006 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8007 },
8008 {
8009 .type = OperandType::INT32,
8010 .dimensions = {},
8011 .numberOfConsumers = 1,
8012 .scale = 0.0f,
8013 .zeroPoint = 0,
8014 .lifetime = OperandLifeTime::CONSTANT_COPY,
8015 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8016 },
8017 {
8018 .type = OperandType::TENSOR_FLOAT32,
8019 .dimensions = {0, 0, 0},
8020 .numberOfConsumers = 0,
8021 .scale = 0.0f,
8022 .zeroPoint = 0,
8023 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8024 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8025 }
8026 };
8027
8028 const std::vector<Operation> operations = {
8029 {
8030 .type = OperationType::CHANNEL_SHUFFLE,
8031 .inputs = {0, 1, 2},
8032 .outputs = {3},
8033 }
8034 };
8035
8036 const std::vector<uint32_t> inputIndexes = {0};
8037 const std::vector<uint32_t> outputIndexes = {3};
8038 std::vector<uint8_t> operandValues = {
8039 3, 0, 0, 0, 2, 0, 0, 0
8040 };
8041 const std::vector<hidl_memory> pools = {};
8042
8043 return {
8044 .operands = operands,
8045 .operations = operations,
8046 .inputIndexes = inputIndexes,
8047 .outputIndexes = outputIndexes,
8048 .operandValues = operandValues,
8049 .pools = pools,
8050 .relaxComputationFloat32toFloat16 = true,
8051 };
8052 }
8053
is_ignored_dynamic_output_shape_relaxed_dim3_axis2(int i)8054 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis2(int i) {
8055 static std::set<int> ignore = {};
8056 return ignore.find(i) != ignore.end();
8057 }
8058
8059 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim3_axis2_neg()8060 Model createTestModel_dynamic_output_shape_relaxed_dim3_axis2_neg() {
8061 const std::vector<Operand> operands = {
8062 {
8063 .type = OperandType::TENSOR_FLOAT32,
8064 .dimensions = {2, 3, 12},
8065 .numberOfConsumers = 1,
8066 .scale = 0.0f,
8067 .zeroPoint = 0,
8068 .lifetime = OperandLifeTime::MODEL_INPUT,
8069 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8070 },
8071 {
8072 .type = OperandType::INT32,
8073 .dimensions = {},
8074 .numberOfConsumers = 1,
8075 .scale = 0.0f,
8076 .zeroPoint = 0,
8077 .lifetime = OperandLifeTime::CONSTANT_COPY,
8078 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8079 },
8080 {
8081 .type = OperandType::INT32,
8082 .dimensions = {},
8083 .numberOfConsumers = 1,
8084 .scale = 0.0f,
8085 .zeroPoint = 0,
8086 .lifetime = OperandLifeTime::CONSTANT_COPY,
8087 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8088 },
8089 {
8090 .type = OperandType::TENSOR_FLOAT32,
8091 .dimensions = {0, 0, 0},
8092 .numberOfConsumers = 0,
8093 .scale = 0.0f,
8094 .zeroPoint = 0,
8095 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8096 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8097 }
8098 };
8099
8100 const std::vector<Operation> operations = {
8101 {
8102 .type = OperationType::CHANNEL_SHUFFLE,
8103 .inputs = {0, 1, 2},
8104 .outputs = {3},
8105 }
8106 };
8107
8108 const std::vector<uint32_t> inputIndexes = {0};
8109 const std::vector<uint32_t> outputIndexes = {3};
8110 std::vector<uint8_t> operandValues = {
8111 3, 0, 0, 0, 255, 255, 255, 255
8112 };
8113 const std::vector<hidl_memory> pools = {};
8114
8115 return {
8116 .operands = operands,
8117 .operations = operations,
8118 .inputIndexes = inputIndexes,
8119 .outputIndexes = outputIndexes,
8120 .operandValues = operandValues,
8121 .pools = pools,
8122 .relaxComputationFloat32toFloat16 = true,
8123 };
8124 }
8125
is_ignored_dynamic_output_shape_relaxed_dim3_axis2_neg(int i)8126 inline bool is_ignored_dynamic_output_shape_relaxed_dim3_axis2_neg(int i) {
8127 static std::set<int> ignore = {};
8128 return ignore.find(i) != ignore.end();
8129 }
8130
8131 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim2_axis0()8132 Model createTestModel_dynamic_output_shape_relaxed_dim2_axis0() {
8133 const std::vector<Operand> operands = {
8134 {
8135 .type = OperandType::TENSOR_FLOAT32,
8136 .dimensions = {12, 3},
8137 .numberOfConsumers = 1,
8138 .scale = 0.0f,
8139 .zeroPoint = 0,
8140 .lifetime = OperandLifeTime::MODEL_INPUT,
8141 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8142 },
8143 {
8144 .type = OperandType::INT32,
8145 .dimensions = {},
8146 .numberOfConsumers = 1,
8147 .scale = 0.0f,
8148 .zeroPoint = 0,
8149 .lifetime = OperandLifeTime::CONSTANT_COPY,
8150 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8151 },
8152 {
8153 .type = OperandType::INT32,
8154 .dimensions = {},
8155 .numberOfConsumers = 1,
8156 .scale = 0.0f,
8157 .zeroPoint = 0,
8158 .lifetime = OperandLifeTime::CONSTANT_COPY,
8159 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8160 },
8161 {
8162 .type = OperandType::TENSOR_FLOAT32,
8163 .dimensions = {0, 0},
8164 .numberOfConsumers = 0,
8165 .scale = 0.0f,
8166 .zeroPoint = 0,
8167 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8168 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8169 }
8170 };
8171
8172 const std::vector<Operation> operations = {
8173 {
8174 .type = OperationType::CHANNEL_SHUFFLE,
8175 .inputs = {0, 1, 2},
8176 .outputs = {3},
8177 }
8178 };
8179
8180 const std::vector<uint32_t> inputIndexes = {0};
8181 const std::vector<uint32_t> outputIndexes = {3};
8182 std::vector<uint8_t> operandValues = {
8183 3, 0, 0, 0, 0, 0, 0, 0
8184 };
8185 const std::vector<hidl_memory> pools = {};
8186
8187 return {
8188 .operands = operands,
8189 .operations = operations,
8190 .inputIndexes = inputIndexes,
8191 .outputIndexes = outputIndexes,
8192 .operandValues = operandValues,
8193 .pools = pools,
8194 .relaxComputationFloat32toFloat16 = true,
8195 };
8196 }
8197
is_ignored_dynamic_output_shape_relaxed_dim2_axis0(int i)8198 inline bool is_ignored_dynamic_output_shape_relaxed_dim2_axis0(int i) {
8199 static std::set<int> ignore = {};
8200 return ignore.find(i) != ignore.end();
8201 }
8202
8203 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim2_axis0_neg()8204 Model createTestModel_dynamic_output_shape_relaxed_dim2_axis0_neg() {
8205 const std::vector<Operand> operands = {
8206 {
8207 .type = OperandType::TENSOR_FLOAT32,
8208 .dimensions = {12, 3},
8209 .numberOfConsumers = 1,
8210 .scale = 0.0f,
8211 .zeroPoint = 0,
8212 .lifetime = OperandLifeTime::MODEL_INPUT,
8213 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8214 },
8215 {
8216 .type = OperandType::INT32,
8217 .dimensions = {},
8218 .numberOfConsumers = 1,
8219 .scale = 0.0f,
8220 .zeroPoint = 0,
8221 .lifetime = OperandLifeTime::CONSTANT_COPY,
8222 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8223 },
8224 {
8225 .type = OperandType::INT32,
8226 .dimensions = {},
8227 .numberOfConsumers = 1,
8228 .scale = 0.0f,
8229 .zeroPoint = 0,
8230 .lifetime = OperandLifeTime::CONSTANT_COPY,
8231 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8232 },
8233 {
8234 .type = OperandType::TENSOR_FLOAT32,
8235 .dimensions = {0, 0},
8236 .numberOfConsumers = 0,
8237 .scale = 0.0f,
8238 .zeroPoint = 0,
8239 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8240 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8241 }
8242 };
8243
8244 const std::vector<Operation> operations = {
8245 {
8246 .type = OperationType::CHANNEL_SHUFFLE,
8247 .inputs = {0, 1, 2},
8248 .outputs = {3},
8249 }
8250 };
8251
8252 const std::vector<uint32_t> inputIndexes = {0};
8253 const std::vector<uint32_t> outputIndexes = {3};
8254 std::vector<uint8_t> operandValues = {
8255 3, 0, 0, 0, 254, 255, 255, 255
8256 };
8257 const std::vector<hidl_memory> pools = {};
8258
8259 return {
8260 .operands = operands,
8261 .operations = operations,
8262 .inputIndexes = inputIndexes,
8263 .outputIndexes = outputIndexes,
8264 .operandValues = operandValues,
8265 .pools = pools,
8266 .relaxComputationFloat32toFloat16 = true,
8267 };
8268 }
8269
is_ignored_dynamic_output_shape_relaxed_dim2_axis0_neg(int i)8270 inline bool is_ignored_dynamic_output_shape_relaxed_dim2_axis0_neg(int i) {
8271 static std::set<int> ignore = {};
8272 return ignore.find(i) != ignore.end();
8273 }
8274
8275 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim2_axis1()8276 Model createTestModel_dynamic_output_shape_relaxed_dim2_axis1() {
8277 const std::vector<Operand> operands = {
8278 {
8279 .type = OperandType::TENSOR_FLOAT32,
8280 .dimensions = {3, 12},
8281 .numberOfConsumers = 1,
8282 .scale = 0.0f,
8283 .zeroPoint = 0,
8284 .lifetime = OperandLifeTime::MODEL_INPUT,
8285 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8286 },
8287 {
8288 .type = OperandType::INT32,
8289 .dimensions = {},
8290 .numberOfConsumers = 1,
8291 .scale = 0.0f,
8292 .zeroPoint = 0,
8293 .lifetime = OperandLifeTime::CONSTANT_COPY,
8294 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8295 },
8296 {
8297 .type = OperandType::INT32,
8298 .dimensions = {},
8299 .numberOfConsumers = 1,
8300 .scale = 0.0f,
8301 .zeroPoint = 0,
8302 .lifetime = OperandLifeTime::CONSTANT_COPY,
8303 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8304 },
8305 {
8306 .type = OperandType::TENSOR_FLOAT32,
8307 .dimensions = {0, 0},
8308 .numberOfConsumers = 0,
8309 .scale = 0.0f,
8310 .zeroPoint = 0,
8311 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8312 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8313 }
8314 };
8315
8316 const std::vector<Operation> operations = {
8317 {
8318 .type = OperationType::CHANNEL_SHUFFLE,
8319 .inputs = {0, 1, 2},
8320 .outputs = {3},
8321 }
8322 };
8323
8324 const std::vector<uint32_t> inputIndexes = {0};
8325 const std::vector<uint32_t> outputIndexes = {3};
8326 std::vector<uint8_t> operandValues = {
8327 3, 0, 0, 0, 1, 0, 0, 0
8328 };
8329 const std::vector<hidl_memory> pools = {};
8330
8331 return {
8332 .operands = operands,
8333 .operations = operations,
8334 .inputIndexes = inputIndexes,
8335 .outputIndexes = outputIndexes,
8336 .operandValues = operandValues,
8337 .pools = pools,
8338 .relaxComputationFloat32toFloat16 = true,
8339 };
8340 }
8341
is_ignored_dynamic_output_shape_relaxed_dim2_axis1(int i)8342 inline bool is_ignored_dynamic_output_shape_relaxed_dim2_axis1(int i) {
8343 static std::set<int> ignore = {};
8344 return ignore.find(i) != ignore.end();
8345 }
8346
8347 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim2_axis1_neg()8348 Model createTestModel_dynamic_output_shape_relaxed_dim2_axis1_neg() {
8349 const std::vector<Operand> operands = {
8350 {
8351 .type = OperandType::TENSOR_FLOAT32,
8352 .dimensions = {3, 12},
8353 .numberOfConsumers = 1,
8354 .scale = 0.0f,
8355 .zeroPoint = 0,
8356 .lifetime = OperandLifeTime::MODEL_INPUT,
8357 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8358 },
8359 {
8360 .type = OperandType::INT32,
8361 .dimensions = {},
8362 .numberOfConsumers = 1,
8363 .scale = 0.0f,
8364 .zeroPoint = 0,
8365 .lifetime = OperandLifeTime::CONSTANT_COPY,
8366 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8367 },
8368 {
8369 .type = OperandType::INT32,
8370 .dimensions = {},
8371 .numberOfConsumers = 1,
8372 .scale = 0.0f,
8373 .zeroPoint = 0,
8374 .lifetime = OperandLifeTime::CONSTANT_COPY,
8375 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8376 },
8377 {
8378 .type = OperandType::TENSOR_FLOAT32,
8379 .dimensions = {0, 0},
8380 .numberOfConsumers = 0,
8381 .scale = 0.0f,
8382 .zeroPoint = 0,
8383 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8384 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8385 }
8386 };
8387
8388 const std::vector<Operation> operations = {
8389 {
8390 .type = OperationType::CHANNEL_SHUFFLE,
8391 .inputs = {0, 1, 2},
8392 .outputs = {3},
8393 }
8394 };
8395
8396 const std::vector<uint32_t> inputIndexes = {0};
8397 const std::vector<uint32_t> outputIndexes = {3};
8398 std::vector<uint8_t> operandValues = {
8399 3, 0, 0, 0, 255, 255, 255, 255
8400 };
8401 const std::vector<hidl_memory> pools = {};
8402
8403 return {
8404 .operands = operands,
8405 .operations = operations,
8406 .inputIndexes = inputIndexes,
8407 .outputIndexes = outputIndexes,
8408 .operandValues = operandValues,
8409 .pools = pools,
8410 .relaxComputationFloat32toFloat16 = true,
8411 };
8412 }
8413
is_ignored_dynamic_output_shape_relaxed_dim2_axis1_neg(int i)8414 inline bool is_ignored_dynamic_output_shape_relaxed_dim2_axis1_neg(int i) {
8415 static std::set<int> ignore = {};
8416 return ignore.find(i) != ignore.end();
8417 }
8418
8419 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim1_axis0()8420 Model createTestModel_dynamic_output_shape_relaxed_dim1_axis0() {
8421 const std::vector<Operand> operands = {
8422 {
8423 .type = OperandType::TENSOR_FLOAT32,
8424 .dimensions = {12},
8425 .numberOfConsumers = 1,
8426 .scale = 0.0f,
8427 .zeroPoint = 0,
8428 .lifetime = OperandLifeTime::MODEL_INPUT,
8429 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8430 },
8431 {
8432 .type = OperandType::INT32,
8433 .dimensions = {},
8434 .numberOfConsumers = 1,
8435 .scale = 0.0f,
8436 .zeroPoint = 0,
8437 .lifetime = OperandLifeTime::CONSTANT_COPY,
8438 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8439 },
8440 {
8441 .type = OperandType::INT32,
8442 .dimensions = {},
8443 .numberOfConsumers = 1,
8444 .scale = 0.0f,
8445 .zeroPoint = 0,
8446 .lifetime = OperandLifeTime::CONSTANT_COPY,
8447 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8448 },
8449 {
8450 .type = OperandType::TENSOR_FLOAT32,
8451 .dimensions = {0},
8452 .numberOfConsumers = 0,
8453 .scale = 0.0f,
8454 .zeroPoint = 0,
8455 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8456 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8457 }
8458 };
8459
8460 const std::vector<Operation> operations = {
8461 {
8462 .type = OperationType::CHANNEL_SHUFFLE,
8463 .inputs = {0, 1, 2},
8464 .outputs = {3},
8465 }
8466 };
8467
8468 const std::vector<uint32_t> inputIndexes = {0};
8469 const std::vector<uint32_t> outputIndexes = {3};
8470 std::vector<uint8_t> operandValues = {
8471 3, 0, 0, 0, 0, 0, 0, 0
8472 };
8473 const std::vector<hidl_memory> pools = {};
8474
8475 return {
8476 .operands = operands,
8477 .operations = operations,
8478 .inputIndexes = inputIndexes,
8479 .outputIndexes = outputIndexes,
8480 .operandValues = operandValues,
8481 .pools = pools,
8482 .relaxComputationFloat32toFloat16 = true,
8483 };
8484 }
8485
is_ignored_dynamic_output_shape_relaxed_dim1_axis0(int i)8486 inline bool is_ignored_dynamic_output_shape_relaxed_dim1_axis0(int i) {
8487 static std::set<int> ignore = {};
8488 return ignore.find(i) != ignore.end();
8489 }
8490
8491 // Create the model
createTestModel_dynamic_output_shape_relaxed_dim1_axis0_neg()8492 Model createTestModel_dynamic_output_shape_relaxed_dim1_axis0_neg() {
8493 const std::vector<Operand> operands = {
8494 {
8495 .type = OperandType::TENSOR_FLOAT32,
8496 .dimensions = {12},
8497 .numberOfConsumers = 1,
8498 .scale = 0.0f,
8499 .zeroPoint = 0,
8500 .lifetime = OperandLifeTime::MODEL_INPUT,
8501 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8502 },
8503 {
8504 .type = OperandType::INT32,
8505 .dimensions = {},
8506 .numberOfConsumers = 1,
8507 .scale = 0.0f,
8508 .zeroPoint = 0,
8509 .lifetime = OperandLifeTime::CONSTANT_COPY,
8510 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8511 },
8512 {
8513 .type = OperandType::INT32,
8514 .dimensions = {},
8515 .numberOfConsumers = 1,
8516 .scale = 0.0f,
8517 .zeroPoint = 0,
8518 .lifetime = OperandLifeTime::CONSTANT_COPY,
8519 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8520 },
8521 {
8522 .type = OperandType::TENSOR_FLOAT32,
8523 .dimensions = {0},
8524 .numberOfConsumers = 0,
8525 .scale = 0.0f,
8526 .zeroPoint = 0,
8527 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8528 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8529 }
8530 };
8531
8532 const std::vector<Operation> operations = {
8533 {
8534 .type = OperationType::CHANNEL_SHUFFLE,
8535 .inputs = {0, 1, 2},
8536 .outputs = {3},
8537 }
8538 };
8539
8540 const std::vector<uint32_t> inputIndexes = {0};
8541 const std::vector<uint32_t> outputIndexes = {3};
8542 std::vector<uint8_t> operandValues = {
8543 3, 0, 0, 0, 255, 255, 255, 255
8544 };
8545 const std::vector<hidl_memory> pools = {};
8546
8547 return {
8548 .operands = operands,
8549 .operations = operations,
8550 .inputIndexes = inputIndexes,
8551 .outputIndexes = outputIndexes,
8552 .operandValues = operandValues,
8553 .pools = pools,
8554 .relaxComputationFloat32toFloat16 = true,
8555 };
8556 }
8557
is_ignored_dynamic_output_shape_relaxed_dim1_axis0_neg(int i)8558 inline bool is_ignored_dynamic_output_shape_relaxed_dim1_axis0_neg(int i) {
8559 static std::set<int> ignore = {};
8560 return ignore.find(i) != ignore.end();
8561 }
8562
8563 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis0()8564 Model createTestModel_dynamic_output_shape_quant8_dim4_axis0() {
8565 const std::vector<Operand> operands = {
8566 {
8567 .type = OperandType::TENSOR_QUANT8_ASYMM,
8568 .dimensions = {12, 2, 2, 3},
8569 .numberOfConsumers = 1,
8570 .scale = 0.25f,
8571 .zeroPoint = 128,
8572 .lifetime = OperandLifeTime::MODEL_INPUT,
8573 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8574 },
8575 {
8576 .type = OperandType::INT32,
8577 .dimensions = {},
8578 .numberOfConsumers = 1,
8579 .scale = 0.0f,
8580 .zeroPoint = 0,
8581 .lifetime = OperandLifeTime::CONSTANT_COPY,
8582 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8583 },
8584 {
8585 .type = OperandType::INT32,
8586 .dimensions = {},
8587 .numberOfConsumers = 1,
8588 .scale = 0.0f,
8589 .zeroPoint = 0,
8590 .lifetime = OperandLifeTime::CONSTANT_COPY,
8591 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8592 },
8593 {
8594 .type = OperandType::TENSOR_QUANT8_ASYMM,
8595 .dimensions = {0, 0, 0, 0},
8596 .numberOfConsumers = 0,
8597 .scale = 0.25f,
8598 .zeroPoint = 128,
8599 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8600 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8601 }
8602 };
8603
8604 const std::vector<Operation> operations = {
8605 {
8606 .type = OperationType::CHANNEL_SHUFFLE,
8607 .inputs = {0, 1, 2},
8608 .outputs = {3},
8609 }
8610 };
8611
8612 const std::vector<uint32_t> inputIndexes = {0};
8613 const std::vector<uint32_t> outputIndexes = {3};
8614 std::vector<uint8_t> operandValues = {
8615 3, 0, 0, 0, 0, 0, 0, 0
8616 };
8617 const std::vector<hidl_memory> pools = {};
8618
8619 return {
8620 .operands = operands,
8621 .operations = operations,
8622 .inputIndexes = inputIndexes,
8623 .outputIndexes = outputIndexes,
8624 .operandValues = operandValues,
8625 .pools = pools,
8626 };
8627 }
8628
is_ignored_dynamic_output_shape_quant8_dim4_axis0(int i)8629 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis0(int i) {
8630 static std::set<int> ignore = {};
8631 return ignore.find(i) != ignore.end();
8632 }
8633
8634 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis0_neg()8635 Model createTestModel_dynamic_output_shape_quant8_dim4_axis0_neg() {
8636 const std::vector<Operand> operands = {
8637 {
8638 .type = OperandType::TENSOR_QUANT8_ASYMM,
8639 .dimensions = {12, 2, 2, 3},
8640 .numberOfConsumers = 1,
8641 .scale = 0.25f,
8642 .zeroPoint = 128,
8643 .lifetime = OperandLifeTime::MODEL_INPUT,
8644 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8645 },
8646 {
8647 .type = OperandType::INT32,
8648 .dimensions = {},
8649 .numberOfConsumers = 1,
8650 .scale = 0.0f,
8651 .zeroPoint = 0,
8652 .lifetime = OperandLifeTime::CONSTANT_COPY,
8653 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8654 },
8655 {
8656 .type = OperandType::INT32,
8657 .dimensions = {},
8658 .numberOfConsumers = 1,
8659 .scale = 0.0f,
8660 .zeroPoint = 0,
8661 .lifetime = OperandLifeTime::CONSTANT_COPY,
8662 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8663 },
8664 {
8665 .type = OperandType::TENSOR_QUANT8_ASYMM,
8666 .dimensions = {0, 0, 0, 0},
8667 .numberOfConsumers = 0,
8668 .scale = 0.25f,
8669 .zeroPoint = 128,
8670 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8671 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8672 }
8673 };
8674
8675 const std::vector<Operation> operations = {
8676 {
8677 .type = OperationType::CHANNEL_SHUFFLE,
8678 .inputs = {0, 1, 2},
8679 .outputs = {3},
8680 }
8681 };
8682
8683 const std::vector<uint32_t> inputIndexes = {0};
8684 const std::vector<uint32_t> outputIndexes = {3};
8685 std::vector<uint8_t> operandValues = {
8686 3, 0, 0, 0, 252, 255, 255, 255
8687 };
8688 const std::vector<hidl_memory> pools = {};
8689
8690 return {
8691 .operands = operands,
8692 .operations = operations,
8693 .inputIndexes = inputIndexes,
8694 .outputIndexes = outputIndexes,
8695 .operandValues = operandValues,
8696 .pools = pools,
8697 };
8698 }
8699
is_ignored_dynamic_output_shape_quant8_dim4_axis0_neg(int i)8700 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis0_neg(int i) {
8701 static std::set<int> ignore = {};
8702 return ignore.find(i) != ignore.end();
8703 }
8704
8705 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis1()8706 Model createTestModel_dynamic_output_shape_quant8_dim4_axis1() {
8707 const std::vector<Operand> operands = {
8708 {
8709 .type = OperandType::TENSOR_QUANT8_ASYMM,
8710 .dimensions = {2, 12, 2, 3},
8711 .numberOfConsumers = 1,
8712 .scale = 0.25f,
8713 .zeroPoint = 128,
8714 .lifetime = OperandLifeTime::MODEL_INPUT,
8715 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8716 },
8717 {
8718 .type = OperandType::INT32,
8719 .dimensions = {},
8720 .numberOfConsumers = 1,
8721 .scale = 0.0f,
8722 .zeroPoint = 0,
8723 .lifetime = OperandLifeTime::CONSTANT_COPY,
8724 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8725 },
8726 {
8727 .type = OperandType::INT32,
8728 .dimensions = {},
8729 .numberOfConsumers = 1,
8730 .scale = 0.0f,
8731 .zeroPoint = 0,
8732 .lifetime = OperandLifeTime::CONSTANT_COPY,
8733 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8734 },
8735 {
8736 .type = OperandType::TENSOR_QUANT8_ASYMM,
8737 .dimensions = {0, 0, 0, 0},
8738 .numberOfConsumers = 0,
8739 .scale = 0.25f,
8740 .zeroPoint = 128,
8741 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8742 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8743 }
8744 };
8745
8746 const std::vector<Operation> operations = {
8747 {
8748 .type = OperationType::CHANNEL_SHUFFLE,
8749 .inputs = {0, 1, 2},
8750 .outputs = {3},
8751 }
8752 };
8753
8754 const std::vector<uint32_t> inputIndexes = {0};
8755 const std::vector<uint32_t> outputIndexes = {3};
8756 std::vector<uint8_t> operandValues = {
8757 3, 0, 0, 0, 1, 0, 0, 0
8758 };
8759 const std::vector<hidl_memory> pools = {};
8760
8761 return {
8762 .operands = operands,
8763 .operations = operations,
8764 .inputIndexes = inputIndexes,
8765 .outputIndexes = outputIndexes,
8766 .operandValues = operandValues,
8767 .pools = pools,
8768 };
8769 }
8770
is_ignored_dynamic_output_shape_quant8_dim4_axis1(int i)8771 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis1(int i) {
8772 static std::set<int> ignore = {};
8773 return ignore.find(i) != ignore.end();
8774 }
8775
8776 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis1_neg()8777 Model createTestModel_dynamic_output_shape_quant8_dim4_axis1_neg() {
8778 const std::vector<Operand> operands = {
8779 {
8780 .type = OperandType::TENSOR_QUANT8_ASYMM,
8781 .dimensions = {2, 12, 2, 3},
8782 .numberOfConsumers = 1,
8783 .scale = 0.25f,
8784 .zeroPoint = 128,
8785 .lifetime = OperandLifeTime::MODEL_INPUT,
8786 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8787 },
8788 {
8789 .type = OperandType::INT32,
8790 .dimensions = {},
8791 .numberOfConsumers = 1,
8792 .scale = 0.0f,
8793 .zeroPoint = 0,
8794 .lifetime = OperandLifeTime::CONSTANT_COPY,
8795 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8796 },
8797 {
8798 .type = OperandType::INT32,
8799 .dimensions = {},
8800 .numberOfConsumers = 1,
8801 .scale = 0.0f,
8802 .zeroPoint = 0,
8803 .lifetime = OperandLifeTime::CONSTANT_COPY,
8804 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8805 },
8806 {
8807 .type = OperandType::TENSOR_QUANT8_ASYMM,
8808 .dimensions = {0, 0, 0, 0},
8809 .numberOfConsumers = 0,
8810 .scale = 0.25f,
8811 .zeroPoint = 128,
8812 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8813 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8814 }
8815 };
8816
8817 const std::vector<Operation> operations = {
8818 {
8819 .type = OperationType::CHANNEL_SHUFFLE,
8820 .inputs = {0, 1, 2},
8821 .outputs = {3},
8822 }
8823 };
8824
8825 const std::vector<uint32_t> inputIndexes = {0};
8826 const std::vector<uint32_t> outputIndexes = {3};
8827 std::vector<uint8_t> operandValues = {
8828 3, 0, 0, 0, 253, 255, 255, 255
8829 };
8830 const std::vector<hidl_memory> pools = {};
8831
8832 return {
8833 .operands = operands,
8834 .operations = operations,
8835 .inputIndexes = inputIndexes,
8836 .outputIndexes = outputIndexes,
8837 .operandValues = operandValues,
8838 .pools = pools,
8839 };
8840 }
8841
is_ignored_dynamic_output_shape_quant8_dim4_axis1_neg(int i)8842 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis1_neg(int i) {
8843 static std::set<int> ignore = {};
8844 return ignore.find(i) != ignore.end();
8845 }
8846
8847 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis2()8848 Model createTestModel_dynamic_output_shape_quant8_dim4_axis2() {
8849 const std::vector<Operand> operands = {
8850 {
8851 .type = OperandType::TENSOR_QUANT8_ASYMM,
8852 .dimensions = {2, 2, 12, 3},
8853 .numberOfConsumers = 1,
8854 .scale = 0.25f,
8855 .zeroPoint = 128,
8856 .lifetime = OperandLifeTime::MODEL_INPUT,
8857 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8858 },
8859 {
8860 .type = OperandType::INT32,
8861 .dimensions = {},
8862 .numberOfConsumers = 1,
8863 .scale = 0.0f,
8864 .zeroPoint = 0,
8865 .lifetime = OperandLifeTime::CONSTANT_COPY,
8866 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8867 },
8868 {
8869 .type = OperandType::INT32,
8870 .dimensions = {},
8871 .numberOfConsumers = 1,
8872 .scale = 0.0f,
8873 .zeroPoint = 0,
8874 .lifetime = OperandLifeTime::CONSTANT_COPY,
8875 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8876 },
8877 {
8878 .type = OperandType::TENSOR_QUANT8_ASYMM,
8879 .dimensions = {0, 0, 0, 0},
8880 .numberOfConsumers = 0,
8881 .scale = 0.25f,
8882 .zeroPoint = 128,
8883 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8884 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8885 }
8886 };
8887
8888 const std::vector<Operation> operations = {
8889 {
8890 .type = OperationType::CHANNEL_SHUFFLE,
8891 .inputs = {0, 1, 2},
8892 .outputs = {3},
8893 }
8894 };
8895
8896 const std::vector<uint32_t> inputIndexes = {0};
8897 const std::vector<uint32_t> outputIndexes = {3};
8898 std::vector<uint8_t> operandValues = {
8899 3, 0, 0, 0, 2, 0, 0, 0
8900 };
8901 const std::vector<hidl_memory> pools = {};
8902
8903 return {
8904 .operands = operands,
8905 .operations = operations,
8906 .inputIndexes = inputIndexes,
8907 .outputIndexes = outputIndexes,
8908 .operandValues = operandValues,
8909 .pools = pools,
8910 };
8911 }
8912
is_ignored_dynamic_output_shape_quant8_dim4_axis2(int i)8913 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis2(int i) {
8914 static std::set<int> ignore = {};
8915 return ignore.find(i) != ignore.end();
8916 }
8917
8918 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis2_neg()8919 Model createTestModel_dynamic_output_shape_quant8_dim4_axis2_neg() {
8920 const std::vector<Operand> operands = {
8921 {
8922 .type = OperandType::TENSOR_QUANT8_ASYMM,
8923 .dimensions = {2, 2, 12, 3},
8924 .numberOfConsumers = 1,
8925 .scale = 0.25f,
8926 .zeroPoint = 128,
8927 .lifetime = OperandLifeTime::MODEL_INPUT,
8928 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8929 },
8930 {
8931 .type = OperandType::INT32,
8932 .dimensions = {},
8933 .numberOfConsumers = 1,
8934 .scale = 0.0f,
8935 .zeroPoint = 0,
8936 .lifetime = OperandLifeTime::CONSTANT_COPY,
8937 .location = {.poolIndex = 0, .offset = 0, .length = 4},
8938 },
8939 {
8940 .type = OperandType::INT32,
8941 .dimensions = {},
8942 .numberOfConsumers = 1,
8943 .scale = 0.0f,
8944 .zeroPoint = 0,
8945 .lifetime = OperandLifeTime::CONSTANT_COPY,
8946 .location = {.poolIndex = 0, .offset = 4, .length = 4},
8947 },
8948 {
8949 .type = OperandType::TENSOR_QUANT8_ASYMM,
8950 .dimensions = {0, 0, 0, 0},
8951 .numberOfConsumers = 0,
8952 .scale = 0.25f,
8953 .zeroPoint = 128,
8954 .lifetime = OperandLifeTime::MODEL_OUTPUT,
8955 .location = {.poolIndex = 0, .offset = 0, .length = 0},
8956 }
8957 };
8958
8959 const std::vector<Operation> operations = {
8960 {
8961 .type = OperationType::CHANNEL_SHUFFLE,
8962 .inputs = {0, 1, 2},
8963 .outputs = {3},
8964 }
8965 };
8966
8967 const std::vector<uint32_t> inputIndexes = {0};
8968 const std::vector<uint32_t> outputIndexes = {3};
8969 std::vector<uint8_t> operandValues = {
8970 3, 0, 0, 0, 254, 255, 255, 255
8971 };
8972 const std::vector<hidl_memory> pools = {};
8973
8974 return {
8975 .operands = operands,
8976 .operations = operations,
8977 .inputIndexes = inputIndexes,
8978 .outputIndexes = outputIndexes,
8979 .operandValues = operandValues,
8980 .pools = pools,
8981 };
8982 }
8983
is_ignored_dynamic_output_shape_quant8_dim4_axis2_neg(int i)8984 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis2_neg(int i) {
8985 static std::set<int> ignore = {};
8986 return ignore.find(i) != ignore.end();
8987 }
8988
8989 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis3()8990 Model createTestModel_dynamic_output_shape_quant8_dim4_axis3() {
8991 const std::vector<Operand> operands = {
8992 {
8993 .type = OperandType::TENSOR_QUANT8_ASYMM,
8994 .dimensions = {2, 2, 3, 12},
8995 .numberOfConsumers = 1,
8996 .scale = 0.25f,
8997 .zeroPoint = 128,
8998 .lifetime = OperandLifeTime::MODEL_INPUT,
8999 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9000 },
9001 {
9002 .type = OperandType::INT32,
9003 .dimensions = {},
9004 .numberOfConsumers = 1,
9005 .scale = 0.0f,
9006 .zeroPoint = 0,
9007 .lifetime = OperandLifeTime::CONSTANT_COPY,
9008 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9009 },
9010 {
9011 .type = OperandType::INT32,
9012 .dimensions = {},
9013 .numberOfConsumers = 1,
9014 .scale = 0.0f,
9015 .zeroPoint = 0,
9016 .lifetime = OperandLifeTime::CONSTANT_COPY,
9017 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9018 },
9019 {
9020 .type = OperandType::TENSOR_QUANT8_ASYMM,
9021 .dimensions = {0, 0, 0, 0},
9022 .numberOfConsumers = 0,
9023 .scale = 0.25f,
9024 .zeroPoint = 128,
9025 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9026 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9027 }
9028 };
9029
9030 const std::vector<Operation> operations = {
9031 {
9032 .type = OperationType::CHANNEL_SHUFFLE,
9033 .inputs = {0, 1, 2},
9034 .outputs = {3},
9035 }
9036 };
9037
9038 const std::vector<uint32_t> inputIndexes = {0};
9039 const std::vector<uint32_t> outputIndexes = {3};
9040 std::vector<uint8_t> operandValues = {
9041 3, 0, 0, 0, 3, 0, 0, 0
9042 };
9043 const std::vector<hidl_memory> pools = {};
9044
9045 return {
9046 .operands = operands,
9047 .operations = operations,
9048 .inputIndexes = inputIndexes,
9049 .outputIndexes = outputIndexes,
9050 .operandValues = operandValues,
9051 .pools = pools,
9052 };
9053 }
9054
is_ignored_dynamic_output_shape_quant8_dim4_axis3(int i)9055 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis3(int i) {
9056 static std::set<int> ignore = {};
9057 return ignore.find(i) != ignore.end();
9058 }
9059
9060 // Create the model
createTestModel_dynamic_output_shape_quant8_dim4_axis3_neg()9061 Model createTestModel_dynamic_output_shape_quant8_dim4_axis3_neg() {
9062 const std::vector<Operand> operands = {
9063 {
9064 .type = OperandType::TENSOR_QUANT8_ASYMM,
9065 .dimensions = {2, 2, 3, 12},
9066 .numberOfConsumers = 1,
9067 .scale = 0.25f,
9068 .zeroPoint = 128,
9069 .lifetime = OperandLifeTime::MODEL_INPUT,
9070 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9071 },
9072 {
9073 .type = OperandType::INT32,
9074 .dimensions = {},
9075 .numberOfConsumers = 1,
9076 .scale = 0.0f,
9077 .zeroPoint = 0,
9078 .lifetime = OperandLifeTime::CONSTANT_COPY,
9079 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9080 },
9081 {
9082 .type = OperandType::INT32,
9083 .dimensions = {},
9084 .numberOfConsumers = 1,
9085 .scale = 0.0f,
9086 .zeroPoint = 0,
9087 .lifetime = OperandLifeTime::CONSTANT_COPY,
9088 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9089 },
9090 {
9091 .type = OperandType::TENSOR_QUANT8_ASYMM,
9092 .dimensions = {0, 0, 0, 0},
9093 .numberOfConsumers = 0,
9094 .scale = 0.25f,
9095 .zeroPoint = 128,
9096 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9097 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9098 }
9099 };
9100
9101 const std::vector<Operation> operations = {
9102 {
9103 .type = OperationType::CHANNEL_SHUFFLE,
9104 .inputs = {0, 1, 2},
9105 .outputs = {3},
9106 }
9107 };
9108
9109 const std::vector<uint32_t> inputIndexes = {0};
9110 const std::vector<uint32_t> outputIndexes = {3};
9111 std::vector<uint8_t> operandValues = {
9112 3, 0, 0, 0, 255, 255, 255, 255
9113 };
9114 const std::vector<hidl_memory> pools = {};
9115
9116 return {
9117 .operands = operands,
9118 .operations = operations,
9119 .inputIndexes = inputIndexes,
9120 .outputIndexes = outputIndexes,
9121 .operandValues = operandValues,
9122 .pools = pools,
9123 };
9124 }
9125
is_ignored_dynamic_output_shape_quant8_dim4_axis3_neg(int i)9126 inline bool is_ignored_dynamic_output_shape_quant8_dim4_axis3_neg(int i) {
9127 static std::set<int> ignore = {};
9128 return ignore.find(i) != ignore.end();
9129 }
9130
9131 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis0()9132 Model createTestModel_dynamic_output_shape_quant8_dim3_axis0() {
9133 const std::vector<Operand> operands = {
9134 {
9135 .type = OperandType::TENSOR_QUANT8_ASYMM,
9136 .dimensions = {12, 2, 3},
9137 .numberOfConsumers = 1,
9138 .scale = 0.25f,
9139 .zeroPoint = 128,
9140 .lifetime = OperandLifeTime::MODEL_INPUT,
9141 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9142 },
9143 {
9144 .type = OperandType::INT32,
9145 .dimensions = {},
9146 .numberOfConsumers = 1,
9147 .scale = 0.0f,
9148 .zeroPoint = 0,
9149 .lifetime = OperandLifeTime::CONSTANT_COPY,
9150 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9151 },
9152 {
9153 .type = OperandType::INT32,
9154 .dimensions = {},
9155 .numberOfConsumers = 1,
9156 .scale = 0.0f,
9157 .zeroPoint = 0,
9158 .lifetime = OperandLifeTime::CONSTANT_COPY,
9159 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9160 },
9161 {
9162 .type = OperandType::TENSOR_QUANT8_ASYMM,
9163 .dimensions = {0, 0, 0},
9164 .numberOfConsumers = 0,
9165 .scale = 0.25f,
9166 .zeroPoint = 128,
9167 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9168 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9169 }
9170 };
9171
9172 const std::vector<Operation> operations = {
9173 {
9174 .type = OperationType::CHANNEL_SHUFFLE,
9175 .inputs = {0, 1, 2},
9176 .outputs = {3},
9177 }
9178 };
9179
9180 const std::vector<uint32_t> inputIndexes = {0};
9181 const std::vector<uint32_t> outputIndexes = {3};
9182 std::vector<uint8_t> operandValues = {
9183 3, 0, 0, 0, 0, 0, 0, 0
9184 };
9185 const std::vector<hidl_memory> pools = {};
9186
9187 return {
9188 .operands = operands,
9189 .operations = operations,
9190 .inputIndexes = inputIndexes,
9191 .outputIndexes = outputIndexes,
9192 .operandValues = operandValues,
9193 .pools = pools,
9194 };
9195 }
9196
is_ignored_dynamic_output_shape_quant8_dim3_axis0(int i)9197 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis0(int i) {
9198 static std::set<int> ignore = {};
9199 return ignore.find(i) != ignore.end();
9200 }
9201
9202 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis0_neg()9203 Model createTestModel_dynamic_output_shape_quant8_dim3_axis0_neg() {
9204 const std::vector<Operand> operands = {
9205 {
9206 .type = OperandType::TENSOR_QUANT8_ASYMM,
9207 .dimensions = {12, 2, 3},
9208 .numberOfConsumers = 1,
9209 .scale = 0.25f,
9210 .zeroPoint = 128,
9211 .lifetime = OperandLifeTime::MODEL_INPUT,
9212 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9213 },
9214 {
9215 .type = OperandType::INT32,
9216 .dimensions = {},
9217 .numberOfConsumers = 1,
9218 .scale = 0.0f,
9219 .zeroPoint = 0,
9220 .lifetime = OperandLifeTime::CONSTANT_COPY,
9221 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9222 },
9223 {
9224 .type = OperandType::INT32,
9225 .dimensions = {},
9226 .numberOfConsumers = 1,
9227 .scale = 0.0f,
9228 .zeroPoint = 0,
9229 .lifetime = OperandLifeTime::CONSTANT_COPY,
9230 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9231 },
9232 {
9233 .type = OperandType::TENSOR_QUANT8_ASYMM,
9234 .dimensions = {0, 0, 0},
9235 .numberOfConsumers = 0,
9236 .scale = 0.25f,
9237 .zeroPoint = 128,
9238 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9239 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9240 }
9241 };
9242
9243 const std::vector<Operation> operations = {
9244 {
9245 .type = OperationType::CHANNEL_SHUFFLE,
9246 .inputs = {0, 1, 2},
9247 .outputs = {3},
9248 }
9249 };
9250
9251 const std::vector<uint32_t> inputIndexes = {0};
9252 const std::vector<uint32_t> outputIndexes = {3};
9253 std::vector<uint8_t> operandValues = {
9254 3, 0, 0, 0, 253, 255, 255, 255
9255 };
9256 const std::vector<hidl_memory> pools = {};
9257
9258 return {
9259 .operands = operands,
9260 .operations = operations,
9261 .inputIndexes = inputIndexes,
9262 .outputIndexes = outputIndexes,
9263 .operandValues = operandValues,
9264 .pools = pools,
9265 };
9266 }
9267
is_ignored_dynamic_output_shape_quant8_dim3_axis0_neg(int i)9268 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis0_neg(int i) {
9269 static std::set<int> ignore = {};
9270 return ignore.find(i) != ignore.end();
9271 }
9272
9273 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis1()9274 Model createTestModel_dynamic_output_shape_quant8_dim3_axis1() {
9275 const std::vector<Operand> operands = {
9276 {
9277 .type = OperandType::TENSOR_QUANT8_ASYMM,
9278 .dimensions = {2, 12, 3},
9279 .numberOfConsumers = 1,
9280 .scale = 0.25f,
9281 .zeroPoint = 128,
9282 .lifetime = OperandLifeTime::MODEL_INPUT,
9283 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9284 },
9285 {
9286 .type = OperandType::INT32,
9287 .dimensions = {},
9288 .numberOfConsumers = 1,
9289 .scale = 0.0f,
9290 .zeroPoint = 0,
9291 .lifetime = OperandLifeTime::CONSTANT_COPY,
9292 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9293 },
9294 {
9295 .type = OperandType::INT32,
9296 .dimensions = {},
9297 .numberOfConsumers = 1,
9298 .scale = 0.0f,
9299 .zeroPoint = 0,
9300 .lifetime = OperandLifeTime::CONSTANT_COPY,
9301 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9302 },
9303 {
9304 .type = OperandType::TENSOR_QUANT8_ASYMM,
9305 .dimensions = {0, 0, 0},
9306 .numberOfConsumers = 0,
9307 .scale = 0.25f,
9308 .zeroPoint = 128,
9309 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9310 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9311 }
9312 };
9313
9314 const std::vector<Operation> operations = {
9315 {
9316 .type = OperationType::CHANNEL_SHUFFLE,
9317 .inputs = {0, 1, 2},
9318 .outputs = {3},
9319 }
9320 };
9321
9322 const std::vector<uint32_t> inputIndexes = {0};
9323 const std::vector<uint32_t> outputIndexes = {3};
9324 std::vector<uint8_t> operandValues = {
9325 3, 0, 0, 0, 1, 0, 0, 0
9326 };
9327 const std::vector<hidl_memory> pools = {};
9328
9329 return {
9330 .operands = operands,
9331 .operations = operations,
9332 .inputIndexes = inputIndexes,
9333 .outputIndexes = outputIndexes,
9334 .operandValues = operandValues,
9335 .pools = pools,
9336 };
9337 }
9338
is_ignored_dynamic_output_shape_quant8_dim3_axis1(int i)9339 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis1(int i) {
9340 static std::set<int> ignore = {};
9341 return ignore.find(i) != ignore.end();
9342 }
9343
9344 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis1_neg()9345 Model createTestModel_dynamic_output_shape_quant8_dim3_axis1_neg() {
9346 const std::vector<Operand> operands = {
9347 {
9348 .type = OperandType::TENSOR_QUANT8_ASYMM,
9349 .dimensions = {2, 12, 3},
9350 .numberOfConsumers = 1,
9351 .scale = 0.25f,
9352 .zeroPoint = 128,
9353 .lifetime = OperandLifeTime::MODEL_INPUT,
9354 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9355 },
9356 {
9357 .type = OperandType::INT32,
9358 .dimensions = {},
9359 .numberOfConsumers = 1,
9360 .scale = 0.0f,
9361 .zeroPoint = 0,
9362 .lifetime = OperandLifeTime::CONSTANT_COPY,
9363 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9364 },
9365 {
9366 .type = OperandType::INT32,
9367 .dimensions = {},
9368 .numberOfConsumers = 1,
9369 .scale = 0.0f,
9370 .zeroPoint = 0,
9371 .lifetime = OperandLifeTime::CONSTANT_COPY,
9372 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9373 },
9374 {
9375 .type = OperandType::TENSOR_QUANT8_ASYMM,
9376 .dimensions = {0, 0, 0},
9377 .numberOfConsumers = 0,
9378 .scale = 0.25f,
9379 .zeroPoint = 128,
9380 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9381 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9382 }
9383 };
9384
9385 const std::vector<Operation> operations = {
9386 {
9387 .type = OperationType::CHANNEL_SHUFFLE,
9388 .inputs = {0, 1, 2},
9389 .outputs = {3},
9390 }
9391 };
9392
9393 const std::vector<uint32_t> inputIndexes = {0};
9394 const std::vector<uint32_t> outputIndexes = {3};
9395 std::vector<uint8_t> operandValues = {
9396 3, 0, 0, 0, 254, 255, 255, 255
9397 };
9398 const std::vector<hidl_memory> pools = {};
9399
9400 return {
9401 .operands = operands,
9402 .operations = operations,
9403 .inputIndexes = inputIndexes,
9404 .outputIndexes = outputIndexes,
9405 .operandValues = operandValues,
9406 .pools = pools,
9407 };
9408 }
9409
is_ignored_dynamic_output_shape_quant8_dim3_axis1_neg(int i)9410 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis1_neg(int i) {
9411 static std::set<int> ignore = {};
9412 return ignore.find(i) != ignore.end();
9413 }
9414
9415 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis2()9416 Model createTestModel_dynamic_output_shape_quant8_dim3_axis2() {
9417 const std::vector<Operand> operands = {
9418 {
9419 .type = OperandType::TENSOR_QUANT8_ASYMM,
9420 .dimensions = {2, 3, 12},
9421 .numberOfConsumers = 1,
9422 .scale = 0.25f,
9423 .zeroPoint = 128,
9424 .lifetime = OperandLifeTime::MODEL_INPUT,
9425 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9426 },
9427 {
9428 .type = OperandType::INT32,
9429 .dimensions = {},
9430 .numberOfConsumers = 1,
9431 .scale = 0.0f,
9432 .zeroPoint = 0,
9433 .lifetime = OperandLifeTime::CONSTANT_COPY,
9434 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9435 },
9436 {
9437 .type = OperandType::INT32,
9438 .dimensions = {},
9439 .numberOfConsumers = 1,
9440 .scale = 0.0f,
9441 .zeroPoint = 0,
9442 .lifetime = OperandLifeTime::CONSTANT_COPY,
9443 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9444 },
9445 {
9446 .type = OperandType::TENSOR_QUANT8_ASYMM,
9447 .dimensions = {0, 0, 0},
9448 .numberOfConsumers = 0,
9449 .scale = 0.25f,
9450 .zeroPoint = 128,
9451 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9452 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9453 }
9454 };
9455
9456 const std::vector<Operation> operations = {
9457 {
9458 .type = OperationType::CHANNEL_SHUFFLE,
9459 .inputs = {0, 1, 2},
9460 .outputs = {3},
9461 }
9462 };
9463
9464 const std::vector<uint32_t> inputIndexes = {0};
9465 const std::vector<uint32_t> outputIndexes = {3};
9466 std::vector<uint8_t> operandValues = {
9467 3, 0, 0, 0, 2, 0, 0, 0
9468 };
9469 const std::vector<hidl_memory> pools = {};
9470
9471 return {
9472 .operands = operands,
9473 .operations = operations,
9474 .inputIndexes = inputIndexes,
9475 .outputIndexes = outputIndexes,
9476 .operandValues = operandValues,
9477 .pools = pools,
9478 };
9479 }
9480
is_ignored_dynamic_output_shape_quant8_dim3_axis2(int i)9481 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis2(int i) {
9482 static std::set<int> ignore = {};
9483 return ignore.find(i) != ignore.end();
9484 }
9485
9486 // Create the model
createTestModel_dynamic_output_shape_quant8_dim3_axis2_neg()9487 Model createTestModel_dynamic_output_shape_quant8_dim3_axis2_neg() {
9488 const std::vector<Operand> operands = {
9489 {
9490 .type = OperandType::TENSOR_QUANT8_ASYMM,
9491 .dimensions = {2, 3, 12},
9492 .numberOfConsumers = 1,
9493 .scale = 0.25f,
9494 .zeroPoint = 128,
9495 .lifetime = OperandLifeTime::MODEL_INPUT,
9496 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9497 },
9498 {
9499 .type = OperandType::INT32,
9500 .dimensions = {},
9501 .numberOfConsumers = 1,
9502 .scale = 0.0f,
9503 .zeroPoint = 0,
9504 .lifetime = OperandLifeTime::CONSTANT_COPY,
9505 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9506 },
9507 {
9508 .type = OperandType::INT32,
9509 .dimensions = {},
9510 .numberOfConsumers = 1,
9511 .scale = 0.0f,
9512 .zeroPoint = 0,
9513 .lifetime = OperandLifeTime::CONSTANT_COPY,
9514 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9515 },
9516 {
9517 .type = OperandType::TENSOR_QUANT8_ASYMM,
9518 .dimensions = {0, 0, 0},
9519 .numberOfConsumers = 0,
9520 .scale = 0.25f,
9521 .zeroPoint = 128,
9522 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9523 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9524 }
9525 };
9526
9527 const std::vector<Operation> operations = {
9528 {
9529 .type = OperationType::CHANNEL_SHUFFLE,
9530 .inputs = {0, 1, 2},
9531 .outputs = {3},
9532 }
9533 };
9534
9535 const std::vector<uint32_t> inputIndexes = {0};
9536 const std::vector<uint32_t> outputIndexes = {3};
9537 std::vector<uint8_t> operandValues = {
9538 3, 0, 0, 0, 255, 255, 255, 255
9539 };
9540 const std::vector<hidl_memory> pools = {};
9541
9542 return {
9543 .operands = operands,
9544 .operations = operations,
9545 .inputIndexes = inputIndexes,
9546 .outputIndexes = outputIndexes,
9547 .operandValues = operandValues,
9548 .pools = pools,
9549 };
9550 }
9551
is_ignored_dynamic_output_shape_quant8_dim3_axis2_neg(int i)9552 inline bool is_ignored_dynamic_output_shape_quant8_dim3_axis2_neg(int i) {
9553 static std::set<int> ignore = {};
9554 return ignore.find(i) != ignore.end();
9555 }
9556
9557 // Create the model
createTestModel_dynamic_output_shape_quant8_dim2_axis0()9558 Model createTestModel_dynamic_output_shape_quant8_dim2_axis0() {
9559 const std::vector<Operand> operands = {
9560 {
9561 .type = OperandType::TENSOR_QUANT8_ASYMM,
9562 .dimensions = {12, 3},
9563 .numberOfConsumers = 1,
9564 .scale = 0.25f,
9565 .zeroPoint = 128,
9566 .lifetime = OperandLifeTime::MODEL_INPUT,
9567 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9568 },
9569 {
9570 .type = OperandType::INT32,
9571 .dimensions = {},
9572 .numberOfConsumers = 1,
9573 .scale = 0.0f,
9574 .zeroPoint = 0,
9575 .lifetime = OperandLifeTime::CONSTANT_COPY,
9576 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9577 },
9578 {
9579 .type = OperandType::INT32,
9580 .dimensions = {},
9581 .numberOfConsumers = 1,
9582 .scale = 0.0f,
9583 .zeroPoint = 0,
9584 .lifetime = OperandLifeTime::CONSTANT_COPY,
9585 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9586 },
9587 {
9588 .type = OperandType::TENSOR_QUANT8_ASYMM,
9589 .dimensions = {0, 0},
9590 .numberOfConsumers = 0,
9591 .scale = 0.25f,
9592 .zeroPoint = 128,
9593 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9594 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9595 }
9596 };
9597
9598 const std::vector<Operation> operations = {
9599 {
9600 .type = OperationType::CHANNEL_SHUFFLE,
9601 .inputs = {0, 1, 2},
9602 .outputs = {3},
9603 }
9604 };
9605
9606 const std::vector<uint32_t> inputIndexes = {0};
9607 const std::vector<uint32_t> outputIndexes = {3};
9608 std::vector<uint8_t> operandValues = {
9609 3, 0, 0, 0, 0, 0, 0, 0
9610 };
9611 const std::vector<hidl_memory> pools = {};
9612
9613 return {
9614 .operands = operands,
9615 .operations = operations,
9616 .inputIndexes = inputIndexes,
9617 .outputIndexes = outputIndexes,
9618 .operandValues = operandValues,
9619 .pools = pools,
9620 };
9621 }
9622
is_ignored_dynamic_output_shape_quant8_dim2_axis0(int i)9623 inline bool is_ignored_dynamic_output_shape_quant8_dim2_axis0(int i) {
9624 static std::set<int> ignore = {};
9625 return ignore.find(i) != ignore.end();
9626 }
9627
9628 // Create the model
createTestModel_dynamic_output_shape_quant8_dim2_axis0_neg()9629 Model createTestModel_dynamic_output_shape_quant8_dim2_axis0_neg() {
9630 const std::vector<Operand> operands = {
9631 {
9632 .type = OperandType::TENSOR_QUANT8_ASYMM,
9633 .dimensions = {12, 3},
9634 .numberOfConsumers = 1,
9635 .scale = 0.25f,
9636 .zeroPoint = 128,
9637 .lifetime = OperandLifeTime::MODEL_INPUT,
9638 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9639 },
9640 {
9641 .type = OperandType::INT32,
9642 .dimensions = {},
9643 .numberOfConsumers = 1,
9644 .scale = 0.0f,
9645 .zeroPoint = 0,
9646 .lifetime = OperandLifeTime::CONSTANT_COPY,
9647 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9648 },
9649 {
9650 .type = OperandType::INT32,
9651 .dimensions = {},
9652 .numberOfConsumers = 1,
9653 .scale = 0.0f,
9654 .zeroPoint = 0,
9655 .lifetime = OperandLifeTime::CONSTANT_COPY,
9656 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9657 },
9658 {
9659 .type = OperandType::TENSOR_QUANT8_ASYMM,
9660 .dimensions = {0, 0},
9661 .numberOfConsumers = 0,
9662 .scale = 0.25f,
9663 .zeroPoint = 128,
9664 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9665 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9666 }
9667 };
9668
9669 const std::vector<Operation> operations = {
9670 {
9671 .type = OperationType::CHANNEL_SHUFFLE,
9672 .inputs = {0, 1, 2},
9673 .outputs = {3},
9674 }
9675 };
9676
9677 const std::vector<uint32_t> inputIndexes = {0};
9678 const std::vector<uint32_t> outputIndexes = {3};
9679 std::vector<uint8_t> operandValues = {
9680 3, 0, 0, 0, 254, 255, 255, 255
9681 };
9682 const std::vector<hidl_memory> pools = {};
9683
9684 return {
9685 .operands = operands,
9686 .operations = operations,
9687 .inputIndexes = inputIndexes,
9688 .outputIndexes = outputIndexes,
9689 .operandValues = operandValues,
9690 .pools = pools,
9691 };
9692 }
9693
is_ignored_dynamic_output_shape_quant8_dim2_axis0_neg(int i)9694 inline bool is_ignored_dynamic_output_shape_quant8_dim2_axis0_neg(int i) {
9695 static std::set<int> ignore = {};
9696 return ignore.find(i) != ignore.end();
9697 }
9698
9699 // Create the model
createTestModel_dynamic_output_shape_quant8_dim2_axis1()9700 Model createTestModel_dynamic_output_shape_quant8_dim2_axis1() {
9701 const std::vector<Operand> operands = {
9702 {
9703 .type = OperandType::TENSOR_QUANT8_ASYMM,
9704 .dimensions = {3, 12},
9705 .numberOfConsumers = 1,
9706 .scale = 0.25f,
9707 .zeroPoint = 128,
9708 .lifetime = OperandLifeTime::MODEL_INPUT,
9709 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9710 },
9711 {
9712 .type = OperandType::INT32,
9713 .dimensions = {},
9714 .numberOfConsumers = 1,
9715 .scale = 0.0f,
9716 .zeroPoint = 0,
9717 .lifetime = OperandLifeTime::CONSTANT_COPY,
9718 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9719 },
9720 {
9721 .type = OperandType::INT32,
9722 .dimensions = {},
9723 .numberOfConsumers = 1,
9724 .scale = 0.0f,
9725 .zeroPoint = 0,
9726 .lifetime = OperandLifeTime::CONSTANT_COPY,
9727 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9728 },
9729 {
9730 .type = OperandType::TENSOR_QUANT8_ASYMM,
9731 .dimensions = {0, 0},
9732 .numberOfConsumers = 0,
9733 .scale = 0.25f,
9734 .zeroPoint = 128,
9735 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9736 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9737 }
9738 };
9739
9740 const std::vector<Operation> operations = {
9741 {
9742 .type = OperationType::CHANNEL_SHUFFLE,
9743 .inputs = {0, 1, 2},
9744 .outputs = {3},
9745 }
9746 };
9747
9748 const std::vector<uint32_t> inputIndexes = {0};
9749 const std::vector<uint32_t> outputIndexes = {3};
9750 std::vector<uint8_t> operandValues = {
9751 3, 0, 0, 0, 1, 0, 0, 0
9752 };
9753 const std::vector<hidl_memory> pools = {};
9754
9755 return {
9756 .operands = operands,
9757 .operations = operations,
9758 .inputIndexes = inputIndexes,
9759 .outputIndexes = outputIndexes,
9760 .operandValues = operandValues,
9761 .pools = pools,
9762 };
9763 }
9764
is_ignored_dynamic_output_shape_quant8_dim2_axis1(int i)9765 inline bool is_ignored_dynamic_output_shape_quant8_dim2_axis1(int i) {
9766 static std::set<int> ignore = {};
9767 return ignore.find(i) != ignore.end();
9768 }
9769
9770 // Create the model
createTestModel_dynamic_output_shape_quant8_dim2_axis1_neg()9771 Model createTestModel_dynamic_output_shape_quant8_dim2_axis1_neg() {
9772 const std::vector<Operand> operands = {
9773 {
9774 .type = OperandType::TENSOR_QUANT8_ASYMM,
9775 .dimensions = {3, 12},
9776 .numberOfConsumers = 1,
9777 .scale = 0.25f,
9778 .zeroPoint = 128,
9779 .lifetime = OperandLifeTime::MODEL_INPUT,
9780 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9781 },
9782 {
9783 .type = OperandType::INT32,
9784 .dimensions = {},
9785 .numberOfConsumers = 1,
9786 .scale = 0.0f,
9787 .zeroPoint = 0,
9788 .lifetime = OperandLifeTime::CONSTANT_COPY,
9789 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9790 },
9791 {
9792 .type = OperandType::INT32,
9793 .dimensions = {},
9794 .numberOfConsumers = 1,
9795 .scale = 0.0f,
9796 .zeroPoint = 0,
9797 .lifetime = OperandLifeTime::CONSTANT_COPY,
9798 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9799 },
9800 {
9801 .type = OperandType::TENSOR_QUANT8_ASYMM,
9802 .dimensions = {0, 0},
9803 .numberOfConsumers = 0,
9804 .scale = 0.25f,
9805 .zeroPoint = 128,
9806 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9807 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9808 }
9809 };
9810
9811 const std::vector<Operation> operations = {
9812 {
9813 .type = OperationType::CHANNEL_SHUFFLE,
9814 .inputs = {0, 1, 2},
9815 .outputs = {3},
9816 }
9817 };
9818
9819 const std::vector<uint32_t> inputIndexes = {0};
9820 const std::vector<uint32_t> outputIndexes = {3};
9821 std::vector<uint8_t> operandValues = {
9822 3, 0, 0, 0, 255, 255, 255, 255
9823 };
9824 const std::vector<hidl_memory> pools = {};
9825
9826 return {
9827 .operands = operands,
9828 .operations = operations,
9829 .inputIndexes = inputIndexes,
9830 .outputIndexes = outputIndexes,
9831 .operandValues = operandValues,
9832 .pools = pools,
9833 };
9834 }
9835
is_ignored_dynamic_output_shape_quant8_dim2_axis1_neg(int i)9836 inline bool is_ignored_dynamic_output_shape_quant8_dim2_axis1_neg(int i) {
9837 static std::set<int> ignore = {};
9838 return ignore.find(i) != ignore.end();
9839 }
9840
9841 // Create the model
createTestModel_dynamic_output_shape_quant8_dim1_axis0()9842 Model createTestModel_dynamic_output_shape_quant8_dim1_axis0() {
9843 const std::vector<Operand> operands = {
9844 {
9845 .type = OperandType::TENSOR_QUANT8_ASYMM,
9846 .dimensions = {12},
9847 .numberOfConsumers = 1,
9848 .scale = 0.25f,
9849 .zeroPoint = 128,
9850 .lifetime = OperandLifeTime::MODEL_INPUT,
9851 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9852 },
9853 {
9854 .type = OperandType::INT32,
9855 .dimensions = {},
9856 .numberOfConsumers = 1,
9857 .scale = 0.0f,
9858 .zeroPoint = 0,
9859 .lifetime = OperandLifeTime::CONSTANT_COPY,
9860 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9861 },
9862 {
9863 .type = OperandType::INT32,
9864 .dimensions = {},
9865 .numberOfConsumers = 1,
9866 .scale = 0.0f,
9867 .zeroPoint = 0,
9868 .lifetime = OperandLifeTime::CONSTANT_COPY,
9869 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9870 },
9871 {
9872 .type = OperandType::TENSOR_QUANT8_ASYMM,
9873 .dimensions = {0},
9874 .numberOfConsumers = 0,
9875 .scale = 0.25f,
9876 .zeroPoint = 128,
9877 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9878 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9879 }
9880 };
9881
9882 const std::vector<Operation> operations = {
9883 {
9884 .type = OperationType::CHANNEL_SHUFFLE,
9885 .inputs = {0, 1, 2},
9886 .outputs = {3},
9887 }
9888 };
9889
9890 const std::vector<uint32_t> inputIndexes = {0};
9891 const std::vector<uint32_t> outputIndexes = {3};
9892 std::vector<uint8_t> operandValues = {
9893 3, 0, 0, 0, 0, 0, 0, 0
9894 };
9895 const std::vector<hidl_memory> pools = {};
9896
9897 return {
9898 .operands = operands,
9899 .operations = operations,
9900 .inputIndexes = inputIndexes,
9901 .outputIndexes = outputIndexes,
9902 .operandValues = operandValues,
9903 .pools = pools,
9904 };
9905 }
9906
is_ignored_dynamic_output_shape_quant8_dim1_axis0(int i)9907 inline bool is_ignored_dynamic_output_shape_quant8_dim1_axis0(int i) {
9908 static std::set<int> ignore = {};
9909 return ignore.find(i) != ignore.end();
9910 }
9911
9912 // Create the model
createTestModel_dynamic_output_shape_quant8_dim1_axis0_neg()9913 Model createTestModel_dynamic_output_shape_quant8_dim1_axis0_neg() {
9914 const std::vector<Operand> operands = {
9915 {
9916 .type = OperandType::TENSOR_QUANT8_ASYMM,
9917 .dimensions = {12},
9918 .numberOfConsumers = 1,
9919 .scale = 0.25f,
9920 .zeroPoint = 128,
9921 .lifetime = OperandLifeTime::MODEL_INPUT,
9922 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9923 },
9924 {
9925 .type = OperandType::INT32,
9926 .dimensions = {},
9927 .numberOfConsumers = 1,
9928 .scale = 0.0f,
9929 .zeroPoint = 0,
9930 .lifetime = OperandLifeTime::CONSTANT_COPY,
9931 .location = {.poolIndex = 0, .offset = 0, .length = 4},
9932 },
9933 {
9934 .type = OperandType::INT32,
9935 .dimensions = {},
9936 .numberOfConsumers = 1,
9937 .scale = 0.0f,
9938 .zeroPoint = 0,
9939 .lifetime = OperandLifeTime::CONSTANT_COPY,
9940 .location = {.poolIndex = 0, .offset = 4, .length = 4},
9941 },
9942 {
9943 .type = OperandType::TENSOR_QUANT8_ASYMM,
9944 .dimensions = {0},
9945 .numberOfConsumers = 0,
9946 .scale = 0.25f,
9947 .zeroPoint = 128,
9948 .lifetime = OperandLifeTime::MODEL_OUTPUT,
9949 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9950 }
9951 };
9952
9953 const std::vector<Operation> operations = {
9954 {
9955 .type = OperationType::CHANNEL_SHUFFLE,
9956 .inputs = {0, 1, 2},
9957 .outputs = {3},
9958 }
9959 };
9960
9961 const std::vector<uint32_t> inputIndexes = {0};
9962 const std::vector<uint32_t> outputIndexes = {3};
9963 std::vector<uint8_t> operandValues = {
9964 3, 0, 0, 0, 255, 255, 255, 255
9965 };
9966 const std::vector<hidl_memory> pools = {};
9967
9968 return {
9969 .operands = operands,
9970 .operations = operations,
9971 .inputIndexes = inputIndexes,
9972 .outputIndexes = outputIndexes,
9973 .operandValues = operandValues,
9974 .pools = pools,
9975 };
9976 }
9977
is_ignored_dynamic_output_shape_quant8_dim1_axis0_neg(int i)9978 inline bool is_ignored_dynamic_output_shape_quant8_dim1_axis0_neg(int i) {
9979 static std::set<int> ignore = {};
9980 return ignore.find(i) != ignore.end();
9981 }
9982
9983 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis0()9984 Model createTestModel_dynamic_output_shape_float16_dim4_axis0() {
9985 const std::vector<Operand> operands = {
9986 {
9987 .type = OperandType::TENSOR_FLOAT16,
9988 .dimensions = {12, 2, 2, 3},
9989 .numberOfConsumers = 1,
9990 .scale = 0.0f,
9991 .zeroPoint = 0,
9992 .lifetime = OperandLifeTime::MODEL_INPUT,
9993 .location = {.poolIndex = 0, .offset = 0, .length = 0},
9994 },
9995 {
9996 .type = OperandType::INT32,
9997 .dimensions = {},
9998 .numberOfConsumers = 1,
9999 .scale = 0.0f,
10000 .zeroPoint = 0,
10001 .lifetime = OperandLifeTime::CONSTANT_COPY,
10002 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10003 },
10004 {
10005 .type = OperandType::INT32,
10006 .dimensions = {},
10007 .numberOfConsumers = 1,
10008 .scale = 0.0f,
10009 .zeroPoint = 0,
10010 .lifetime = OperandLifeTime::CONSTANT_COPY,
10011 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10012 },
10013 {
10014 .type = OperandType::TENSOR_FLOAT16,
10015 .dimensions = {0, 0, 0, 0},
10016 .numberOfConsumers = 0,
10017 .scale = 0.0f,
10018 .zeroPoint = 0,
10019 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10020 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10021 }
10022 };
10023
10024 const std::vector<Operation> operations = {
10025 {
10026 .type = OperationType::CHANNEL_SHUFFLE,
10027 .inputs = {0, 1, 2},
10028 .outputs = {3},
10029 }
10030 };
10031
10032 const std::vector<uint32_t> inputIndexes = {0};
10033 const std::vector<uint32_t> outputIndexes = {3};
10034 std::vector<uint8_t> operandValues = {
10035 3, 0, 0, 0, 0, 0, 0, 0
10036 };
10037 const std::vector<hidl_memory> pools = {};
10038
10039 return {
10040 .operands = operands,
10041 .operations = operations,
10042 .inputIndexes = inputIndexes,
10043 .outputIndexes = outputIndexes,
10044 .operandValues = operandValues,
10045 .pools = pools,
10046 };
10047 }
10048
is_ignored_dynamic_output_shape_float16_dim4_axis0(int i)10049 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis0(int i) {
10050 static std::set<int> ignore = {};
10051 return ignore.find(i) != ignore.end();
10052 }
10053
10054 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis0_neg()10055 Model createTestModel_dynamic_output_shape_float16_dim4_axis0_neg() {
10056 const std::vector<Operand> operands = {
10057 {
10058 .type = OperandType::TENSOR_FLOAT16,
10059 .dimensions = {12, 2, 2, 3},
10060 .numberOfConsumers = 1,
10061 .scale = 0.0f,
10062 .zeroPoint = 0,
10063 .lifetime = OperandLifeTime::MODEL_INPUT,
10064 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10065 },
10066 {
10067 .type = OperandType::INT32,
10068 .dimensions = {},
10069 .numberOfConsumers = 1,
10070 .scale = 0.0f,
10071 .zeroPoint = 0,
10072 .lifetime = OperandLifeTime::CONSTANT_COPY,
10073 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10074 },
10075 {
10076 .type = OperandType::INT32,
10077 .dimensions = {},
10078 .numberOfConsumers = 1,
10079 .scale = 0.0f,
10080 .zeroPoint = 0,
10081 .lifetime = OperandLifeTime::CONSTANT_COPY,
10082 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10083 },
10084 {
10085 .type = OperandType::TENSOR_FLOAT16,
10086 .dimensions = {0, 0, 0, 0},
10087 .numberOfConsumers = 0,
10088 .scale = 0.0f,
10089 .zeroPoint = 0,
10090 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10091 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10092 }
10093 };
10094
10095 const std::vector<Operation> operations = {
10096 {
10097 .type = OperationType::CHANNEL_SHUFFLE,
10098 .inputs = {0, 1, 2},
10099 .outputs = {3},
10100 }
10101 };
10102
10103 const std::vector<uint32_t> inputIndexes = {0};
10104 const std::vector<uint32_t> outputIndexes = {3};
10105 std::vector<uint8_t> operandValues = {
10106 3, 0, 0, 0, 252, 255, 255, 255
10107 };
10108 const std::vector<hidl_memory> pools = {};
10109
10110 return {
10111 .operands = operands,
10112 .operations = operations,
10113 .inputIndexes = inputIndexes,
10114 .outputIndexes = outputIndexes,
10115 .operandValues = operandValues,
10116 .pools = pools,
10117 };
10118 }
10119
is_ignored_dynamic_output_shape_float16_dim4_axis0_neg(int i)10120 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis0_neg(int i) {
10121 static std::set<int> ignore = {};
10122 return ignore.find(i) != ignore.end();
10123 }
10124
10125 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis1()10126 Model createTestModel_dynamic_output_shape_float16_dim4_axis1() {
10127 const std::vector<Operand> operands = {
10128 {
10129 .type = OperandType::TENSOR_FLOAT16,
10130 .dimensions = {2, 12, 2, 3},
10131 .numberOfConsumers = 1,
10132 .scale = 0.0f,
10133 .zeroPoint = 0,
10134 .lifetime = OperandLifeTime::MODEL_INPUT,
10135 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10136 },
10137 {
10138 .type = OperandType::INT32,
10139 .dimensions = {},
10140 .numberOfConsumers = 1,
10141 .scale = 0.0f,
10142 .zeroPoint = 0,
10143 .lifetime = OperandLifeTime::CONSTANT_COPY,
10144 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10145 },
10146 {
10147 .type = OperandType::INT32,
10148 .dimensions = {},
10149 .numberOfConsumers = 1,
10150 .scale = 0.0f,
10151 .zeroPoint = 0,
10152 .lifetime = OperandLifeTime::CONSTANT_COPY,
10153 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10154 },
10155 {
10156 .type = OperandType::TENSOR_FLOAT16,
10157 .dimensions = {0, 0, 0, 0},
10158 .numberOfConsumers = 0,
10159 .scale = 0.0f,
10160 .zeroPoint = 0,
10161 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10162 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10163 }
10164 };
10165
10166 const std::vector<Operation> operations = {
10167 {
10168 .type = OperationType::CHANNEL_SHUFFLE,
10169 .inputs = {0, 1, 2},
10170 .outputs = {3},
10171 }
10172 };
10173
10174 const std::vector<uint32_t> inputIndexes = {0};
10175 const std::vector<uint32_t> outputIndexes = {3};
10176 std::vector<uint8_t> operandValues = {
10177 3, 0, 0, 0, 1, 0, 0, 0
10178 };
10179 const std::vector<hidl_memory> pools = {};
10180
10181 return {
10182 .operands = operands,
10183 .operations = operations,
10184 .inputIndexes = inputIndexes,
10185 .outputIndexes = outputIndexes,
10186 .operandValues = operandValues,
10187 .pools = pools,
10188 };
10189 }
10190
is_ignored_dynamic_output_shape_float16_dim4_axis1(int i)10191 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis1(int i) {
10192 static std::set<int> ignore = {};
10193 return ignore.find(i) != ignore.end();
10194 }
10195
10196 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis1_neg()10197 Model createTestModel_dynamic_output_shape_float16_dim4_axis1_neg() {
10198 const std::vector<Operand> operands = {
10199 {
10200 .type = OperandType::TENSOR_FLOAT16,
10201 .dimensions = {2, 12, 2, 3},
10202 .numberOfConsumers = 1,
10203 .scale = 0.0f,
10204 .zeroPoint = 0,
10205 .lifetime = OperandLifeTime::MODEL_INPUT,
10206 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10207 },
10208 {
10209 .type = OperandType::INT32,
10210 .dimensions = {},
10211 .numberOfConsumers = 1,
10212 .scale = 0.0f,
10213 .zeroPoint = 0,
10214 .lifetime = OperandLifeTime::CONSTANT_COPY,
10215 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10216 },
10217 {
10218 .type = OperandType::INT32,
10219 .dimensions = {},
10220 .numberOfConsumers = 1,
10221 .scale = 0.0f,
10222 .zeroPoint = 0,
10223 .lifetime = OperandLifeTime::CONSTANT_COPY,
10224 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10225 },
10226 {
10227 .type = OperandType::TENSOR_FLOAT16,
10228 .dimensions = {0, 0, 0, 0},
10229 .numberOfConsumers = 0,
10230 .scale = 0.0f,
10231 .zeroPoint = 0,
10232 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10233 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10234 }
10235 };
10236
10237 const std::vector<Operation> operations = {
10238 {
10239 .type = OperationType::CHANNEL_SHUFFLE,
10240 .inputs = {0, 1, 2},
10241 .outputs = {3},
10242 }
10243 };
10244
10245 const std::vector<uint32_t> inputIndexes = {0};
10246 const std::vector<uint32_t> outputIndexes = {3};
10247 std::vector<uint8_t> operandValues = {
10248 3, 0, 0, 0, 253, 255, 255, 255
10249 };
10250 const std::vector<hidl_memory> pools = {};
10251
10252 return {
10253 .operands = operands,
10254 .operations = operations,
10255 .inputIndexes = inputIndexes,
10256 .outputIndexes = outputIndexes,
10257 .operandValues = operandValues,
10258 .pools = pools,
10259 };
10260 }
10261
is_ignored_dynamic_output_shape_float16_dim4_axis1_neg(int i)10262 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis1_neg(int i) {
10263 static std::set<int> ignore = {};
10264 return ignore.find(i) != ignore.end();
10265 }
10266
10267 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis2()10268 Model createTestModel_dynamic_output_shape_float16_dim4_axis2() {
10269 const std::vector<Operand> operands = {
10270 {
10271 .type = OperandType::TENSOR_FLOAT16,
10272 .dimensions = {2, 2, 12, 3},
10273 .numberOfConsumers = 1,
10274 .scale = 0.0f,
10275 .zeroPoint = 0,
10276 .lifetime = OperandLifeTime::MODEL_INPUT,
10277 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10278 },
10279 {
10280 .type = OperandType::INT32,
10281 .dimensions = {},
10282 .numberOfConsumers = 1,
10283 .scale = 0.0f,
10284 .zeroPoint = 0,
10285 .lifetime = OperandLifeTime::CONSTANT_COPY,
10286 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10287 },
10288 {
10289 .type = OperandType::INT32,
10290 .dimensions = {},
10291 .numberOfConsumers = 1,
10292 .scale = 0.0f,
10293 .zeroPoint = 0,
10294 .lifetime = OperandLifeTime::CONSTANT_COPY,
10295 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10296 },
10297 {
10298 .type = OperandType::TENSOR_FLOAT16,
10299 .dimensions = {0, 0, 0, 0},
10300 .numberOfConsumers = 0,
10301 .scale = 0.0f,
10302 .zeroPoint = 0,
10303 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10304 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10305 }
10306 };
10307
10308 const std::vector<Operation> operations = {
10309 {
10310 .type = OperationType::CHANNEL_SHUFFLE,
10311 .inputs = {0, 1, 2},
10312 .outputs = {3},
10313 }
10314 };
10315
10316 const std::vector<uint32_t> inputIndexes = {0};
10317 const std::vector<uint32_t> outputIndexes = {3};
10318 std::vector<uint8_t> operandValues = {
10319 3, 0, 0, 0, 2, 0, 0, 0
10320 };
10321 const std::vector<hidl_memory> pools = {};
10322
10323 return {
10324 .operands = operands,
10325 .operations = operations,
10326 .inputIndexes = inputIndexes,
10327 .outputIndexes = outputIndexes,
10328 .operandValues = operandValues,
10329 .pools = pools,
10330 };
10331 }
10332
is_ignored_dynamic_output_shape_float16_dim4_axis2(int i)10333 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis2(int i) {
10334 static std::set<int> ignore = {};
10335 return ignore.find(i) != ignore.end();
10336 }
10337
10338 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis2_neg()10339 Model createTestModel_dynamic_output_shape_float16_dim4_axis2_neg() {
10340 const std::vector<Operand> operands = {
10341 {
10342 .type = OperandType::TENSOR_FLOAT16,
10343 .dimensions = {2, 2, 12, 3},
10344 .numberOfConsumers = 1,
10345 .scale = 0.0f,
10346 .zeroPoint = 0,
10347 .lifetime = OperandLifeTime::MODEL_INPUT,
10348 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10349 },
10350 {
10351 .type = OperandType::INT32,
10352 .dimensions = {},
10353 .numberOfConsumers = 1,
10354 .scale = 0.0f,
10355 .zeroPoint = 0,
10356 .lifetime = OperandLifeTime::CONSTANT_COPY,
10357 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10358 },
10359 {
10360 .type = OperandType::INT32,
10361 .dimensions = {},
10362 .numberOfConsumers = 1,
10363 .scale = 0.0f,
10364 .zeroPoint = 0,
10365 .lifetime = OperandLifeTime::CONSTANT_COPY,
10366 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10367 },
10368 {
10369 .type = OperandType::TENSOR_FLOAT16,
10370 .dimensions = {0, 0, 0, 0},
10371 .numberOfConsumers = 0,
10372 .scale = 0.0f,
10373 .zeroPoint = 0,
10374 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10375 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10376 }
10377 };
10378
10379 const std::vector<Operation> operations = {
10380 {
10381 .type = OperationType::CHANNEL_SHUFFLE,
10382 .inputs = {0, 1, 2},
10383 .outputs = {3},
10384 }
10385 };
10386
10387 const std::vector<uint32_t> inputIndexes = {0};
10388 const std::vector<uint32_t> outputIndexes = {3};
10389 std::vector<uint8_t> operandValues = {
10390 3, 0, 0, 0, 254, 255, 255, 255
10391 };
10392 const std::vector<hidl_memory> pools = {};
10393
10394 return {
10395 .operands = operands,
10396 .operations = operations,
10397 .inputIndexes = inputIndexes,
10398 .outputIndexes = outputIndexes,
10399 .operandValues = operandValues,
10400 .pools = pools,
10401 };
10402 }
10403
is_ignored_dynamic_output_shape_float16_dim4_axis2_neg(int i)10404 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis2_neg(int i) {
10405 static std::set<int> ignore = {};
10406 return ignore.find(i) != ignore.end();
10407 }
10408
10409 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis3()10410 Model createTestModel_dynamic_output_shape_float16_dim4_axis3() {
10411 const std::vector<Operand> operands = {
10412 {
10413 .type = OperandType::TENSOR_FLOAT16,
10414 .dimensions = {2, 2, 3, 12},
10415 .numberOfConsumers = 1,
10416 .scale = 0.0f,
10417 .zeroPoint = 0,
10418 .lifetime = OperandLifeTime::MODEL_INPUT,
10419 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10420 },
10421 {
10422 .type = OperandType::INT32,
10423 .dimensions = {},
10424 .numberOfConsumers = 1,
10425 .scale = 0.0f,
10426 .zeroPoint = 0,
10427 .lifetime = OperandLifeTime::CONSTANT_COPY,
10428 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10429 },
10430 {
10431 .type = OperandType::INT32,
10432 .dimensions = {},
10433 .numberOfConsumers = 1,
10434 .scale = 0.0f,
10435 .zeroPoint = 0,
10436 .lifetime = OperandLifeTime::CONSTANT_COPY,
10437 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10438 },
10439 {
10440 .type = OperandType::TENSOR_FLOAT16,
10441 .dimensions = {0, 0, 0, 0},
10442 .numberOfConsumers = 0,
10443 .scale = 0.0f,
10444 .zeroPoint = 0,
10445 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10446 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10447 }
10448 };
10449
10450 const std::vector<Operation> operations = {
10451 {
10452 .type = OperationType::CHANNEL_SHUFFLE,
10453 .inputs = {0, 1, 2},
10454 .outputs = {3},
10455 }
10456 };
10457
10458 const std::vector<uint32_t> inputIndexes = {0};
10459 const std::vector<uint32_t> outputIndexes = {3};
10460 std::vector<uint8_t> operandValues = {
10461 3, 0, 0, 0, 3, 0, 0, 0
10462 };
10463 const std::vector<hidl_memory> pools = {};
10464
10465 return {
10466 .operands = operands,
10467 .operations = operations,
10468 .inputIndexes = inputIndexes,
10469 .outputIndexes = outputIndexes,
10470 .operandValues = operandValues,
10471 .pools = pools,
10472 };
10473 }
10474
is_ignored_dynamic_output_shape_float16_dim4_axis3(int i)10475 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis3(int i) {
10476 static std::set<int> ignore = {};
10477 return ignore.find(i) != ignore.end();
10478 }
10479
10480 // Create the model
createTestModel_dynamic_output_shape_float16_dim4_axis3_neg()10481 Model createTestModel_dynamic_output_shape_float16_dim4_axis3_neg() {
10482 const std::vector<Operand> operands = {
10483 {
10484 .type = OperandType::TENSOR_FLOAT16,
10485 .dimensions = {2, 2, 3, 12},
10486 .numberOfConsumers = 1,
10487 .scale = 0.0f,
10488 .zeroPoint = 0,
10489 .lifetime = OperandLifeTime::MODEL_INPUT,
10490 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10491 },
10492 {
10493 .type = OperandType::INT32,
10494 .dimensions = {},
10495 .numberOfConsumers = 1,
10496 .scale = 0.0f,
10497 .zeroPoint = 0,
10498 .lifetime = OperandLifeTime::CONSTANT_COPY,
10499 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10500 },
10501 {
10502 .type = OperandType::INT32,
10503 .dimensions = {},
10504 .numberOfConsumers = 1,
10505 .scale = 0.0f,
10506 .zeroPoint = 0,
10507 .lifetime = OperandLifeTime::CONSTANT_COPY,
10508 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10509 },
10510 {
10511 .type = OperandType::TENSOR_FLOAT16,
10512 .dimensions = {0, 0, 0, 0},
10513 .numberOfConsumers = 0,
10514 .scale = 0.0f,
10515 .zeroPoint = 0,
10516 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10517 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10518 }
10519 };
10520
10521 const std::vector<Operation> operations = {
10522 {
10523 .type = OperationType::CHANNEL_SHUFFLE,
10524 .inputs = {0, 1, 2},
10525 .outputs = {3},
10526 }
10527 };
10528
10529 const std::vector<uint32_t> inputIndexes = {0};
10530 const std::vector<uint32_t> outputIndexes = {3};
10531 std::vector<uint8_t> operandValues = {
10532 3, 0, 0, 0, 255, 255, 255, 255
10533 };
10534 const std::vector<hidl_memory> pools = {};
10535
10536 return {
10537 .operands = operands,
10538 .operations = operations,
10539 .inputIndexes = inputIndexes,
10540 .outputIndexes = outputIndexes,
10541 .operandValues = operandValues,
10542 .pools = pools,
10543 };
10544 }
10545
is_ignored_dynamic_output_shape_float16_dim4_axis3_neg(int i)10546 inline bool is_ignored_dynamic_output_shape_float16_dim4_axis3_neg(int i) {
10547 static std::set<int> ignore = {};
10548 return ignore.find(i) != ignore.end();
10549 }
10550
10551 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis0()10552 Model createTestModel_dynamic_output_shape_float16_dim3_axis0() {
10553 const std::vector<Operand> operands = {
10554 {
10555 .type = OperandType::TENSOR_FLOAT16,
10556 .dimensions = {12, 2, 3},
10557 .numberOfConsumers = 1,
10558 .scale = 0.0f,
10559 .zeroPoint = 0,
10560 .lifetime = OperandLifeTime::MODEL_INPUT,
10561 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10562 },
10563 {
10564 .type = OperandType::INT32,
10565 .dimensions = {},
10566 .numberOfConsumers = 1,
10567 .scale = 0.0f,
10568 .zeroPoint = 0,
10569 .lifetime = OperandLifeTime::CONSTANT_COPY,
10570 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10571 },
10572 {
10573 .type = OperandType::INT32,
10574 .dimensions = {},
10575 .numberOfConsumers = 1,
10576 .scale = 0.0f,
10577 .zeroPoint = 0,
10578 .lifetime = OperandLifeTime::CONSTANT_COPY,
10579 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10580 },
10581 {
10582 .type = OperandType::TENSOR_FLOAT16,
10583 .dimensions = {0, 0, 0},
10584 .numberOfConsumers = 0,
10585 .scale = 0.0f,
10586 .zeroPoint = 0,
10587 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10588 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10589 }
10590 };
10591
10592 const std::vector<Operation> operations = {
10593 {
10594 .type = OperationType::CHANNEL_SHUFFLE,
10595 .inputs = {0, 1, 2},
10596 .outputs = {3},
10597 }
10598 };
10599
10600 const std::vector<uint32_t> inputIndexes = {0};
10601 const std::vector<uint32_t> outputIndexes = {3};
10602 std::vector<uint8_t> operandValues = {
10603 3, 0, 0, 0, 0, 0, 0, 0
10604 };
10605 const std::vector<hidl_memory> pools = {};
10606
10607 return {
10608 .operands = operands,
10609 .operations = operations,
10610 .inputIndexes = inputIndexes,
10611 .outputIndexes = outputIndexes,
10612 .operandValues = operandValues,
10613 .pools = pools,
10614 };
10615 }
10616
is_ignored_dynamic_output_shape_float16_dim3_axis0(int i)10617 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis0(int i) {
10618 static std::set<int> ignore = {};
10619 return ignore.find(i) != ignore.end();
10620 }
10621
10622 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis0_neg()10623 Model createTestModel_dynamic_output_shape_float16_dim3_axis0_neg() {
10624 const std::vector<Operand> operands = {
10625 {
10626 .type = OperandType::TENSOR_FLOAT16,
10627 .dimensions = {12, 2, 3},
10628 .numberOfConsumers = 1,
10629 .scale = 0.0f,
10630 .zeroPoint = 0,
10631 .lifetime = OperandLifeTime::MODEL_INPUT,
10632 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10633 },
10634 {
10635 .type = OperandType::INT32,
10636 .dimensions = {},
10637 .numberOfConsumers = 1,
10638 .scale = 0.0f,
10639 .zeroPoint = 0,
10640 .lifetime = OperandLifeTime::CONSTANT_COPY,
10641 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10642 },
10643 {
10644 .type = OperandType::INT32,
10645 .dimensions = {},
10646 .numberOfConsumers = 1,
10647 .scale = 0.0f,
10648 .zeroPoint = 0,
10649 .lifetime = OperandLifeTime::CONSTANT_COPY,
10650 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10651 },
10652 {
10653 .type = OperandType::TENSOR_FLOAT16,
10654 .dimensions = {0, 0, 0},
10655 .numberOfConsumers = 0,
10656 .scale = 0.0f,
10657 .zeroPoint = 0,
10658 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10659 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10660 }
10661 };
10662
10663 const std::vector<Operation> operations = {
10664 {
10665 .type = OperationType::CHANNEL_SHUFFLE,
10666 .inputs = {0, 1, 2},
10667 .outputs = {3},
10668 }
10669 };
10670
10671 const std::vector<uint32_t> inputIndexes = {0};
10672 const std::vector<uint32_t> outputIndexes = {3};
10673 std::vector<uint8_t> operandValues = {
10674 3, 0, 0, 0, 253, 255, 255, 255
10675 };
10676 const std::vector<hidl_memory> pools = {};
10677
10678 return {
10679 .operands = operands,
10680 .operations = operations,
10681 .inputIndexes = inputIndexes,
10682 .outputIndexes = outputIndexes,
10683 .operandValues = operandValues,
10684 .pools = pools,
10685 };
10686 }
10687
is_ignored_dynamic_output_shape_float16_dim3_axis0_neg(int i)10688 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis0_neg(int i) {
10689 static std::set<int> ignore = {};
10690 return ignore.find(i) != ignore.end();
10691 }
10692
10693 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis1()10694 Model createTestModel_dynamic_output_shape_float16_dim3_axis1() {
10695 const std::vector<Operand> operands = {
10696 {
10697 .type = OperandType::TENSOR_FLOAT16,
10698 .dimensions = {2, 12, 3},
10699 .numberOfConsumers = 1,
10700 .scale = 0.0f,
10701 .zeroPoint = 0,
10702 .lifetime = OperandLifeTime::MODEL_INPUT,
10703 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10704 },
10705 {
10706 .type = OperandType::INT32,
10707 .dimensions = {},
10708 .numberOfConsumers = 1,
10709 .scale = 0.0f,
10710 .zeroPoint = 0,
10711 .lifetime = OperandLifeTime::CONSTANT_COPY,
10712 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10713 },
10714 {
10715 .type = OperandType::INT32,
10716 .dimensions = {},
10717 .numberOfConsumers = 1,
10718 .scale = 0.0f,
10719 .zeroPoint = 0,
10720 .lifetime = OperandLifeTime::CONSTANT_COPY,
10721 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10722 },
10723 {
10724 .type = OperandType::TENSOR_FLOAT16,
10725 .dimensions = {0, 0, 0},
10726 .numberOfConsumers = 0,
10727 .scale = 0.0f,
10728 .zeroPoint = 0,
10729 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10730 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10731 }
10732 };
10733
10734 const std::vector<Operation> operations = {
10735 {
10736 .type = OperationType::CHANNEL_SHUFFLE,
10737 .inputs = {0, 1, 2},
10738 .outputs = {3},
10739 }
10740 };
10741
10742 const std::vector<uint32_t> inputIndexes = {0};
10743 const std::vector<uint32_t> outputIndexes = {3};
10744 std::vector<uint8_t> operandValues = {
10745 3, 0, 0, 0, 1, 0, 0, 0
10746 };
10747 const std::vector<hidl_memory> pools = {};
10748
10749 return {
10750 .operands = operands,
10751 .operations = operations,
10752 .inputIndexes = inputIndexes,
10753 .outputIndexes = outputIndexes,
10754 .operandValues = operandValues,
10755 .pools = pools,
10756 };
10757 }
10758
is_ignored_dynamic_output_shape_float16_dim3_axis1(int i)10759 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis1(int i) {
10760 static std::set<int> ignore = {};
10761 return ignore.find(i) != ignore.end();
10762 }
10763
10764 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis1_neg()10765 Model createTestModel_dynamic_output_shape_float16_dim3_axis1_neg() {
10766 const std::vector<Operand> operands = {
10767 {
10768 .type = OperandType::TENSOR_FLOAT16,
10769 .dimensions = {2, 12, 3},
10770 .numberOfConsumers = 1,
10771 .scale = 0.0f,
10772 .zeroPoint = 0,
10773 .lifetime = OperandLifeTime::MODEL_INPUT,
10774 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10775 },
10776 {
10777 .type = OperandType::INT32,
10778 .dimensions = {},
10779 .numberOfConsumers = 1,
10780 .scale = 0.0f,
10781 .zeroPoint = 0,
10782 .lifetime = OperandLifeTime::CONSTANT_COPY,
10783 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10784 },
10785 {
10786 .type = OperandType::INT32,
10787 .dimensions = {},
10788 .numberOfConsumers = 1,
10789 .scale = 0.0f,
10790 .zeroPoint = 0,
10791 .lifetime = OperandLifeTime::CONSTANT_COPY,
10792 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10793 },
10794 {
10795 .type = OperandType::TENSOR_FLOAT16,
10796 .dimensions = {0, 0, 0},
10797 .numberOfConsumers = 0,
10798 .scale = 0.0f,
10799 .zeroPoint = 0,
10800 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10801 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10802 }
10803 };
10804
10805 const std::vector<Operation> operations = {
10806 {
10807 .type = OperationType::CHANNEL_SHUFFLE,
10808 .inputs = {0, 1, 2},
10809 .outputs = {3},
10810 }
10811 };
10812
10813 const std::vector<uint32_t> inputIndexes = {0};
10814 const std::vector<uint32_t> outputIndexes = {3};
10815 std::vector<uint8_t> operandValues = {
10816 3, 0, 0, 0, 254, 255, 255, 255
10817 };
10818 const std::vector<hidl_memory> pools = {};
10819
10820 return {
10821 .operands = operands,
10822 .operations = operations,
10823 .inputIndexes = inputIndexes,
10824 .outputIndexes = outputIndexes,
10825 .operandValues = operandValues,
10826 .pools = pools,
10827 };
10828 }
10829
is_ignored_dynamic_output_shape_float16_dim3_axis1_neg(int i)10830 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis1_neg(int i) {
10831 static std::set<int> ignore = {};
10832 return ignore.find(i) != ignore.end();
10833 }
10834
10835 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis2()10836 Model createTestModel_dynamic_output_shape_float16_dim3_axis2() {
10837 const std::vector<Operand> operands = {
10838 {
10839 .type = OperandType::TENSOR_FLOAT16,
10840 .dimensions = {2, 3, 12},
10841 .numberOfConsumers = 1,
10842 .scale = 0.0f,
10843 .zeroPoint = 0,
10844 .lifetime = OperandLifeTime::MODEL_INPUT,
10845 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10846 },
10847 {
10848 .type = OperandType::INT32,
10849 .dimensions = {},
10850 .numberOfConsumers = 1,
10851 .scale = 0.0f,
10852 .zeroPoint = 0,
10853 .lifetime = OperandLifeTime::CONSTANT_COPY,
10854 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10855 },
10856 {
10857 .type = OperandType::INT32,
10858 .dimensions = {},
10859 .numberOfConsumers = 1,
10860 .scale = 0.0f,
10861 .zeroPoint = 0,
10862 .lifetime = OperandLifeTime::CONSTANT_COPY,
10863 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10864 },
10865 {
10866 .type = OperandType::TENSOR_FLOAT16,
10867 .dimensions = {0, 0, 0},
10868 .numberOfConsumers = 0,
10869 .scale = 0.0f,
10870 .zeroPoint = 0,
10871 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10872 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10873 }
10874 };
10875
10876 const std::vector<Operation> operations = {
10877 {
10878 .type = OperationType::CHANNEL_SHUFFLE,
10879 .inputs = {0, 1, 2},
10880 .outputs = {3},
10881 }
10882 };
10883
10884 const std::vector<uint32_t> inputIndexes = {0};
10885 const std::vector<uint32_t> outputIndexes = {3};
10886 std::vector<uint8_t> operandValues = {
10887 3, 0, 0, 0, 2, 0, 0, 0
10888 };
10889 const std::vector<hidl_memory> pools = {};
10890
10891 return {
10892 .operands = operands,
10893 .operations = operations,
10894 .inputIndexes = inputIndexes,
10895 .outputIndexes = outputIndexes,
10896 .operandValues = operandValues,
10897 .pools = pools,
10898 };
10899 }
10900
is_ignored_dynamic_output_shape_float16_dim3_axis2(int i)10901 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis2(int i) {
10902 static std::set<int> ignore = {};
10903 return ignore.find(i) != ignore.end();
10904 }
10905
10906 // Create the model
createTestModel_dynamic_output_shape_float16_dim3_axis2_neg()10907 Model createTestModel_dynamic_output_shape_float16_dim3_axis2_neg() {
10908 const std::vector<Operand> operands = {
10909 {
10910 .type = OperandType::TENSOR_FLOAT16,
10911 .dimensions = {2, 3, 12},
10912 .numberOfConsumers = 1,
10913 .scale = 0.0f,
10914 .zeroPoint = 0,
10915 .lifetime = OperandLifeTime::MODEL_INPUT,
10916 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10917 },
10918 {
10919 .type = OperandType::INT32,
10920 .dimensions = {},
10921 .numberOfConsumers = 1,
10922 .scale = 0.0f,
10923 .zeroPoint = 0,
10924 .lifetime = OperandLifeTime::CONSTANT_COPY,
10925 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10926 },
10927 {
10928 .type = OperandType::INT32,
10929 .dimensions = {},
10930 .numberOfConsumers = 1,
10931 .scale = 0.0f,
10932 .zeroPoint = 0,
10933 .lifetime = OperandLifeTime::CONSTANT_COPY,
10934 .location = {.poolIndex = 0, .offset = 4, .length = 4},
10935 },
10936 {
10937 .type = OperandType::TENSOR_FLOAT16,
10938 .dimensions = {0, 0, 0},
10939 .numberOfConsumers = 0,
10940 .scale = 0.0f,
10941 .zeroPoint = 0,
10942 .lifetime = OperandLifeTime::MODEL_OUTPUT,
10943 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10944 }
10945 };
10946
10947 const std::vector<Operation> operations = {
10948 {
10949 .type = OperationType::CHANNEL_SHUFFLE,
10950 .inputs = {0, 1, 2},
10951 .outputs = {3},
10952 }
10953 };
10954
10955 const std::vector<uint32_t> inputIndexes = {0};
10956 const std::vector<uint32_t> outputIndexes = {3};
10957 std::vector<uint8_t> operandValues = {
10958 3, 0, 0, 0, 255, 255, 255, 255
10959 };
10960 const std::vector<hidl_memory> pools = {};
10961
10962 return {
10963 .operands = operands,
10964 .operations = operations,
10965 .inputIndexes = inputIndexes,
10966 .outputIndexes = outputIndexes,
10967 .operandValues = operandValues,
10968 .pools = pools,
10969 };
10970 }
10971
is_ignored_dynamic_output_shape_float16_dim3_axis2_neg(int i)10972 inline bool is_ignored_dynamic_output_shape_float16_dim3_axis2_neg(int i) {
10973 static std::set<int> ignore = {};
10974 return ignore.find(i) != ignore.end();
10975 }
10976
10977 // Create the model
createTestModel_dynamic_output_shape_float16_dim2_axis0()10978 Model createTestModel_dynamic_output_shape_float16_dim2_axis0() {
10979 const std::vector<Operand> operands = {
10980 {
10981 .type = OperandType::TENSOR_FLOAT16,
10982 .dimensions = {12, 3},
10983 .numberOfConsumers = 1,
10984 .scale = 0.0f,
10985 .zeroPoint = 0,
10986 .lifetime = OperandLifeTime::MODEL_INPUT,
10987 .location = {.poolIndex = 0, .offset = 0, .length = 0},
10988 },
10989 {
10990 .type = OperandType::INT32,
10991 .dimensions = {},
10992 .numberOfConsumers = 1,
10993 .scale = 0.0f,
10994 .zeroPoint = 0,
10995 .lifetime = OperandLifeTime::CONSTANT_COPY,
10996 .location = {.poolIndex = 0, .offset = 0, .length = 4},
10997 },
10998 {
10999 .type = OperandType::INT32,
11000 .dimensions = {},
11001 .numberOfConsumers = 1,
11002 .scale = 0.0f,
11003 .zeroPoint = 0,
11004 .lifetime = OperandLifeTime::CONSTANT_COPY,
11005 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11006 },
11007 {
11008 .type = OperandType::TENSOR_FLOAT16,
11009 .dimensions = {0, 0},
11010 .numberOfConsumers = 0,
11011 .scale = 0.0f,
11012 .zeroPoint = 0,
11013 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11014 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11015 }
11016 };
11017
11018 const std::vector<Operation> operations = {
11019 {
11020 .type = OperationType::CHANNEL_SHUFFLE,
11021 .inputs = {0, 1, 2},
11022 .outputs = {3},
11023 }
11024 };
11025
11026 const std::vector<uint32_t> inputIndexes = {0};
11027 const std::vector<uint32_t> outputIndexes = {3};
11028 std::vector<uint8_t> operandValues = {
11029 3, 0, 0, 0, 0, 0, 0, 0
11030 };
11031 const std::vector<hidl_memory> pools = {};
11032
11033 return {
11034 .operands = operands,
11035 .operations = operations,
11036 .inputIndexes = inputIndexes,
11037 .outputIndexes = outputIndexes,
11038 .operandValues = operandValues,
11039 .pools = pools,
11040 };
11041 }
11042
is_ignored_dynamic_output_shape_float16_dim2_axis0(int i)11043 inline bool is_ignored_dynamic_output_shape_float16_dim2_axis0(int i) {
11044 static std::set<int> ignore = {};
11045 return ignore.find(i) != ignore.end();
11046 }
11047
11048 // Create the model
createTestModel_dynamic_output_shape_float16_dim2_axis0_neg()11049 Model createTestModel_dynamic_output_shape_float16_dim2_axis0_neg() {
11050 const std::vector<Operand> operands = {
11051 {
11052 .type = OperandType::TENSOR_FLOAT16,
11053 .dimensions = {12, 3},
11054 .numberOfConsumers = 1,
11055 .scale = 0.0f,
11056 .zeroPoint = 0,
11057 .lifetime = OperandLifeTime::MODEL_INPUT,
11058 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11059 },
11060 {
11061 .type = OperandType::INT32,
11062 .dimensions = {},
11063 .numberOfConsumers = 1,
11064 .scale = 0.0f,
11065 .zeroPoint = 0,
11066 .lifetime = OperandLifeTime::CONSTANT_COPY,
11067 .location = {.poolIndex = 0, .offset = 0, .length = 4},
11068 },
11069 {
11070 .type = OperandType::INT32,
11071 .dimensions = {},
11072 .numberOfConsumers = 1,
11073 .scale = 0.0f,
11074 .zeroPoint = 0,
11075 .lifetime = OperandLifeTime::CONSTANT_COPY,
11076 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11077 },
11078 {
11079 .type = OperandType::TENSOR_FLOAT16,
11080 .dimensions = {0, 0},
11081 .numberOfConsumers = 0,
11082 .scale = 0.0f,
11083 .zeroPoint = 0,
11084 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11085 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11086 }
11087 };
11088
11089 const std::vector<Operation> operations = {
11090 {
11091 .type = OperationType::CHANNEL_SHUFFLE,
11092 .inputs = {0, 1, 2},
11093 .outputs = {3},
11094 }
11095 };
11096
11097 const std::vector<uint32_t> inputIndexes = {0};
11098 const std::vector<uint32_t> outputIndexes = {3};
11099 std::vector<uint8_t> operandValues = {
11100 3, 0, 0, 0, 254, 255, 255, 255
11101 };
11102 const std::vector<hidl_memory> pools = {};
11103
11104 return {
11105 .operands = operands,
11106 .operations = operations,
11107 .inputIndexes = inputIndexes,
11108 .outputIndexes = outputIndexes,
11109 .operandValues = operandValues,
11110 .pools = pools,
11111 };
11112 }
11113
is_ignored_dynamic_output_shape_float16_dim2_axis0_neg(int i)11114 inline bool is_ignored_dynamic_output_shape_float16_dim2_axis0_neg(int i) {
11115 static std::set<int> ignore = {};
11116 return ignore.find(i) != ignore.end();
11117 }
11118
11119 // Create the model
createTestModel_dynamic_output_shape_float16_dim2_axis1()11120 Model createTestModel_dynamic_output_shape_float16_dim2_axis1() {
11121 const std::vector<Operand> operands = {
11122 {
11123 .type = OperandType::TENSOR_FLOAT16,
11124 .dimensions = {3, 12},
11125 .numberOfConsumers = 1,
11126 .scale = 0.0f,
11127 .zeroPoint = 0,
11128 .lifetime = OperandLifeTime::MODEL_INPUT,
11129 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11130 },
11131 {
11132 .type = OperandType::INT32,
11133 .dimensions = {},
11134 .numberOfConsumers = 1,
11135 .scale = 0.0f,
11136 .zeroPoint = 0,
11137 .lifetime = OperandLifeTime::CONSTANT_COPY,
11138 .location = {.poolIndex = 0, .offset = 0, .length = 4},
11139 },
11140 {
11141 .type = OperandType::INT32,
11142 .dimensions = {},
11143 .numberOfConsumers = 1,
11144 .scale = 0.0f,
11145 .zeroPoint = 0,
11146 .lifetime = OperandLifeTime::CONSTANT_COPY,
11147 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11148 },
11149 {
11150 .type = OperandType::TENSOR_FLOAT16,
11151 .dimensions = {0, 0},
11152 .numberOfConsumers = 0,
11153 .scale = 0.0f,
11154 .zeroPoint = 0,
11155 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11156 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11157 }
11158 };
11159
11160 const std::vector<Operation> operations = {
11161 {
11162 .type = OperationType::CHANNEL_SHUFFLE,
11163 .inputs = {0, 1, 2},
11164 .outputs = {3},
11165 }
11166 };
11167
11168 const std::vector<uint32_t> inputIndexes = {0};
11169 const std::vector<uint32_t> outputIndexes = {3};
11170 std::vector<uint8_t> operandValues = {
11171 3, 0, 0, 0, 1, 0, 0, 0
11172 };
11173 const std::vector<hidl_memory> pools = {};
11174
11175 return {
11176 .operands = operands,
11177 .operations = operations,
11178 .inputIndexes = inputIndexes,
11179 .outputIndexes = outputIndexes,
11180 .operandValues = operandValues,
11181 .pools = pools,
11182 };
11183 }
11184
is_ignored_dynamic_output_shape_float16_dim2_axis1(int i)11185 inline bool is_ignored_dynamic_output_shape_float16_dim2_axis1(int i) {
11186 static std::set<int> ignore = {};
11187 return ignore.find(i) != ignore.end();
11188 }
11189
11190 // Create the model
createTestModel_dynamic_output_shape_float16_dim2_axis1_neg()11191 Model createTestModel_dynamic_output_shape_float16_dim2_axis1_neg() {
11192 const std::vector<Operand> operands = {
11193 {
11194 .type = OperandType::TENSOR_FLOAT16,
11195 .dimensions = {3, 12},
11196 .numberOfConsumers = 1,
11197 .scale = 0.0f,
11198 .zeroPoint = 0,
11199 .lifetime = OperandLifeTime::MODEL_INPUT,
11200 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11201 },
11202 {
11203 .type = OperandType::INT32,
11204 .dimensions = {},
11205 .numberOfConsumers = 1,
11206 .scale = 0.0f,
11207 .zeroPoint = 0,
11208 .lifetime = OperandLifeTime::CONSTANT_COPY,
11209 .location = {.poolIndex = 0, .offset = 0, .length = 4},
11210 },
11211 {
11212 .type = OperandType::INT32,
11213 .dimensions = {},
11214 .numberOfConsumers = 1,
11215 .scale = 0.0f,
11216 .zeroPoint = 0,
11217 .lifetime = OperandLifeTime::CONSTANT_COPY,
11218 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11219 },
11220 {
11221 .type = OperandType::TENSOR_FLOAT16,
11222 .dimensions = {0, 0},
11223 .numberOfConsumers = 0,
11224 .scale = 0.0f,
11225 .zeroPoint = 0,
11226 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11227 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11228 }
11229 };
11230
11231 const std::vector<Operation> operations = {
11232 {
11233 .type = OperationType::CHANNEL_SHUFFLE,
11234 .inputs = {0, 1, 2},
11235 .outputs = {3},
11236 }
11237 };
11238
11239 const std::vector<uint32_t> inputIndexes = {0};
11240 const std::vector<uint32_t> outputIndexes = {3};
11241 std::vector<uint8_t> operandValues = {
11242 3, 0, 0, 0, 255, 255, 255, 255
11243 };
11244 const std::vector<hidl_memory> pools = {};
11245
11246 return {
11247 .operands = operands,
11248 .operations = operations,
11249 .inputIndexes = inputIndexes,
11250 .outputIndexes = outputIndexes,
11251 .operandValues = operandValues,
11252 .pools = pools,
11253 };
11254 }
11255
is_ignored_dynamic_output_shape_float16_dim2_axis1_neg(int i)11256 inline bool is_ignored_dynamic_output_shape_float16_dim2_axis1_neg(int i) {
11257 static std::set<int> ignore = {};
11258 return ignore.find(i) != ignore.end();
11259 }
11260
11261 // Create the model
createTestModel_dynamic_output_shape_float16_dim1_axis0()11262 Model createTestModel_dynamic_output_shape_float16_dim1_axis0() {
11263 const std::vector<Operand> operands = {
11264 {
11265 .type = OperandType::TENSOR_FLOAT16,
11266 .dimensions = {12},
11267 .numberOfConsumers = 1,
11268 .scale = 0.0f,
11269 .zeroPoint = 0,
11270 .lifetime = OperandLifeTime::MODEL_INPUT,
11271 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11272 },
11273 {
11274 .type = OperandType::INT32,
11275 .dimensions = {},
11276 .numberOfConsumers = 1,
11277 .scale = 0.0f,
11278 .zeroPoint = 0,
11279 .lifetime = OperandLifeTime::CONSTANT_COPY,
11280 .location = {.poolIndex = 0, .offset = 0, .length = 4},
11281 },
11282 {
11283 .type = OperandType::INT32,
11284 .dimensions = {},
11285 .numberOfConsumers = 1,
11286 .scale = 0.0f,
11287 .zeroPoint = 0,
11288 .lifetime = OperandLifeTime::CONSTANT_COPY,
11289 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11290 },
11291 {
11292 .type = OperandType::TENSOR_FLOAT16,
11293 .dimensions = {0},
11294 .numberOfConsumers = 0,
11295 .scale = 0.0f,
11296 .zeroPoint = 0,
11297 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11298 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11299 }
11300 };
11301
11302 const std::vector<Operation> operations = {
11303 {
11304 .type = OperationType::CHANNEL_SHUFFLE,
11305 .inputs = {0, 1, 2},
11306 .outputs = {3},
11307 }
11308 };
11309
11310 const std::vector<uint32_t> inputIndexes = {0};
11311 const std::vector<uint32_t> outputIndexes = {3};
11312 std::vector<uint8_t> operandValues = {
11313 3, 0, 0, 0, 0, 0, 0, 0
11314 };
11315 const std::vector<hidl_memory> pools = {};
11316
11317 return {
11318 .operands = operands,
11319 .operations = operations,
11320 .inputIndexes = inputIndexes,
11321 .outputIndexes = outputIndexes,
11322 .operandValues = operandValues,
11323 .pools = pools,
11324 };
11325 }
11326
is_ignored_dynamic_output_shape_float16_dim1_axis0(int i)11327 inline bool is_ignored_dynamic_output_shape_float16_dim1_axis0(int i) {
11328 static std::set<int> ignore = {};
11329 return ignore.find(i) != ignore.end();
11330 }
11331
11332 // Create the model
createTestModel_dynamic_output_shape_float16_dim1_axis0_neg()11333 Model createTestModel_dynamic_output_shape_float16_dim1_axis0_neg() {
11334 const std::vector<Operand> operands = {
11335 {
11336 .type = OperandType::TENSOR_FLOAT16,
11337 .dimensions = {12},
11338 .numberOfConsumers = 1,
11339 .scale = 0.0f,
11340 .zeroPoint = 0,
11341 .lifetime = OperandLifeTime::MODEL_INPUT,
11342 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11343 },
11344 {
11345 .type = OperandType::INT32,
11346 .dimensions = {},
11347 .numberOfConsumers = 1,
11348 .scale = 0.0f,
11349 .zeroPoint = 0,
11350 .lifetime = OperandLifeTime::CONSTANT_COPY,
11351 .location = {.poolIndex = 0, .offset = 0, .length = 4},
11352 },
11353 {
11354 .type = OperandType::INT32,
11355 .dimensions = {},
11356 .numberOfConsumers = 1,
11357 .scale = 0.0f,
11358 .zeroPoint = 0,
11359 .lifetime = OperandLifeTime::CONSTANT_COPY,
11360 .location = {.poolIndex = 0, .offset = 4, .length = 4},
11361 },
11362 {
11363 .type = OperandType::TENSOR_FLOAT16,
11364 .dimensions = {0},
11365 .numberOfConsumers = 0,
11366 .scale = 0.0f,
11367 .zeroPoint = 0,
11368 .lifetime = OperandLifeTime::MODEL_OUTPUT,
11369 .location = {.poolIndex = 0, .offset = 0, .length = 0},
11370 }
11371 };
11372
11373 const std::vector<Operation> operations = {
11374 {
11375 .type = OperationType::CHANNEL_SHUFFLE,
11376 .inputs = {0, 1, 2},
11377 .outputs = {3},
11378 }
11379 };
11380
11381 const std::vector<uint32_t> inputIndexes = {0};
11382 const std::vector<uint32_t> outputIndexes = {3};
11383 std::vector<uint8_t> operandValues = {
11384 3, 0, 0, 0, 255, 255, 255, 255
11385 };
11386 const std::vector<hidl_memory> pools = {};
11387
11388 return {
11389 .operands = operands,
11390 .operations = operations,
11391 .inputIndexes = inputIndexes,
11392 .outputIndexes = outputIndexes,
11393 .operandValues = operandValues,
11394 .pools = pools,
11395 };
11396 }
11397
is_ignored_dynamic_output_shape_float16_dim1_axis0_neg(int i)11398 inline bool is_ignored_dynamic_output_shape_float16_dim1_axis0_neg(int i) {
11399 static std::set<int> ignore = {};
11400 return ignore.find(i) != ignore.end();
11401 }
11402
11403