1 // Generated from gather.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;
6
7 namespace generated_tests::gather {
8
get_test_model()9 const TestModel& get_test_model() {
10 static TestModel model = {
11 .expectFailure = false,
12 .expectedMultinomialDistributionTolerance = 0,
13 .isRelaxed = false,
14 .main = {
15 .inputIndexes = {0},
16 .operands = {{ // input0
17 .channelQuant = {},
18 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
19 .dimensions = {2, 2},
20 .isIgnored = false,
21 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
22 .numberOfConsumers = 1,
23 .scale = 0.0f,
24 .type = TestOperandType::TENSOR_FLOAT32,
25 .zeroPoint = 0
26 }, { // param
27 .channelQuant = {},
28 .data = TestBuffer::createFromVector<int32_t>({0}),
29 .dimensions = {},
30 .isIgnored = false,
31 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
32 .numberOfConsumers = 1,
33 .scale = 0.0f,
34 .type = TestOperandType::INT32,
35 .zeroPoint = 0
36 }, { // param1
37 .channelQuant = {},
38 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
39 .dimensions = {2},
40 .isIgnored = false,
41 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
42 .numberOfConsumers = 1,
43 .scale = 0.0f,
44 .type = TestOperandType::TENSOR_INT32,
45 .zeroPoint = 0
46 }, { // output0
47 .channelQuant = {},
48 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f, -2.0f, 0.2f}),
49 .dimensions = {2, 2},
50 .isIgnored = false,
51 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
52 .numberOfConsumers = 0,
53 .scale = 0.0f,
54 .type = TestOperandType::TENSOR_FLOAT32,
55 .zeroPoint = 0
56 }},
57 .operations = {{
58 .inputs = {0, 1, 2},
59 .outputs = {3},
60 .type = TestOperationType::GATHER
61 }},
62 .outputIndexes = {3}
63 },
64 .minSupportedVersion = TestHalVersion::V1_2,
65 .referenced = {}
66 };
67 return model;
68 }
69
70 const auto dummy_test_model = TestModelManager::get().add("gather", get_test_model());
71
72 } // namespace generated_tests::gather
73
74 namespace generated_tests::gather {
75
get_test_model_all_inputs_as_internal()76 const TestModel& get_test_model_all_inputs_as_internal() {
77 static TestModel model = {
78 .expectFailure = false,
79 .expectedMultinomialDistributionTolerance = 0,
80 .isRelaxed = false,
81 .main = {
82 .inputIndexes = {4},
83 .operands = {{ // input0
84 .channelQuant = {},
85 .data = TestBuffer::createFromVector<float>({}),
86 .dimensions = {2, 2},
87 .isIgnored = false,
88 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
89 .numberOfConsumers = 1,
90 .scale = 0.0f,
91 .type = TestOperandType::TENSOR_FLOAT32,
92 .zeroPoint = 0
93 }, { // param
94 .channelQuant = {},
95 .data = TestBuffer::createFromVector<int32_t>({0}),
96 .dimensions = {},
97 .isIgnored = false,
98 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
99 .numberOfConsumers = 1,
100 .scale = 0.0f,
101 .type = TestOperandType::INT32,
102 .zeroPoint = 0
103 }, { // param1
104 .channelQuant = {},
105 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
106 .dimensions = {2},
107 .isIgnored = false,
108 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
109 .numberOfConsumers = 1,
110 .scale = 0.0f,
111 .type = TestOperandType::TENSOR_INT32,
112 .zeroPoint = 0
113 }, { // output0
114 .channelQuant = {},
115 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f, -2.0f, 0.2f}),
116 .dimensions = {2, 2},
117 .isIgnored = false,
118 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
119 .numberOfConsumers = 0,
120 .scale = 0.0f,
121 .type = TestOperandType::TENSOR_FLOAT32,
122 .zeroPoint = 0
123 }, { // input0_new
124 .channelQuant = {},
125 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
126 .dimensions = {2, 2},
127 .isIgnored = false,
128 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
129 .numberOfConsumers = 1,
130 .scale = 0.0f,
131 .type = TestOperandType::TENSOR_FLOAT32,
132 .zeroPoint = 0
133 }, { // placeholder
134 .channelQuant = {},
135 .data = TestBuffer::createFromVector<float>({0.0f}),
136 .dimensions = {1},
137 .isIgnored = false,
138 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
139 .numberOfConsumers = 1,
140 .scale = 0.0f,
141 .type = TestOperandType::TENSOR_FLOAT32,
142 .zeroPoint = 0
143 }, { // param16
144 .channelQuant = {},
145 .data = TestBuffer::createFromVector<int32_t>({0}),
146 .dimensions = {},
147 .isIgnored = false,
148 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
149 .numberOfConsumers = 1,
150 .scale = 0.0f,
151 .type = TestOperandType::INT32,
152 .zeroPoint = 0
153 }},
154 .operations = {{
155 .inputs = {4, 5, 6},
156 .outputs = {0},
157 .type = TestOperationType::ADD
158 }, {
159 .inputs = {0, 1, 2},
160 .outputs = {3},
161 .type = TestOperationType::GATHER
162 }},
163 .outputIndexes = {3}
164 },
165 .minSupportedVersion = TestHalVersion::V1_2,
166 .referenced = {}
167 };
168 return model;
169 }
170
171 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("gather_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
172
173 } // namespace generated_tests::gather
174
175 namespace generated_tests::gather {
176
get_test_model_relaxed()177 const TestModel& get_test_model_relaxed() {
178 static TestModel model = {
179 .expectFailure = false,
180 .expectedMultinomialDistributionTolerance = 0,
181 .isRelaxed = true,
182 .main = {
183 .inputIndexes = {0},
184 .operands = {{ // input0
185 .channelQuant = {},
186 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
187 .dimensions = {2, 2},
188 .isIgnored = false,
189 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
190 .numberOfConsumers = 1,
191 .scale = 0.0f,
192 .type = TestOperandType::TENSOR_FLOAT32,
193 .zeroPoint = 0
194 }, { // param
195 .channelQuant = {},
196 .data = TestBuffer::createFromVector<int32_t>({0}),
197 .dimensions = {},
198 .isIgnored = false,
199 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
200 .numberOfConsumers = 1,
201 .scale = 0.0f,
202 .type = TestOperandType::INT32,
203 .zeroPoint = 0
204 }, { // param1
205 .channelQuant = {},
206 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
207 .dimensions = {2},
208 .isIgnored = false,
209 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
210 .numberOfConsumers = 1,
211 .scale = 0.0f,
212 .type = TestOperandType::TENSOR_INT32,
213 .zeroPoint = 0
214 }, { // output0
215 .channelQuant = {},
216 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f, -2.0f, 0.2f}),
217 .dimensions = {2, 2},
218 .isIgnored = false,
219 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
220 .numberOfConsumers = 0,
221 .scale = 0.0f,
222 .type = TestOperandType::TENSOR_FLOAT32,
223 .zeroPoint = 0
224 }},
225 .operations = {{
226 .inputs = {0, 1, 2},
227 .outputs = {3},
228 .type = TestOperationType::GATHER
229 }},
230 .outputIndexes = {3}
231 },
232 .minSupportedVersion = TestHalVersion::UNKNOWN,
233 .referenced = {}
234 };
235 return model;
236 }
237
238 const auto dummy_test_model_relaxed = TestModelManager::get().add("gather_relaxed", get_test_model_relaxed());
239
240 } // namespace generated_tests::gather
241
242 namespace generated_tests::gather {
243
get_test_model_relaxed_all_inputs_as_internal()244 const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
245 static TestModel model = {
246 .expectFailure = false,
247 .expectedMultinomialDistributionTolerance = 0,
248 .isRelaxed = true,
249 .main = {
250 .inputIndexes = {4},
251 .operands = {{ // input0
252 .channelQuant = {},
253 .data = TestBuffer::createFromVector<float>({}),
254 .dimensions = {2, 2},
255 .isIgnored = false,
256 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
257 .numberOfConsumers = 1,
258 .scale = 0.0f,
259 .type = TestOperandType::TENSOR_FLOAT32,
260 .zeroPoint = 0
261 }, { // param
262 .channelQuant = {},
263 .data = TestBuffer::createFromVector<int32_t>({0}),
264 .dimensions = {},
265 .isIgnored = false,
266 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
267 .numberOfConsumers = 1,
268 .scale = 0.0f,
269 .type = TestOperandType::INT32,
270 .zeroPoint = 0
271 }, { // param1
272 .channelQuant = {},
273 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
274 .dimensions = {2},
275 .isIgnored = false,
276 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
277 .numberOfConsumers = 1,
278 .scale = 0.0f,
279 .type = TestOperandType::TENSOR_INT32,
280 .zeroPoint = 0
281 }, { // output0
282 .channelQuant = {},
283 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f, -2.0f, 0.2f}),
284 .dimensions = {2, 2},
285 .isIgnored = false,
286 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
287 .numberOfConsumers = 0,
288 .scale = 0.0f,
289 .type = TestOperandType::TENSOR_FLOAT32,
290 .zeroPoint = 0
291 }, { // input0_new
292 .channelQuant = {},
293 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
294 .dimensions = {2, 2},
295 .isIgnored = false,
296 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
297 .numberOfConsumers = 1,
298 .scale = 0.0f,
299 .type = TestOperandType::TENSOR_FLOAT32,
300 .zeroPoint = 0
301 }, { // placeholder1
302 .channelQuant = {},
303 .data = TestBuffer::createFromVector<float>({0.0f}),
304 .dimensions = {1},
305 .isIgnored = false,
306 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
307 .numberOfConsumers = 1,
308 .scale = 0.0f,
309 .type = TestOperandType::TENSOR_FLOAT32,
310 .zeroPoint = 0
311 }, { // param17
312 .channelQuant = {},
313 .data = TestBuffer::createFromVector<int32_t>({0}),
314 .dimensions = {},
315 .isIgnored = false,
316 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
317 .numberOfConsumers = 1,
318 .scale = 0.0f,
319 .type = TestOperandType::INT32,
320 .zeroPoint = 0
321 }},
322 .operations = {{
323 .inputs = {4, 5, 6},
324 .outputs = {0},
325 .type = TestOperationType::ADD
326 }, {
327 .inputs = {0, 1, 2},
328 .outputs = {3},
329 .type = TestOperationType::GATHER
330 }},
331 .outputIndexes = {3}
332 },
333 .minSupportedVersion = TestHalVersion::UNKNOWN,
334 .referenced = {}
335 };
336 return model;
337 }
338
339 const auto dummy_test_model_relaxed_all_inputs_as_internal = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal", get_test_model_relaxed_all_inputs_as_internal());
340
341 } // namespace generated_tests::gather
342
343 namespace generated_tests::gather {
344
get_test_model_quant8()345 const TestModel& get_test_model_quant8() {
346 static TestModel model = {
347 .expectFailure = false,
348 .expectedMultinomialDistributionTolerance = 0,
349 .isRelaxed = false,
350 .main = {
351 .inputIndexes = {0},
352 .operands = {{ // input0
353 .channelQuant = {},
354 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
355 .dimensions = {2, 2},
356 .isIgnored = false,
357 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
358 .numberOfConsumers = 1,
359 .scale = 0.5f,
360 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
361 .zeroPoint = 127
362 }, { // param
363 .channelQuant = {},
364 .data = TestBuffer::createFromVector<int32_t>({0}),
365 .dimensions = {},
366 .isIgnored = false,
367 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
368 .numberOfConsumers = 1,
369 .scale = 0.0f,
370 .type = TestOperandType::INT32,
371 .zeroPoint = 0
372 }, { // param1
373 .channelQuant = {},
374 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
375 .dimensions = {2},
376 .isIgnored = false,
377 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
378 .numberOfConsumers = 1,
379 .scale = 0.0f,
380 .type = TestOperandType::TENSOR_INT32,
381 .zeroPoint = 0
382 }, { // output0
383 .channelQuant = {},
384 .data = TestBuffer::createFromVector<uint8_t>({128, 129, 123, 127}),
385 .dimensions = {2, 2},
386 .isIgnored = false,
387 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
388 .numberOfConsumers = 0,
389 .scale = 0.5f,
390 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
391 .zeroPoint = 127
392 }},
393 .operations = {{
394 .inputs = {0, 1, 2},
395 .outputs = {3},
396 .type = TestOperationType::GATHER
397 }},
398 .outputIndexes = {3}
399 },
400 .minSupportedVersion = TestHalVersion::V1_2,
401 .referenced = {}
402 };
403 return model;
404 }
405
406 const auto dummy_test_model_quant8 = TestModelManager::get().add("gather_quant8", get_test_model_quant8());
407
408 } // namespace generated_tests::gather
409
410 namespace generated_tests::gather {
411
get_test_model_quant8_all_inputs_as_internal()412 const TestModel& get_test_model_quant8_all_inputs_as_internal() {
413 static TestModel model = {
414 .expectFailure = false,
415 .expectedMultinomialDistributionTolerance = 0,
416 .isRelaxed = false,
417 .main = {
418 .inputIndexes = {4},
419 .operands = {{ // input0
420 .channelQuant = {},
421 .data = TestBuffer::createFromVector<uint8_t>({}),
422 .dimensions = {2, 2},
423 .isIgnored = false,
424 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
425 .numberOfConsumers = 1,
426 .scale = 0.5f,
427 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
428 .zeroPoint = 127
429 }, { // param
430 .channelQuant = {},
431 .data = TestBuffer::createFromVector<int32_t>({0}),
432 .dimensions = {},
433 .isIgnored = false,
434 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
435 .numberOfConsumers = 1,
436 .scale = 0.0f,
437 .type = TestOperandType::INT32,
438 .zeroPoint = 0
439 }, { // param1
440 .channelQuant = {},
441 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
442 .dimensions = {2},
443 .isIgnored = false,
444 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
445 .numberOfConsumers = 1,
446 .scale = 0.0f,
447 .type = TestOperandType::TENSOR_INT32,
448 .zeroPoint = 0
449 }, { // output0
450 .channelQuant = {},
451 .data = TestBuffer::createFromVector<uint8_t>({128, 129, 123, 127}),
452 .dimensions = {2, 2},
453 .isIgnored = false,
454 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
455 .numberOfConsumers = 0,
456 .scale = 0.5f,
457 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
458 .zeroPoint = 127
459 }, { // input0_new
460 .channelQuant = {},
461 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
462 .dimensions = {2, 2},
463 .isIgnored = false,
464 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
465 .numberOfConsumers = 1,
466 .scale = 0.5f,
467 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
468 .zeroPoint = 127
469 }, { // placeholder2
470 .channelQuant = {},
471 .data = TestBuffer::createFromVector<uint8_t>({127}),
472 .dimensions = {1},
473 .isIgnored = false,
474 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
475 .numberOfConsumers = 1,
476 .scale = 0.5f,
477 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
478 .zeroPoint = 127
479 }, { // param18
480 .channelQuant = {},
481 .data = TestBuffer::createFromVector<int32_t>({0}),
482 .dimensions = {},
483 .isIgnored = false,
484 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
485 .numberOfConsumers = 1,
486 .scale = 0.0f,
487 .type = TestOperandType::INT32,
488 .zeroPoint = 0
489 }},
490 .operations = {{
491 .inputs = {4, 5, 6},
492 .outputs = {0},
493 .type = TestOperationType::ADD
494 }, {
495 .inputs = {0, 1, 2},
496 .outputs = {3},
497 .type = TestOperationType::GATHER
498 }},
499 .outputIndexes = {3}
500 },
501 .minSupportedVersion = TestHalVersion::V1_2,
502 .referenced = {}
503 };
504 return model;
505 }
506
507 const auto dummy_test_model_quant8_all_inputs_as_internal = TestModelManager::get().add("gather_quant8_all_inputs_as_internal", get_test_model_quant8_all_inputs_as_internal());
508
509 } // namespace generated_tests::gather
510
511 namespace generated_tests::gather {
512
get_test_model_int32()513 const TestModel& get_test_model_int32() {
514 static TestModel model = {
515 .expectFailure = false,
516 .expectedMultinomialDistributionTolerance = 0,
517 .isRelaxed = false,
518 .main = {
519 .inputIndexes = {0},
520 .operands = {{ // input0
521 .channelQuant = {},
522 .data = TestBuffer::createFromVector<int32_t>({-2, 0, 1, 1}),
523 .dimensions = {2, 2},
524 .isIgnored = false,
525 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
526 .numberOfConsumers = 1,
527 .scale = 0.0f,
528 .type = TestOperandType::TENSOR_INT32,
529 .zeroPoint = 0
530 }, { // param
531 .channelQuant = {},
532 .data = TestBuffer::createFromVector<int32_t>({0}),
533 .dimensions = {},
534 .isIgnored = false,
535 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
536 .numberOfConsumers = 1,
537 .scale = 0.0f,
538 .type = TestOperandType::INT32,
539 .zeroPoint = 0
540 }, { // param1
541 .channelQuant = {},
542 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
543 .dimensions = {2},
544 .isIgnored = false,
545 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
546 .numberOfConsumers = 1,
547 .scale = 0.0f,
548 .type = TestOperandType::TENSOR_INT32,
549 .zeroPoint = 0
550 }, { // output0
551 .channelQuant = {},
552 .data = TestBuffer::createFromVector<int32_t>({1, 1, -2, 0}),
553 .dimensions = {2, 2},
554 .isIgnored = false,
555 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
556 .numberOfConsumers = 0,
557 .scale = 0.0f,
558 .type = TestOperandType::TENSOR_INT32,
559 .zeroPoint = 0
560 }},
561 .operations = {{
562 .inputs = {0, 1, 2},
563 .outputs = {3},
564 .type = TestOperationType::GATHER
565 }},
566 .outputIndexes = {3}
567 },
568 .minSupportedVersion = TestHalVersion::V1_2,
569 .referenced = {}
570 };
571 return model;
572 }
573
574 const auto dummy_test_model_int32 = TestModelManager::get().add("gather_int32", get_test_model_int32());
575
576 } // namespace generated_tests::gather
577
578 namespace generated_tests::gather {
579
get_test_model_float16()580 const TestModel& get_test_model_float16() {
581 static TestModel model = {
582 .expectFailure = false,
583 .expectedMultinomialDistributionTolerance = 0,
584 .isRelaxed = false,
585 .main = {
586 .inputIndexes = {0},
587 .operands = {{ // input0
588 .channelQuant = {},
589 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
590 .dimensions = {2, 2},
591 .isIgnored = false,
592 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
593 .numberOfConsumers = 1,
594 .scale = 0.0f,
595 .type = TestOperandType::TENSOR_FLOAT16,
596 .zeroPoint = 0
597 }, { // param
598 .channelQuant = {},
599 .data = TestBuffer::createFromVector<int32_t>({0}),
600 .dimensions = {},
601 .isIgnored = false,
602 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
603 .numberOfConsumers = 1,
604 .scale = 0.0f,
605 .type = TestOperandType::INT32,
606 .zeroPoint = 0
607 }, { // param1
608 .channelQuant = {},
609 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
610 .dimensions = {2},
611 .isIgnored = false,
612 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
613 .numberOfConsumers = 1,
614 .scale = 0.0f,
615 .type = TestOperandType::TENSOR_INT32,
616 .zeroPoint = 0
617 }, { // output0
618 .channelQuant = {},
619 .data = TestBuffer::createFromVector<_Float16>({0.699999988079071f, 0.800000011920929f, -2.0f, 0.20000000298023224f}),
620 .dimensions = {2, 2},
621 .isIgnored = false,
622 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
623 .numberOfConsumers = 0,
624 .scale = 0.0f,
625 .type = TestOperandType::TENSOR_FLOAT16,
626 .zeroPoint = 0
627 }},
628 .operations = {{
629 .inputs = {0, 1, 2},
630 .outputs = {3},
631 .type = TestOperationType::GATHER
632 }},
633 .outputIndexes = {3}
634 },
635 .minSupportedVersion = TestHalVersion::V1_2,
636 .referenced = {}
637 };
638 return model;
639 }
640
641 const auto dummy_test_model_float16 = TestModelManager::get().add("gather_float16", get_test_model_float16());
642
643 } // namespace generated_tests::gather
644
645 namespace generated_tests::gather {
646
get_test_model_float16_all_inputs_as_internal()647 const TestModel& get_test_model_float16_all_inputs_as_internal() {
648 static TestModel model = {
649 .expectFailure = false,
650 .expectedMultinomialDistributionTolerance = 0,
651 .isRelaxed = false,
652 .main = {
653 .inputIndexes = {4},
654 .operands = {{ // input0
655 .channelQuant = {},
656 .data = TestBuffer::createFromVector<_Float16>({}),
657 .dimensions = {2, 2},
658 .isIgnored = false,
659 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
660 .numberOfConsumers = 1,
661 .scale = 0.0f,
662 .type = TestOperandType::TENSOR_FLOAT16,
663 .zeroPoint = 0
664 }, { // param
665 .channelQuant = {},
666 .data = TestBuffer::createFromVector<int32_t>({0}),
667 .dimensions = {},
668 .isIgnored = false,
669 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
670 .numberOfConsumers = 1,
671 .scale = 0.0f,
672 .type = TestOperandType::INT32,
673 .zeroPoint = 0
674 }, { // param1
675 .channelQuant = {},
676 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
677 .dimensions = {2},
678 .isIgnored = false,
679 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
680 .numberOfConsumers = 1,
681 .scale = 0.0f,
682 .type = TestOperandType::TENSOR_INT32,
683 .zeroPoint = 0
684 }, { // output0
685 .channelQuant = {},
686 .data = TestBuffer::createFromVector<_Float16>({0.699999988079071f, 0.800000011920929f, -2.0f, 0.20000000298023224f}),
687 .dimensions = {2, 2},
688 .isIgnored = false,
689 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
690 .numberOfConsumers = 0,
691 .scale = 0.0f,
692 .type = TestOperandType::TENSOR_FLOAT16,
693 .zeroPoint = 0
694 }, { // input0_new
695 .channelQuant = {},
696 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
697 .dimensions = {2, 2},
698 .isIgnored = false,
699 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
700 .numberOfConsumers = 1,
701 .scale = 0.0f,
702 .type = TestOperandType::TENSOR_FLOAT16,
703 .zeroPoint = 0
704 }, { // placeholder3
705 .channelQuant = {},
706 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
707 .dimensions = {1},
708 .isIgnored = false,
709 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
710 .numberOfConsumers = 1,
711 .scale = 0.0f,
712 .type = TestOperandType::TENSOR_FLOAT16,
713 .zeroPoint = 0
714 }, { // param19
715 .channelQuant = {},
716 .data = TestBuffer::createFromVector<int32_t>({0}),
717 .dimensions = {},
718 .isIgnored = false,
719 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
720 .numberOfConsumers = 1,
721 .scale = 0.0f,
722 .type = TestOperandType::INT32,
723 .zeroPoint = 0
724 }},
725 .operations = {{
726 .inputs = {4, 5, 6},
727 .outputs = {0},
728 .type = TestOperationType::ADD
729 }, {
730 .inputs = {0, 1, 2},
731 .outputs = {3},
732 .type = TestOperationType::GATHER
733 }},
734 .outputIndexes = {3}
735 },
736 .minSupportedVersion = TestHalVersion::V1_2,
737 .referenced = {}
738 };
739 return model;
740 }
741
742 const auto dummy_test_model_float16_all_inputs_as_internal = TestModelManager::get().add("gather_float16_all_inputs_as_internal", get_test_model_float16_all_inputs_as_internal());
743
744 } // namespace generated_tests::gather
745
746 namespace generated_tests::gather {
747
get_test_model_2()748 const TestModel& get_test_model_2() {
749 static TestModel model = {
750 .expectFailure = false,
751 .expectedMultinomialDistributionTolerance = 0,
752 .isRelaxed = false,
753 .main = {
754 .inputIndexes = {0},
755 .operands = {{ // input01
756 .channelQuant = {},
757 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
758 .dimensions = {2, 2},
759 .isIgnored = false,
760 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
761 .numberOfConsumers = 1,
762 .scale = 0.0f,
763 .type = TestOperandType::TENSOR_FLOAT32,
764 .zeroPoint = 0
765 }, { // param2
766 .channelQuant = {},
767 .data = TestBuffer::createFromVector<int32_t>({0}),
768 .dimensions = {},
769 .isIgnored = false,
770 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
771 .numberOfConsumers = 1,
772 .scale = 0.0f,
773 .type = TestOperandType::INT32,
774 .zeroPoint = 0
775 }, { // param3
776 .channelQuant = {},
777 .data = TestBuffer::createFromVector<int32_t>({1}),
778 .dimensions = {1},
779 .isIgnored = false,
780 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
781 .numberOfConsumers = 1,
782 .scale = 0.0f,
783 .type = TestOperandType::TENSOR_INT32,
784 .zeroPoint = 0
785 }, { // output01
786 .channelQuant = {},
787 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f}),
788 .dimensions = {1, 2},
789 .isIgnored = false,
790 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
791 .numberOfConsumers = 0,
792 .scale = 0.0f,
793 .type = TestOperandType::TENSOR_FLOAT32,
794 .zeroPoint = 0
795 }},
796 .operations = {{
797 .inputs = {0, 1, 2},
798 .outputs = {3},
799 .type = TestOperationType::GATHER
800 }},
801 .outputIndexes = {3}
802 },
803 .minSupportedVersion = TestHalVersion::V1_2,
804 .referenced = {}
805 };
806 return model;
807 }
808
809 const auto dummy_test_model_2 = TestModelManager::get().add("gather_2", get_test_model_2());
810
811 } // namespace generated_tests::gather
812
813 namespace generated_tests::gather {
814
get_test_model_all_inputs_as_internal_2()815 const TestModel& get_test_model_all_inputs_as_internal_2() {
816 static TestModel model = {
817 .expectFailure = false,
818 .expectedMultinomialDistributionTolerance = 0,
819 .isRelaxed = false,
820 .main = {
821 .inputIndexes = {4},
822 .operands = {{ // input01
823 .channelQuant = {},
824 .data = TestBuffer::createFromVector<float>({}),
825 .dimensions = {2, 2},
826 .isIgnored = false,
827 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
828 .numberOfConsumers = 1,
829 .scale = 0.0f,
830 .type = TestOperandType::TENSOR_FLOAT32,
831 .zeroPoint = 0
832 }, { // param2
833 .channelQuant = {},
834 .data = TestBuffer::createFromVector<int32_t>({0}),
835 .dimensions = {},
836 .isIgnored = false,
837 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
838 .numberOfConsumers = 1,
839 .scale = 0.0f,
840 .type = TestOperandType::INT32,
841 .zeroPoint = 0
842 }, { // param3
843 .channelQuant = {},
844 .data = TestBuffer::createFromVector<int32_t>({1}),
845 .dimensions = {1},
846 .isIgnored = false,
847 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
848 .numberOfConsumers = 1,
849 .scale = 0.0f,
850 .type = TestOperandType::TENSOR_INT32,
851 .zeroPoint = 0
852 }, { // output01
853 .channelQuant = {},
854 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f}),
855 .dimensions = {1, 2},
856 .isIgnored = false,
857 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
858 .numberOfConsumers = 0,
859 .scale = 0.0f,
860 .type = TestOperandType::TENSOR_FLOAT32,
861 .zeroPoint = 0
862 }, { // input01_new
863 .channelQuant = {},
864 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
865 .dimensions = {2, 2},
866 .isIgnored = false,
867 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
868 .numberOfConsumers = 1,
869 .scale = 0.0f,
870 .type = TestOperandType::TENSOR_FLOAT32,
871 .zeroPoint = 0
872 }, { // placeholder4
873 .channelQuant = {},
874 .data = TestBuffer::createFromVector<float>({0.0f}),
875 .dimensions = {1},
876 .isIgnored = false,
877 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
878 .numberOfConsumers = 1,
879 .scale = 0.0f,
880 .type = TestOperandType::TENSOR_FLOAT32,
881 .zeroPoint = 0
882 }, { // param20
883 .channelQuant = {},
884 .data = TestBuffer::createFromVector<int32_t>({0}),
885 .dimensions = {},
886 .isIgnored = false,
887 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
888 .numberOfConsumers = 1,
889 .scale = 0.0f,
890 .type = TestOperandType::INT32,
891 .zeroPoint = 0
892 }},
893 .operations = {{
894 .inputs = {4, 5, 6},
895 .outputs = {0},
896 .type = TestOperationType::ADD
897 }, {
898 .inputs = {0, 1, 2},
899 .outputs = {3},
900 .type = TestOperationType::GATHER
901 }},
902 .outputIndexes = {3}
903 },
904 .minSupportedVersion = TestHalVersion::V1_2,
905 .referenced = {}
906 };
907 return model;
908 }
909
910 const auto dummy_test_model_all_inputs_as_internal_2 = TestModelManager::get().add("gather_all_inputs_as_internal_2", get_test_model_all_inputs_as_internal_2());
911
912 } // namespace generated_tests::gather
913
914 namespace generated_tests::gather {
915
get_test_model_relaxed_2()916 const TestModel& get_test_model_relaxed_2() {
917 static TestModel model = {
918 .expectFailure = false,
919 .expectedMultinomialDistributionTolerance = 0,
920 .isRelaxed = true,
921 .main = {
922 .inputIndexes = {0},
923 .operands = {{ // input01
924 .channelQuant = {},
925 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
926 .dimensions = {2, 2},
927 .isIgnored = false,
928 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
929 .numberOfConsumers = 1,
930 .scale = 0.0f,
931 .type = TestOperandType::TENSOR_FLOAT32,
932 .zeroPoint = 0
933 }, { // param2
934 .channelQuant = {},
935 .data = TestBuffer::createFromVector<int32_t>({0}),
936 .dimensions = {},
937 .isIgnored = false,
938 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
939 .numberOfConsumers = 1,
940 .scale = 0.0f,
941 .type = TestOperandType::INT32,
942 .zeroPoint = 0
943 }, { // param3
944 .channelQuant = {},
945 .data = TestBuffer::createFromVector<int32_t>({1}),
946 .dimensions = {1},
947 .isIgnored = false,
948 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
949 .numberOfConsumers = 1,
950 .scale = 0.0f,
951 .type = TestOperandType::TENSOR_INT32,
952 .zeroPoint = 0
953 }, { // output01
954 .channelQuant = {},
955 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f}),
956 .dimensions = {1, 2},
957 .isIgnored = false,
958 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
959 .numberOfConsumers = 0,
960 .scale = 0.0f,
961 .type = TestOperandType::TENSOR_FLOAT32,
962 .zeroPoint = 0
963 }},
964 .operations = {{
965 .inputs = {0, 1, 2},
966 .outputs = {3},
967 .type = TestOperationType::GATHER
968 }},
969 .outputIndexes = {3}
970 },
971 .minSupportedVersion = TestHalVersion::UNKNOWN,
972 .referenced = {}
973 };
974 return model;
975 }
976
977 const auto dummy_test_model_relaxed_2 = TestModelManager::get().add("gather_relaxed_2", get_test_model_relaxed_2());
978
979 } // namespace generated_tests::gather
980
981 namespace generated_tests::gather {
982
get_test_model_relaxed_all_inputs_as_internal_2()983 const TestModel& get_test_model_relaxed_all_inputs_as_internal_2() {
984 static TestModel model = {
985 .expectFailure = false,
986 .expectedMultinomialDistributionTolerance = 0,
987 .isRelaxed = true,
988 .main = {
989 .inputIndexes = {4},
990 .operands = {{ // input01
991 .channelQuant = {},
992 .data = TestBuffer::createFromVector<float>({}),
993 .dimensions = {2, 2},
994 .isIgnored = false,
995 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
996 .numberOfConsumers = 1,
997 .scale = 0.0f,
998 .type = TestOperandType::TENSOR_FLOAT32,
999 .zeroPoint = 0
1000 }, { // param2
1001 .channelQuant = {},
1002 .data = TestBuffer::createFromVector<int32_t>({0}),
1003 .dimensions = {},
1004 .isIgnored = false,
1005 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1006 .numberOfConsumers = 1,
1007 .scale = 0.0f,
1008 .type = TestOperandType::INT32,
1009 .zeroPoint = 0
1010 }, { // param3
1011 .channelQuant = {},
1012 .data = TestBuffer::createFromVector<int32_t>({1}),
1013 .dimensions = {1},
1014 .isIgnored = false,
1015 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1016 .numberOfConsumers = 1,
1017 .scale = 0.0f,
1018 .type = TestOperandType::TENSOR_INT32,
1019 .zeroPoint = 0
1020 }, { // output01
1021 .channelQuant = {},
1022 .data = TestBuffer::createFromVector<float>({0.7f, 0.8f}),
1023 .dimensions = {1, 2},
1024 .isIgnored = false,
1025 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1026 .numberOfConsumers = 0,
1027 .scale = 0.0f,
1028 .type = TestOperandType::TENSOR_FLOAT32,
1029 .zeroPoint = 0
1030 }, { // input01_new
1031 .channelQuant = {},
1032 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
1033 .dimensions = {2, 2},
1034 .isIgnored = false,
1035 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1036 .numberOfConsumers = 1,
1037 .scale = 0.0f,
1038 .type = TestOperandType::TENSOR_FLOAT32,
1039 .zeroPoint = 0
1040 }, { // placeholder5
1041 .channelQuant = {},
1042 .data = TestBuffer::createFromVector<float>({0.0f}),
1043 .dimensions = {1},
1044 .isIgnored = false,
1045 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1046 .numberOfConsumers = 1,
1047 .scale = 0.0f,
1048 .type = TestOperandType::TENSOR_FLOAT32,
1049 .zeroPoint = 0
1050 }, { // param21
1051 .channelQuant = {},
1052 .data = TestBuffer::createFromVector<int32_t>({0}),
1053 .dimensions = {},
1054 .isIgnored = false,
1055 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1056 .numberOfConsumers = 1,
1057 .scale = 0.0f,
1058 .type = TestOperandType::INT32,
1059 .zeroPoint = 0
1060 }},
1061 .operations = {{
1062 .inputs = {4, 5, 6},
1063 .outputs = {0},
1064 .type = TestOperationType::ADD
1065 }, {
1066 .inputs = {0, 1, 2},
1067 .outputs = {3},
1068 .type = TestOperationType::GATHER
1069 }},
1070 .outputIndexes = {3}
1071 },
1072 .minSupportedVersion = TestHalVersion::UNKNOWN,
1073 .referenced = {}
1074 };
1075 return model;
1076 }
1077
1078 const auto dummy_test_model_relaxed_all_inputs_as_internal_2 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_2", get_test_model_relaxed_all_inputs_as_internal_2());
1079
1080 } // namespace generated_tests::gather
1081
1082 namespace generated_tests::gather {
1083
get_test_model_quant8_2()1084 const TestModel& get_test_model_quant8_2() {
1085 static TestModel model = {
1086 .expectFailure = false,
1087 .expectedMultinomialDistributionTolerance = 0,
1088 .isRelaxed = false,
1089 .main = {
1090 .inputIndexes = {0},
1091 .operands = {{ // input01
1092 .channelQuant = {},
1093 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
1094 .dimensions = {2, 2},
1095 .isIgnored = false,
1096 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1097 .numberOfConsumers = 1,
1098 .scale = 0.5f,
1099 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1100 .zeroPoint = 127
1101 }, { // param2
1102 .channelQuant = {},
1103 .data = TestBuffer::createFromVector<int32_t>({0}),
1104 .dimensions = {},
1105 .isIgnored = false,
1106 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1107 .numberOfConsumers = 1,
1108 .scale = 0.0f,
1109 .type = TestOperandType::INT32,
1110 .zeroPoint = 0
1111 }, { // param3
1112 .channelQuant = {},
1113 .data = TestBuffer::createFromVector<int32_t>({1}),
1114 .dimensions = {1},
1115 .isIgnored = false,
1116 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1117 .numberOfConsumers = 1,
1118 .scale = 0.0f,
1119 .type = TestOperandType::TENSOR_INT32,
1120 .zeroPoint = 0
1121 }, { // output01
1122 .channelQuant = {},
1123 .data = TestBuffer::createFromVector<uint8_t>({128, 129}),
1124 .dimensions = {1, 2},
1125 .isIgnored = false,
1126 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1127 .numberOfConsumers = 0,
1128 .scale = 0.5f,
1129 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1130 .zeroPoint = 127
1131 }},
1132 .operations = {{
1133 .inputs = {0, 1, 2},
1134 .outputs = {3},
1135 .type = TestOperationType::GATHER
1136 }},
1137 .outputIndexes = {3}
1138 },
1139 .minSupportedVersion = TestHalVersion::V1_2,
1140 .referenced = {}
1141 };
1142 return model;
1143 }
1144
1145 const auto dummy_test_model_quant8_2 = TestModelManager::get().add("gather_quant8_2", get_test_model_quant8_2());
1146
1147 } // namespace generated_tests::gather
1148
1149 namespace generated_tests::gather {
1150
get_test_model_quant8_all_inputs_as_internal_2()1151 const TestModel& get_test_model_quant8_all_inputs_as_internal_2() {
1152 static TestModel model = {
1153 .expectFailure = false,
1154 .expectedMultinomialDistributionTolerance = 0,
1155 .isRelaxed = false,
1156 .main = {
1157 .inputIndexes = {4},
1158 .operands = {{ // input01
1159 .channelQuant = {},
1160 .data = TestBuffer::createFromVector<uint8_t>({}),
1161 .dimensions = {2, 2},
1162 .isIgnored = false,
1163 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1164 .numberOfConsumers = 1,
1165 .scale = 0.5f,
1166 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1167 .zeroPoint = 127
1168 }, { // param2
1169 .channelQuant = {},
1170 .data = TestBuffer::createFromVector<int32_t>({0}),
1171 .dimensions = {},
1172 .isIgnored = false,
1173 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1174 .numberOfConsumers = 1,
1175 .scale = 0.0f,
1176 .type = TestOperandType::INT32,
1177 .zeroPoint = 0
1178 }, { // param3
1179 .channelQuant = {},
1180 .data = TestBuffer::createFromVector<int32_t>({1}),
1181 .dimensions = {1},
1182 .isIgnored = false,
1183 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1184 .numberOfConsumers = 1,
1185 .scale = 0.0f,
1186 .type = TestOperandType::TENSOR_INT32,
1187 .zeroPoint = 0
1188 }, { // output01
1189 .channelQuant = {},
1190 .data = TestBuffer::createFromVector<uint8_t>({128, 129}),
1191 .dimensions = {1, 2},
1192 .isIgnored = false,
1193 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1194 .numberOfConsumers = 0,
1195 .scale = 0.5f,
1196 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1197 .zeroPoint = 127
1198 }, { // input01_new
1199 .channelQuant = {},
1200 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
1201 .dimensions = {2, 2},
1202 .isIgnored = false,
1203 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1204 .numberOfConsumers = 1,
1205 .scale = 0.5f,
1206 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1207 .zeroPoint = 127
1208 }, { // placeholder6
1209 .channelQuant = {},
1210 .data = TestBuffer::createFromVector<uint8_t>({127}),
1211 .dimensions = {1},
1212 .isIgnored = false,
1213 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1214 .numberOfConsumers = 1,
1215 .scale = 0.5f,
1216 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1217 .zeroPoint = 127
1218 }, { // param22
1219 .channelQuant = {},
1220 .data = TestBuffer::createFromVector<int32_t>({0}),
1221 .dimensions = {},
1222 .isIgnored = false,
1223 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1224 .numberOfConsumers = 1,
1225 .scale = 0.0f,
1226 .type = TestOperandType::INT32,
1227 .zeroPoint = 0
1228 }},
1229 .operations = {{
1230 .inputs = {4, 5, 6},
1231 .outputs = {0},
1232 .type = TestOperationType::ADD
1233 }, {
1234 .inputs = {0, 1, 2},
1235 .outputs = {3},
1236 .type = TestOperationType::GATHER
1237 }},
1238 .outputIndexes = {3}
1239 },
1240 .minSupportedVersion = TestHalVersion::V1_2,
1241 .referenced = {}
1242 };
1243 return model;
1244 }
1245
1246 const auto dummy_test_model_quant8_all_inputs_as_internal_2 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_2", get_test_model_quant8_all_inputs_as_internal_2());
1247
1248 } // namespace generated_tests::gather
1249
1250 namespace generated_tests::gather {
1251
get_test_model_int32_2()1252 const TestModel& get_test_model_int32_2() {
1253 static TestModel model = {
1254 .expectFailure = false,
1255 .expectedMultinomialDistributionTolerance = 0,
1256 .isRelaxed = false,
1257 .main = {
1258 .inputIndexes = {0},
1259 .operands = {{ // input01
1260 .channelQuant = {},
1261 .data = TestBuffer::createFromVector<int32_t>({-2, 0, 1, 1}),
1262 .dimensions = {2, 2},
1263 .isIgnored = false,
1264 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1265 .numberOfConsumers = 1,
1266 .scale = 0.0f,
1267 .type = TestOperandType::TENSOR_INT32,
1268 .zeroPoint = 0
1269 }, { // param2
1270 .channelQuant = {},
1271 .data = TestBuffer::createFromVector<int32_t>({0}),
1272 .dimensions = {},
1273 .isIgnored = false,
1274 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1275 .numberOfConsumers = 1,
1276 .scale = 0.0f,
1277 .type = TestOperandType::INT32,
1278 .zeroPoint = 0
1279 }, { // param3
1280 .channelQuant = {},
1281 .data = TestBuffer::createFromVector<int32_t>({1}),
1282 .dimensions = {1},
1283 .isIgnored = false,
1284 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1285 .numberOfConsumers = 1,
1286 .scale = 0.0f,
1287 .type = TestOperandType::TENSOR_INT32,
1288 .zeroPoint = 0
1289 }, { // output01
1290 .channelQuant = {},
1291 .data = TestBuffer::createFromVector<int32_t>({1, 1}),
1292 .dimensions = {1, 2},
1293 .isIgnored = false,
1294 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1295 .numberOfConsumers = 0,
1296 .scale = 0.0f,
1297 .type = TestOperandType::TENSOR_INT32,
1298 .zeroPoint = 0
1299 }},
1300 .operations = {{
1301 .inputs = {0, 1, 2},
1302 .outputs = {3},
1303 .type = TestOperationType::GATHER
1304 }},
1305 .outputIndexes = {3}
1306 },
1307 .minSupportedVersion = TestHalVersion::V1_2,
1308 .referenced = {}
1309 };
1310 return model;
1311 }
1312
1313 const auto dummy_test_model_int32_2 = TestModelManager::get().add("gather_int32_2", get_test_model_int32_2());
1314
1315 } // namespace generated_tests::gather
1316
1317 namespace generated_tests::gather {
1318
get_test_model_float16_2()1319 const TestModel& get_test_model_float16_2() {
1320 static TestModel model = {
1321 .expectFailure = false,
1322 .expectedMultinomialDistributionTolerance = 0,
1323 .isRelaxed = false,
1324 .main = {
1325 .inputIndexes = {0},
1326 .operands = {{ // input01
1327 .channelQuant = {},
1328 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
1329 .dimensions = {2, 2},
1330 .isIgnored = false,
1331 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1332 .numberOfConsumers = 1,
1333 .scale = 0.0f,
1334 .type = TestOperandType::TENSOR_FLOAT16,
1335 .zeroPoint = 0
1336 }, { // param2
1337 .channelQuant = {},
1338 .data = TestBuffer::createFromVector<int32_t>({0}),
1339 .dimensions = {},
1340 .isIgnored = false,
1341 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1342 .numberOfConsumers = 1,
1343 .scale = 0.0f,
1344 .type = TestOperandType::INT32,
1345 .zeroPoint = 0
1346 }, { // param3
1347 .channelQuant = {},
1348 .data = TestBuffer::createFromVector<int32_t>({1}),
1349 .dimensions = {1},
1350 .isIgnored = false,
1351 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1352 .numberOfConsumers = 1,
1353 .scale = 0.0f,
1354 .type = TestOperandType::TENSOR_INT32,
1355 .zeroPoint = 0
1356 }, { // output01
1357 .channelQuant = {},
1358 .data = TestBuffer::createFromVector<_Float16>({0.699999988079071f, 0.800000011920929f}),
1359 .dimensions = {1, 2},
1360 .isIgnored = false,
1361 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1362 .numberOfConsumers = 0,
1363 .scale = 0.0f,
1364 .type = TestOperandType::TENSOR_FLOAT16,
1365 .zeroPoint = 0
1366 }},
1367 .operations = {{
1368 .inputs = {0, 1, 2},
1369 .outputs = {3},
1370 .type = TestOperationType::GATHER
1371 }},
1372 .outputIndexes = {3}
1373 },
1374 .minSupportedVersion = TestHalVersion::V1_2,
1375 .referenced = {}
1376 };
1377 return model;
1378 }
1379
1380 const auto dummy_test_model_float16_2 = TestModelManager::get().add("gather_float16_2", get_test_model_float16_2());
1381
1382 } // namespace generated_tests::gather
1383
1384 namespace generated_tests::gather {
1385
get_test_model_float16_all_inputs_as_internal_2()1386 const TestModel& get_test_model_float16_all_inputs_as_internal_2() {
1387 static TestModel model = {
1388 .expectFailure = false,
1389 .expectedMultinomialDistributionTolerance = 0,
1390 .isRelaxed = false,
1391 .main = {
1392 .inputIndexes = {4},
1393 .operands = {{ // input01
1394 .channelQuant = {},
1395 .data = TestBuffer::createFromVector<_Float16>({}),
1396 .dimensions = {2, 2},
1397 .isIgnored = false,
1398 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1399 .numberOfConsumers = 1,
1400 .scale = 0.0f,
1401 .type = TestOperandType::TENSOR_FLOAT16,
1402 .zeroPoint = 0
1403 }, { // param2
1404 .channelQuant = {},
1405 .data = TestBuffer::createFromVector<int32_t>({0}),
1406 .dimensions = {},
1407 .isIgnored = false,
1408 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1409 .numberOfConsumers = 1,
1410 .scale = 0.0f,
1411 .type = TestOperandType::INT32,
1412 .zeroPoint = 0
1413 }, { // param3
1414 .channelQuant = {},
1415 .data = TestBuffer::createFromVector<int32_t>({1}),
1416 .dimensions = {1},
1417 .isIgnored = false,
1418 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1419 .numberOfConsumers = 1,
1420 .scale = 0.0f,
1421 .type = TestOperandType::TENSOR_INT32,
1422 .zeroPoint = 0
1423 }, { // output01
1424 .channelQuant = {},
1425 .data = TestBuffer::createFromVector<_Float16>({0.699999988079071f, 0.800000011920929f}),
1426 .dimensions = {1, 2},
1427 .isIgnored = false,
1428 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1429 .numberOfConsumers = 0,
1430 .scale = 0.0f,
1431 .type = TestOperandType::TENSOR_FLOAT16,
1432 .zeroPoint = 0
1433 }, { // input01_new
1434 .channelQuant = {},
1435 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
1436 .dimensions = {2, 2},
1437 .isIgnored = false,
1438 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1439 .numberOfConsumers = 1,
1440 .scale = 0.0f,
1441 .type = TestOperandType::TENSOR_FLOAT16,
1442 .zeroPoint = 0
1443 }, { // placeholder7
1444 .channelQuant = {},
1445 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1446 .dimensions = {1},
1447 .isIgnored = false,
1448 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1449 .numberOfConsumers = 1,
1450 .scale = 0.0f,
1451 .type = TestOperandType::TENSOR_FLOAT16,
1452 .zeroPoint = 0
1453 }, { // param23
1454 .channelQuant = {},
1455 .data = TestBuffer::createFromVector<int32_t>({0}),
1456 .dimensions = {},
1457 .isIgnored = false,
1458 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1459 .numberOfConsumers = 1,
1460 .scale = 0.0f,
1461 .type = TestOperandType::INT32,
1462 .zeroPoint = 0
1463 }},
1464 .operations = {{
1465 .inputs = {4, 5, 6},
1466 .outputs = {0},
1467 .type = TestOperationType::ADD
1468 }, {
1469 .inputs = {0, 1, 2},
1470 .outputs = {3},
1471 .type = TestOperationType::GATHER
1472 }},
1473 .outputIndexes = {3}
1474 },
1475 .minSupportedVersion = TestHalVersion::V1_2,
1476 .referenced = {}
1477 };
1478 return model;
1479 }
1480
1481 const auto dummy_test_model_float16_all_inputs_as_internal_2 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_2", get_test_model_float16_all_inputs_as_internal_2());
1482
1483 } // namespace generated_tests::gather
1484
1485 namespace generated_tests::gather {
1486
get_test_model_3()1487 const TestModel& get_test_model_3() {
1488 static TestModel model = {
1489 .expectFailure = false,
1490 .expectedMultinomialDistributionTolerance = 0,
1491 .isRelaxed = false,
1492 .main = {
1493 .inputIndexes = {0},
1494 .operands = {{ // input02
1495 .channelQuant = {},
1496 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
1497 .dimensions = {3},
1498 .isIgnored = false,
1499 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1500 .numberOfConsumers = 1,
1501 .scale = 0.0f,
1502 .type = TestOperandType::TENSOR_FLOAT32,
1503 .zeroPoint = 0
1504 }, { // param4
1505 .channelQuant = {},
1506 .data = TestBuffer::createFromVector<int32_t>({0}),
1507 .dimensions = {},
1508 .isIgnored = false,
1509 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1510 .numberOfConsumers = 1,
1511 .scale = 0.0f,
1512 .type = TestOperandType::INT32,
1513 .zeroPoint = 0
1514 }, { // param5
1515 .channelQuant = {},
1516 .data = TestBuffer::createFromVector<int32_t>({1}),
1517 .dimensions = {1},
1518 .isIgnored = false,
1519 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1520 .numberOfConsumers = 1,
1521 .scale = 0.0f,
1522 .type = TestOperandType::TENSOR_INT32,
1523 .zeroPoint = 0
1524 }, { // output02
1525 .channelQuant = {},
1526 .data = TestBuffer::createFromVector<float>({2.0f}),
1527 .dimensions = {1},
1528 .isIgnored = false,
1529 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1530 .numberOfConsumers = 0,
1531 .scale = 0.0f,
1532 .type = TestOperandType::TENSOR_FLOAT32,
1533 .zeroPoint = 0
1534 }},
1535 .operations = {{
1536 .inputs = {0, 1, 2},
1537 .outputs = {3},
1538 .type = TestOperationType::GATHER
1539 }},
1540 .outputIndexes = {3}
1541 },
1542 .minSupportedVersion = TestHalVersion::V1_2,
1543 .referenced = {}
1544 };
1545 return model;
1546 }
1547
1548 const auto dummy_test_model_3 = TestModelManager::get().add("gather_3", get_test_model_3());
1549
1550 } // namespace generated_tests::gather
1551
1552 namespace generated_tests::gather {
1553
get_test_model_all_inputs_as_internal_3()1554 const TestModel& get_test_model_all_inputs_as_internal_3() {
1555 static TestModel model = {
1556 .expectFailure = false,
1557 .expectedMultinomialDistributionTolerance = 0,
1558 .isRelaxed = false,
1559 .main = {
1560 .inputIndexes = {4},
1561 .operands = {{ // input02
1562 .channelQuant = {},
1563 .data = TestBuffer::createFromVector<float>({}),
1564 .dimensions = {3},
1565 .isIgnored = false,
1566 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1567 .numberOfConsumers = 1,
1568 .scale = 0.0f,
1569 .type = TestOperandType::TENSOR_FLOAT32,
1570 .zeroPoint = 0
1571 }, { // param4
1572 .channelQuant = {},
1573 .data = TestBuffer::createFromVector<int32_t>({0}),
1574 .dimensions = {},
1575 .isIgnored = false,
1576 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1577 .numberOfConsumers = 1,
1578 .scale = 0.0f,
1579 .type = TestOperandType::INT32,
1580 .zeroPoint = 0
1581 }, { // param5
1582 .channelQuant = {},
1583 .data = TestBuffer::createFromVector<int32_t>({1}),
1584 .dimensions = {1},
1585 .isIgnored = false,
1586 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1587 .numberOfConsumers = 1,
1588 .scale = 0.0f,
1589 .type = TestOperandType::TENSOR_INT32,
1590 .zeroPoint = 0
1591 }, { // output02
1592 .channelQuant = {},
1593 .data = TestBuffer::createFromVector<float>({2.0f}),
1594 .dimensions = {1},
1595 .isIgnored = false,
1596 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1597 .numberOfConsumers = 0,
1598 .scale = 0.0f,
1599 .type = TestOperandType::TENSOR_FLOAT32,
1600 .zeroPoint = 0
1601 }, { // input02_new
1602 .channelQuant = {},
1603 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
1604 .dimensions = {3},
1605 .isIgnored = false,
1606 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1607 .numberOfConsumers = 1,
1608 .scale = 0.0f,
1609 .type = TestOperandType::TENSOR_FLOAT32,
1610 .zeroPoint = 0
1611 }, { // placeholder8
1612 .channelQuant = {},
1613 .data = TestBuffer::createFromVector<float>({0.0f}),
1614 .dimensions = {1},
1615 .isIgnored = false,
1616 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1617 .numberOfConsumers = 1,
1618 .scale = 0.0f,
1619 .type = TestOperandType::TENSOR_FLOAT32,
1620 .zeroPoint = 0
1621 }, { // param24
1622 .channelQuant = {},
1623 .data = TestBuffer::createFromVector<int32_t>({0}),
1624 .dimensions = {},
1625 .isIgnored = false,
1626 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1627 .numberOfConsumers = 1,
1628 .scale = 0.0f,
1629 .type = TestOperandType::INT32,
1630 .zeroPoint = 0
1631 }},
1632 .operations = {{
1633 .inputs = {4, 5, 6},
1634 .outputs = {0},
1635 .type = TestOperationType::ADD
1636 }, {
1637 .inputs = {0, 1, 2},
1638 .outputs = {3},
1639 .type = TestOperationType::GATHER
1640 }},
1641 .outputIndexes = {3}
1642 },
1643 .minSupportedVersion = TestHalVersion::V1_2,
1644 .referenced = {}
1645 };
1646 return model;
1647 }
1648
1649 const auto dummy_test_model_all_inputs_as_internal_3 = TestModelManager::get().add("gather_all_inputs_as_internal_3", get_test_model_all_inputs_as_internal_3());
1650
1651 } // namespace generated_tests::gather
1652
1653 namespace generated_tests::gather {
1654
get_test_model_relaxed_3()1655 const TestModel& get_test_model_relaxed_3() {
1656 static TestModel model = {
1657 .expectFailure = false,
1658 .expectedMultinomialDistributionTolerance = 0,
1659 .isRelaxed = true,
1660 .main = {
1661 .inputIndexes = {0},
1662 .operands = {{ // input02
1663 .channelQuant = {},
1664 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
1665 .dimensions = {3},
1666 .isIgnored = false,
1667 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1668 .numberOfConsumers = 1,
1669 .scale = 0.0f,
1670 .type = TestOperandType::TENSOR_FLOAT32,
1671 .zeroPoint = 0
1672 }, { // param4
1673 .channelQuant = {},
1674 .data = TestBuffer::createFromVector<int32_t>({0}),
1675 .dimensions = {},
1676 .isIgnored = false,
1677 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1678 .numberOfConsumers = 1,
1679 .scale = 0.0f,
1680 .type = TestOperandType::INT32,
1681 .zeroPoint = 0
1682 }, { // param5
1683 .channelQuant = {},
1684 .data = TestBuffer::createFromVector<int32_t>({1}),
1685 .dimensions = {1},
1686 .isIgnored = false,
1687 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1688 .numberOfConsumers = 1,
1689 .scale = 0.0f,
1690 .type = TestOperandType::TENSOR_INT32,
1691 .zeroPoint = 0
1692 }, { // output02
1693 .channelQuant = {},
1694 .data = TestBuffer::createFromVector<float>({2.0f}),
1695 .dimensions = {1},
1696 .isIgnored = false,
1697 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1698 .numberOfConsumers = 0,
1699 .scale = 0.0f,
1700 .type = TestOperandType::TENSOR_FLOAT32,
1701 .zeroPoint = 0
1702 }},
1703 .operations = {{
1704 .inputs = {0, 1, 2},
1705 .outputs = {3},
1706 .type = TestOperationType::GATHER
1707 }},
1708 .outputIndexes = {3}
1709 },
1710 .minSupportedVersion = TestHalVersion::UNKNOWN,
1711 .referenced = {}
1712 };
1713 return model;
1714 }
1715
1716 const auto dummy_test_model_relaxed_3 = TestModelManager::get().add("gather_relaxed_3", get_test_model_relaxed_3());
1717
1718 } // namespace generated_tests::gather
1719
1720 namespace generated_tests::gather {
1721
get_test_model_relaxed_all_inputs_as_internal_3()1722 const TestModel& get_test_model_relaxed_all_inputs_as_internal_3() {
1723 static TestModel model = {
1724 .expectFailure = false,
1725 .expectedMultinomialDistributionTolerance = 0,
1726 .isRelaxed = true,
1727 .main = {
1728 .inputIndexes = {4},
1729 .operands = {{ // input02
1730 .channelQuant = {},
1731 .data = TestBuffer::createFromVector<float>({}),
1732 .dimensions = {3},
1733 .isIgnored = false,
1734 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1735 .numberOfConsumers = 1,
1736 .scale = 0.0f,
1737 .type = TestOperandType::TENSOR_FLOAT32,
1738 .zeroPoint = 0
1739 }, { // param4
1740 .channelQuant = {},
1741 .data = TestBuffer::createFromVector<int32_t>({0}),
1742 .dimensions = {},
1743 .isIgnored = false,
1744 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1745 .numberOfConsumers = 1,
1746 .scale = 0.0f,
1747 .type = TestOperandType::INT32,
1748 .zeroPoint = 0
1749 }, { // param5
1750 .channelQuant = {},
1751 .data = TestBuffer::createFromVector<int32_t>({1}),
1752 .dimensions = {1},
1753 .isIgnored = false,
1754 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1755 .numberOfConsumers = 1,
1756 .scale = 0.0f,
1757 .type = TestOperandType::TENSOR_INT32,
1758 .zeroPoint = 0
1759 }, { // output02
1760 .channelQuant = {},
1761 .data = TestBuffer::createFromVector<float>({2.0f}),
1762 .dimensions = {1},
1763 .isIgnored = false,
1764 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1765 .numberOfConsumers = 0,
1766 .scale = 0.0f,
1767 .type = TestOperandType::TENSOR_FLOAT32,
1768 .zeroPoint = 0
1769 }, { // input02_new
1770 .channelQuant = {},
1771 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
1772 .dimensions = {3},
1773 .isIgnored = false,
1774 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1775 .numberOfConsumers = 1,
1776 .scale = 0.0f,
1777 .type = TestOperandType::TENSOR_FLOAT32,
1778 .zeroPoint = 0
1779 }, { // placeholder9
1780 .channelQuant = {},
1781 .data = TestBuffer::createFromVector<float>({0.0f}),
1782 .dimensions = {1},
1783 .isIgnored = false,
1784 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1785 .numberOfConsumers = 1,
1786 .scale = 0.0f,
1787 .type = TestOperandType::TENSOR_FLOAT32,
1788 .zeroPoint = 0
1789 }, { // param25
1790 .channelQuant = {},
1791 .data = TestBuffer::createFromVector<int32_t>({0}),
1792 .dimensions = {},
1793 .isIgnored = false,
1794 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1795 .numberOfConsumers = 1,
1796 .scale = 0.0f,
1797 .type = TestOperandType::INT32,
1798 .zeroPoint = 0
1799 }},
1800 .operations = {{
1801 .inputs = {4, 5, 6},
1802 .outputs = {0},
1803 .type = TestOperationType::ADD
1804 }, {
1805 .inputs = {0, 1, 2},
1806 .outputs = {3},
1807 .type = TestOperationType::GATHER
1808 }},
1809 .outputIndexes = {3}
1810 },
1811 .minSupportedVersion = TestHalVersion::UNKNOWN,
1812 .referenced = {}
1813 };
1814 return model;
1815 }
1816
1817 const auto dummy_test_model_relaxed_all_inputs_as_internal_3 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_3", get_test_model_relaxed_all_inputs_as_internal_3());
1818
1819 } // namespace generated_tests::gather
1820
1821 namespace generated_tests::gather {
1822
get_test_model_quant8_3()1823 const TestModel& get_test_model_quant8_3() {
1824 static TestModel model = {
1825 .expectFailure = false,
1826 .expectedMultinomialDistributionTolerance = 0,
1827 .isRelaxed = false,
1828 .main = {
1829 .inputIndexes = {0},
1830 .operands = {{ // input02
1831 .channelQuant = {},
1832 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133}),
1833 .dimensions = {3},
1834 .isIgnored = false,
1835 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1836 .numberOfConsumers = 1,
1837 .scale = 0.5f,
1838 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1839 .zeroPoint = 127
1840 }, { // param4
1841 .channelQuant = {},
1842 .data = TestBuffer::createFromVector<int32_t>({0}),
1843 .dimensions = {},
1844 .isIgnored = false,
1845 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1846 .numberOfConsumers = 1,
1847 .scale = 0.0f,
1848 .type = TestOperandType::INT32,
1849 .zeroPoint = 0
1850 }, { // param5
1851 .channelQuant = {},
1852 .data = TestBuffer::createFromVector<int32_t>({1}),
1853 .dimensions = {1},
1854 .isIgnored = false,
1855 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1856 .numberOfConsumers = 1,
1857 .scale = 0.0f,
1858 .type = TestOperandType::TENSOR_INT32,
1859 .zeroPoint = 0
1860 }, { // output02
1861 .channelQuant = {},
1862 .data = TestBuffer::createFromVector<uint8_t>({131}),
1863 .dimensions = {1},
1864 .isIgnored = false,
1865 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1866 .numberOfConsumers = 0,
1867 .scale = 0.5f,
1868 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1869 .zeroPoint = 127
1870 }},
1871 .operations = {{
1872 .inputs = {0, 1, 2},
1873 .outputs = {3},
1874 .type = TestOperationType::GATHER
1875 }},
1876 .outputIndexes = {3}
1877 },
1878 .minSupportedVersion = TestHalVersion::V1_2,
1879 .referenced = {}
1880 };
1881 return model;
1882 }
1883
1884 const auto dummy_test_model_quant8_3 = TestModelManager::get().add("gather_quant8_3", get_test_model_quant8_3());
1885
1886 } // namespace generated_tests::gather
1887
1888 namespace generated_tests::gather {
1889
get_test_model_quant8_all_inputs_as_internal_3()1890 const TestModel& get_test_model_quant8_all_inputs_as_internal_3() {
1891 static TestModel model = {
1892 .expectFailure = false,
1893 .expectedMultinomialDistributionTolerance = 0,
1894 .isRelaxed = false,
1895 .main = {
1896 .inputIndexes = {4},
1897 .operands = {{ // input02
1898 .channelQuant = {},
1899 .data = TestBuffer::createFromVector<uint8_t>({}),
1900 .dimensions = {3},
1901 .isIgnored = false,
1902 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1903 .numberOfConsumers = 1,
1904 .scale = 0.5f,
1905 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1906 .zeroPoint = 127
1907 }, { // param4
1908 .channelQuant = {},
1909 .data = TestBuffer::createFromVector<int32_t>({0}),
1910 .dimensions = {},
1911 .isIgnored = false,
1912 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1913 .numberOfConsumers = 1,
1914 .scale = 0.0f,
1915 .type = TestOperandType::INT32,
1916 .zeroPoint = 0
1917 }, { // param5
1918 .channelQuant = {},
1919 .data = TestBuffer::createFromVector<int32_t>({1}),
1920 .dimensions = {1},
1921 .isIgnored = false,
1922 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1923 .numberOfConsumers = 1,
1924 .scale = 0.0f,
1925 .type = TestOperandType::TENSOR_INT32,
1926 .zeroPoint = 0
1927 }, { // output02
1928 .channelQuant = {},
1929 .data = TestBuffer::createFromVector<uint8_t>({131}),
1930 .dimensions = {1},
1931 .isIgnored = false,
1932 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1933 .numberOfConsumers = 0,
1934 .scale = 0.5f,
1935 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1936 .zeroPoint = 127
1937 }, { // input02_new
1938 .channelQuant = {},
1939 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133}),
1940 .dimensions = {3},
1941 .isIgnored = false,
1942 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1943 .numberOfConsumers = 1,
1944 .scale = 0.5f,
1945 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1946 .zeroPoint = 127
1947 }, { // placeholder10
1948 .channelQuant = {},
1949 .data = TestBuffer::createFromVector<uint8_t>({127}),
1950 .dimensions = {1},
1951 .isIgnored = false,
1952 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1953 .numberOfConsumers = 1,
1954 .scale = 0.5f,
1955 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1956 .zeroPoint = 127
1957 }, { // param26
1958 .channelQuant = {},
1959 .data = TestBuffer::createFromVector<int32_t>({0}),
1960 .dimensions = {},
1961 .isIgnored = false,
1962 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1963 .numberOfConsumers = 1,
1964 .scale = 0.0f,
1965 .type = TestOperandType::INT32,
1966 .zeroPoint = 0
1967 }},
1968 .operations = {{
1969 .inputs = {4, 5, 6},
1970 .outputs = {0},
1971 .type = TestOperationType::ADD
1972 }, {
1973 .inputs = {0, 1, 2},
1974 .outputs = {3},
1975 .type = TestOperationType::GATHER
1976 }},
1977 .outputIndexes = {3}
1978 },
1979 .minSupportedVersion = TestHalVersion::V1_2,
1980 .referenced = {}
1981 };
1982 return model;
1983 }
1984
1985 const auto dummy_test_model_quant8_all_inputs_as_internal_3 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_3", get_test_model_quant8_all_inputs_as_internal_3());
1986
1987 } // namespace generated_tests::gather
1988
1989 namespace generated_tests::gather {
1990
get_test_model_int32_3()1991 const TestModel& get_test_model_int32_3() {
1992 static TestModel model = {
1993 .expectFailure = false,
1994 .expectedMultinomialDistributionTolerance = 0,
1995 .isRelaxed = false,
1996 .main = {
1997 .inputIndexes = {0},
1998 .operands = {{ // input02
1999 .channelQuant = {},
2000 .data = TestBuffer::createFromVector<int32_t>({1, 2, 3}),
2001 .dimensions = {3},
2002 .isIgnored = false,
2003 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2004 .numberOfConsumers = 1,
2005 .scale = 0.0f,
2006 .type = TestOperandType::TENSOR_INT32,
2007 .zeroPoint = 0
2008 }, { // param4
2009 .channelQuant = {},
2010 .data = TestBuffer::createFromVector<int32_t>({0}),
2011 .dimensions = {},
2012 .isIgnored = false,
2013 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2014 .numberOfConsumers = 1,
2015 .scale = 0.0f,
2016 .type = TestOperandType::INT32,
2017 .zeroPoint = 0
2018 }, { // param5
2019 .channelQuant = {},
2020 .data = TestBuffer::createFromVector<int32_t>({1}),
2021 .dimensions = {1},
2022 .isIgnored = false,
2023 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2024 .numberOfConsumers = 1,
2025 .scale = 0.0f,
2026 .type = TestOperandType::TENSOR_INT32,
2027 .zeroPoint = 0
2028 }, { // output02
2029 .channelQuant = {},
2030 .data = TestBuffer::createFromVector<int32_t>({2}),
2031 .dimensions = {1},
2032 .isIgnored = false,
2033 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2034 .numberOfConsumers = 0,
2035 .scale = 0.0f,
2036 .type = TestOperandType::TENSOR_INT32,
2037 .zeroPoint = 0
2038 }},
2039 .operations = {{
2040 .inputs = {0, 1, 2},
2041 .outputs = {3},
2042 .type = TestOperationType::GATHER
2043 }},
2044 .outputIndexes = {3}
2045 },
2046 .minSupportedVersion = TestHalVersion::V1_2,
2047 .referenced = {}
2048 };
2049 return model;
2050 }
2051
2052 const auto dummy_test_model_int32_3 = TestModelManager::get().add("gather_int32_3", get_test_model_int32_3());
2053
2054 } // namespace generated_tests::gather
2055
2056 namespace generated_tests::gather {
2057
get_test_model_float16_3()2058 const TestModel& get_test_model_float16_3() {
2059 static TestModel model = {
2060 .expectFailure = false,
2061 .expectedMultinomialDistributionTolerance = 0,
2062 .isRelaxed = false,
2063 .main = {
2064 .inputIndexes = {0},
2065 .operands = {{ // input02
2066 .channelQuant = {},
2067 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f}),
2068 .dimensions = {3},
2069 .isIgnored = false,
2070 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2071 .numberOfConsumers = 1,
2072 .scale = 0.0f,
2073 .type = TestOperandType::TENSOR_FLOAT16,
2074 .zeroPoint = 0
2075 }, { // param4
2076 .channelQuant = {},
2077 .data = TestBuffer::createFromVector<int32_t>({0}),
2078 .dimensions = {},
2079 .isIgnored = false,
2080 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2081 .numberOfConsumers = 1,
2082 .scale = 0.0f,
2083 .type = TestOperandType::INT32,
2084 .zeroPoint = 0
2085 }, { // param5
2086 .channelQuant = {},
2087 .data = TestBuffer::createFromVector<int32_t>({1}),
2088 .dimensions = {1},
2089 .isIgnored = false,
2090 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2091 .numberOfConsumers = 1,
2092 .scale = 0.0f,
2093 .type = TestOperandType::TENSOR_INT32,
2094 .zeroPoint = 0
2095 }, { // output02
2096 .channelQuant = {},
2097 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
2098 .dimensions = {1},
2099 .isIgnored = false,
2100 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2101 .numberOfConsumers = 0,
2102 .scale = 0.0f,
2103 .type = TestOperandType::TENSOR_FLOAT16,
2104 .zeroPoint = 0
2105 }},
2106 .operations = {{
2107 .inputs = {0, 1, 2},
2108 .outputs = {3},
2109 .type = TestOperationType::GATHER
2110 }},
2111 .outputIndexes = {3}
2112 },
2113 .minSupportedVersion = TestHalVersion::V1_2,
2114 .referenced = {}
2115 };
2116 return model;
2117 }
2118
2119 const auto dummy_test_model_float16_3 = TestModelManager::get().add("gather_float16_3", get_test_model_float16_3());
2120
2121 } // namespace generated_tests::gather
2122
2123 namespace generated_tests::gather {
2124
get_test_model_float16_all_inputs_as_internal_3()2125 const TestModel& get_test_model_float16_all_inputs_as_internal_3() {
2126 static TestModel model = {
2127 .expectFailure = false,
2128 .expectedMultinomialDistributionTolerance = 0,
2129 .isRelaxed = false,
2130 .main = {
2131 .inputIndexes = {4},
2132 .operands = {{ // input02
2133 .channelQuant = {},
2134 .data = TestBuffer::createFromVector<_Float16>({}),
2135 .dimensions = {3},
2136 .isIgnored = false,
2137 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2138 .numberOfConsumers = 1,
2139 .scale = 0.0f,
2140 .type = TestOperandType::TENSOR_FLOAT16,
2141 .zeroPoint = 0
2142 }, { // param4
2143 .channelQuant = {},
2144 .data = TestBuffer::createFromVector<int32_t>({0}),
2145 .dimensions = {},
2146 .isIgnored = false,
2147 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2148 .numberOfConsumers = 1,
2149 .scale = 0.0f,
2150 .type = TestOperandType::INT32,
2151 .zeroPoint = 0
2152 }, { // param5
2153 .channelQuant = {},
2154 .data = TestBuffer::createFromVector<int32_t>({1}),
2155 .dimensions = {1},
2156 .isIgnored = false,
2157 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2158 .numberOfConsumers = 1,
2159 .scale = 0.0f,
2160 .type = TestOperandType::TENSOR_INT32,
2161 .zeroPoint = 0
2162 }, { // output02
2163 .channelQuant = {},
2164 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
2165 .dimensions = {1},
2166 .isIgnored = false,
2167 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2168 .numberOfConsumers = 0,
2169 .scale = 0.0f,
2170 .type = TestOperandType::TENSOR_FLOAT16,
2171 .zeroPoint = 0
2172 }, { // input02_new
2173 .channelQuant = {},
2174 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f}),
2175 .dimensions = {3},
2176 .isIgnored = false,
2177 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2178 .numberOfConsumers = 1,
2179 .scale = 0.0f,
2180 .type = TestOperandType::TENSOR_FLOAT16,
2181 .zeroPoint = 0
2182 }, { // placeholder11
2183 .channelQuant = {},
2184 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
2185 .dimensions = {1},
2186 .isIgnored = false,
2187 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2188 .numberOfConsumers = 1,
2189 .scale = 0.0f,
2190 .type = TestOperandType::TENSOR_FLOAT16,
2191 .zeroPoint = 0
2192 }, { // param27
2193 .channelQuant = {},
2194 .data = TestBuffer::createFromVector<int32_t>({0}),
2195 .dimensions = {},
2196 .isIgnored = false,
2197 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2198 .numberOfConsumers = 1,
2199 .scale = 0.0f,
2200 .type = TestOperandType::INT32,
2201 .zeroPoint = 0
2202 }},
2203 .operations = {{
2204 .inputs = {4, 5, 6},
2205 .outputs = {0},
2206 .type = TestOperationType::ADD
2207 }, {
2208 .inputs = {0, 1, 2},
2209 .outputs = {3},
2210 .type = TestOperationType::GATHER
2211 }},
2212 .outputIndexes = {3}
2213 },
2214 .minSupportedVersion = TestHalVersion::V1_2,
2215 .referenced = {}
2216 };
2217 return model;
2218 }
2219
2220 const auto dummy_test_model_float16_all_inputs_as_internal_3 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_3", get_test_model_float16_all_inputs_as_internal_3());
2221
2222 } // namespace generated_tests::gather
2223
2224 namespace generated_tests::gather {
2225
get_test_model_4()2226 const TestModel& get_test_model_4() {
2227 static TestModel model = {
2228 .expectFailure = false,
2229 .expectedMultinomialDistributionTolerance = 0,
2230 .isRelaxed = false,
2231 .main = {
2232 .inputIndexes = {0},
2233 .operands = {{ // input03
2234 .channelQuant = {},
2235 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
2236 .dimensions = {3},
2237 .isIgnored = false,
2238 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2239 .numberOfConsumers = 1,
2240 .scale = 0.0f,
2241 .type = TestOperandType::TENSOR_FLOAT32,
2242 .zeroPoint = 0
2243 }, { // param6
2244 .channelQuant = {},
2245 .data = TestBuffer::createFromVector<int32_t>({0}),
2246 .dimensions = {},
2247 .isIgnored = false,
2248 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2249 .numberOfConsumers = 1,
2250 .scale = 0.0f,
2251 .type = TestOperandType::INT32,
2252 .zeroPoint = 0
2253 }, { // param7
2254 .channelQuant = {},
2255 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2256 .dimensions = {2},
2257 .isIgnored = false,
2258 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2259 .numberOfConsumers = 1,
2260 .scale = 0.0f,
2261 .type = TestOperandType::TENSOR_INT32,
2262 .zeroPoint = 0
2263 }, { // output03
2264 .channelQuant = {},
2265 .data = TestBuffer::createFromVector<float>({2.0f, 1.0f}),
2266 .dimensions = {2},
2267 .isIgnored = false,
2268 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2269 .numberOfConsumers = 0,
2270 .scale = 0.0f,
2271 .type = TestOperandType::TENSOR_FLOAT32,
2272 .zeroPoint = 0
2273 }},
2274 .operations = {{
2275 .inputs = {0, 1, 2},
2276 .outputs = {3},
2277 .type = TestOperationType::GATHER
2278 }},
2279 .outputIndexes = {3}
2280 },
2281 .minSupportedVersion = TestHalVersion::V1_2,
2282 .referenced = {}
2283 };
2284 return model;
2285 }
2286
2287 const auto dummy_test_model_4 = TestModelManager::get().add("gather_4", get_test_model_4());
2288
2289 } // namespace generated_tests::gather
2290
2291 namespace generated_tests::gather {
2292
get_test_model_all_inputs_as_internal_4()2293 const TestModel& get_test_model_all_inputs_as_internal_4() {
2294 static TestModel model = {
2295 .expectFailure = false,
2296 .expectedMultinomialDistributionTolerance = 0,
2297 .isRelaxed = false,
2298 .main = {
2299 .inputIndexes = {4},
2300 .operands = {{ // input03
2301 .channelQuant = {},
2302 .data = TestBuffer::createFromVector<float>({}),
2303 .dimensions = {3},
2304 .isIgnored = false,
2305 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2306 .numberOfConsumers = 1,
2307 .scale = 0.0f,
2308 .type = TestOperandType::TENSOR_FLOAT32,
2309 .zeroPoint = 0
2310 }, { // param6
2311 .channelQuant = {},
2312 .data = TestBuffer::createFromVector<int32_t>({0}),
2313 .dimensions = {},
2314 .isIgnored = false,
2315 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2316 .numberOfConsumers = 1,
2317 .scale = 0.0f,
2318 .type = TestOperandType::INT32,
2319 .zeroPoint = 0
2320 }, { // param7
2321 .channelQuant = {},
2322 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2323 .dimensions = {2},
2324 .isIgnored = false,
2325 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2326 .numberOfConsumers = 1,
2327 .scale = 0.0f,
2328 .type = TestOperandType::TENSOR_INT32,
2329 .zeroPoint = 0
2330 }, { // output03
2331 .channelQuant = {},
2332 .data = TestBuffer::createFromVector<float>({2.0f, 1.0f}),
2333 .dimensions = {2},
2334 .isIgnored = false,
2335 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2336 .numberOfConsumers = 0,
2337 .scale = 0.0f,
2338 .type = TestOperandType::TENSOR_FLOAT32,
2339 .zeroPoint = 0
2340 }, { // input03_new
2341 .channelQuant = {},
2342 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
2343 .dimensions = {3},
2344 .isIgnored = false,
2345 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2346 .numberOfConsumers = 1,
2347 .scale = 0.0f,
2348 .type = TestOperandType::TENSOR_FLOAT32,
2349 .zeroPoint = 0
2350 }, { // placeholder12
2351 .channelQuant = {},
2352 .data = TestBuffer::createFromVector<float>({0.0f}),
2353 .dimensions = {1},
2354 .isIgnored = false,
2355 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2356 .numberOfConsumers = 1,
2357 .scale = 0.0f,
2358 .type = TestOperandType::TENSOR_FLOAT32,
2359 .zeroPoint = 0
2360 }, { // param28
2361 .channelQuant = {},
2362 .data = TestBuffer::createFromVector<int32_t>({0}),
2363 .dimensions = {},
2364 .isIgnored = false,
2365 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2366 .numberOfConsumers = 1,
2367 .scale = 0.0f,
2368 .type = TestOperandType::INT32,
2369 .zeroPoint = 0
2370 }},
2371 .operations = {{
2372 .inputs = {4, 5, 6},
2373 .outputs = {0},
2374 .type = TestOperationType::ADD
2375 }, {
2376 .inputs = {0, 1, 2},
2377 .outputs = {3},
2378 .type = TestOperationType::GATHER
2379 }},
2380 .outputIndexes = {3}
2381 },
2382 .minSupportedVersion = TestHalVersion::V1_2,
2383 .referenced = {}
2384 };
2385 return model;
2386 }
2387
2388 const auto dummy_test_model_all_inputs_as_internal_4 = TestModelManager::get().add("gather_all_inputs_as_internal_4", get_test_model_all_inputs_as_internal_4());
2389
2390 } // namespace generated_tests::gather
2391
2392 namespace generated_tests::gather {
2393
get_test_model_relaxed_4()2394 const TestModel& get_test_model_relaxed_4() {
2395 static TestModel model = {
2396 .expectFailure = false,
2397 .expectedMultinomialDistributionTolerance = 0,
2398 .isRelaxed = true,
2399 .main = {
2400 .inputIndexes = {0},
2401 .operands = {{ // input03
2402 .channelQuant = {},
2403 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
2404 .dimensions = {3},
2405 .isIgnored = false,
2406 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2407 .numberOfConsumers = 1,
2408 .scale = 0.0f,
2409 .type = TestOperandType::TENSOR_FLOAT32,
2410 .zeroPoint = 0
2411 }, { // param6
2412 .channelQuant = {},
2413 .data = TestBuffer::createFromVector<int32_t>({0}),
2414 .dimensions = {},
2415 .isIgnored = false,
2416 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2417 .numberOfConsumers = 1,
2418 .scale = 0.0f,
2419 .type = TestOperandType::INT32,
2420 .zeroPoint = 0
2421 }, { // param7
2422 .channelQuant = {},
2423 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2424 .dimensions = {2},
2425 .isIgnored = false,
2426 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2427 .numberOfConsumers = 1,
2428 .scale = 0.0f,
2429 .type = TestOperandType::TENSOR_INT32,
2430 .zeroPoint = 0
2431 }, { // output03
2432 .channelQuant = {},
2433 .data = TestBuffer::createFromVector<float>({2.0f, 1.0f}),
2434 .dimensions = {2},
2435 .isIgnored = false,
2436 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2437 .numberOfConsumers = 0,
2438 .scale = 0.0f,
2439 .type = TestOperandType::TENSOR_FLOAT32,
2440 .zeroPoint = 0
2441 }},
2442 .operations = {{
2443 .inputs = {0, 1, 2},
2444 .outputs = {3},
2445 .type = TestOperationType::GATHER
2446 }},
2447 .outputIndexes = {3}
2448 },
2449 .minSupportedVersion = TestHalVersion::UNKNOWN,
2450 .referenced = {}
2451 };
2452 return model;
2453 }
2454
2455 const auto dummy_test_model_relaxed_4 = TestModelManager::get().add("gather_relaxed_4", get_test_model_relaxed_4());
2456
2457 } // namespace generated_tests::gather
2458
2459 namespace generated_tests::gather {
2460
get_test_model_relaxed_all_inputs_as_internal_4()2461 const TestModel& get_test_model_relaxed_all_inputs_as_internal_4() {
2462 static TestModel model = {
2463 .expectFailure = false,
2464 .expectedMultinomialDistributionTolerance = 0,
2465 .isRelaxed = true,
2466 .main = {
2467 .inputIndexes = {4},
2468 .operands = {{ // input03
2469 .channelQuant = {},
2470 .data = TestBuffer::createFromVector<float>({}),
2471 .dimensions = {3},
2472 .isIgnored = false,
2473 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2474 .numberOfConsumers = 1,
2475 .scale = 0.0f,
2476 .type = TestOperandType::TENSOR_FLOAT32,
2477 .zeroPoint = 0
2478 }, { // param6
2479 .channelQuant = {},
2480 .data = TestBuffer::createFromVector<int32_t>({0}),
2481 .dimensions = {},
2482 .isIgnored = false,
2483 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2484 .numberOfConsumers = 1,
2485 .scale = 0.0f,
2486 .type = TestOperandType::INT32,
2487 .zeroPoint = 0
2488 }, { // param7
2489 .channelQuant = {},
2490 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2491 .dimensions = {2},
2492 .isIgnored = false,
2493 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2494 .numberOfConsumers = 1,
2495 .scale = 0.0f,
2496 .type = TestOperandType::TENSOR_INT32,
2497 .zeroPoint = 0
2498 }, { // output03
2499 .channelQuant = {},
2500 .data = TestBuffer::createFromVector<float>({2.0f, 1.0f}),
2501 .dimensions = {2},
2502 .isIgnored = false,
2503 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2504 .numberOfConsumers = 0,
2505 .scale = 0.0f,
2506 .type = TestOperandType::TENSOR_FLOAT32,
2507 .zeroPoint = 0
2508 }, { // input03_new
2509 .channelQuant = {},
2510 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f}),
2511 .dimensions = {3},
2512 .isIgnored = false,
2513 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2514 .numberOfConsumers = 1,
2515 .scale = 0.0f,
2516 .type = TestOperandType::TENSOR_FLOAT32,
2517 .zeroPoint = 0
2518 }, { // placeholder13
2519 .channelQuant = {},
2520 .data = TestBuffer::createFromVector<float>({0.0f}),
2521 .dimensions = {1},
2522 .isIgnored = false,
2523 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2524 .numberOfConsumers = 1,
2525 .scale = 0.0f,
2526 .type = TestOperandType::TENSOR_FLOAT32,
2527 .zeroPoint = 0
2528 }, { // param29
2529 .channelQuant = {},
2530 .data = TestBuffer::createFromVector<int32_t>({0}),
2531 .dimensions = {},
2532 .isIgnored = false,
2533 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2534 .numberOfConsumers = 1,
2535 .scale = 0.0f,
2536 .type = TestOperandType::INT32,
2537 .zeroPoint = 0
2538 }},
2539 .operations = {{
2540 .inputs = {4, 5, 6},
2541 .outputs = {0},
2542 .type = TestOperationType::ADD
2543 }, {
2544 .inputs = {0, 1, 2},
2545 .outputs = {3},
2546 .type = TestOperationType::GATHER
2547 }},
2548 .outputIndexes = {3}
2549 },
2550 .minSupportedVersion = TestHalVersion::UNKNOWN,
2551 .referenced = {}
2552 };
2553 return model;
2554 }
2555
2556 const auto dummy_test_model_relaxed_all_inputs_as_internal_4 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_4", get_test_model_relaxed_all_inputs_as_internal_4());
2557
2558 } // namespace generated_tests::gather
2559
2560 namespace generated_tests::gather {
2561
get_test_model_quant8_4()2562 const TestModel& get_test_model_quant8_4() {
2563 static TestModel model = {
2564 .expectFailure = false,
2565 .expectedMultinomialDistributionTolerance = 0,
2566 .isRelaxed = false,
2567 .main = {
2568 .inputIndexes = {0},
2569 .operands = {{ // input03
2570 .channelQuant = {},
2571 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133}),
2572 .dimensions = {3},
2573 .isIgnored = false,
2574 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2575 .numberOfConsumers = 1,
2576 .scale = 0.5f,
2577 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2578 .zeroPoint = 127
2579 }, { // param6
2580 .channelQuant = {},
2581 .data = TestBuffer::createFromVector<int32_t>({0}),
2582 .dimensions = {},
2583 .isIgnored = false,
2584 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2585 .numberOfConsumers = 1,
2586 .scale = 0.0f,
2587 .type = TestOperandType::INT32,
2588 .zeroPoint = 0
2589 }, { // param7
2590 .channelQuant = {},
2591 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2592 .dimensions = {2},
2593 .isIgnored = false,
2594 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2595 .numberOfConsumers = 1,
2596 .scale = 0.0f,
2597 .type = TestOperandType::TENSOR_INT32,
2598 .zeroPoint = 0
2599 }, { // output03
2600 .channelQuant = {},
2601 .data = TestBuffer::createFromVector<uint8_t>({131, 129}),
2602 .dimensions = {2},
2603 .isIgnored = false,
2604 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2605 .numberOfConsumers = 0,
2606 .scale = 0.5f,
2607 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2608 .zeroPoint = 127
2609 }},
2610 .operations = {{
2611 .inputs = {0, 1, 2},
2612 .outputs = {3},
2613 .type = TestOperationType::GATHER
2614 }},
2615 .outputIndexes = {3}
2616 },
2617 .minSupportedVersion = TestHalVersion::V1_2,
2618 .referenced = {}
2619 };
2620 return model;
2621 }
2622
2623 const auto dummy_test_model_quant8_4 = TestModelManager::get().add("gather_quant8_4", get_test_model_quant8_4());
2624
2625 } // namespace generated_tests::gather
2626
2627 namespace generated_tests::gather {
2628
get_test_model_quant8_all_inputs_as_internal_4()2629 const TestModel& get_test_model_quant8_all_inputs_as_internal_4() {
2630 static TestModel model = {
2631 .expectFailure = false,
2632 .expectedMultinomialDistributionTolerance = 0,
2633 .isRelaxed = false,
2634 .main = {
2635 .inputIndexes = {4},
2636 .operands = {{ // input03
2637 .channelQuant = {},
2638 .data = TestBuffer::createFromVector<uint8_t>({}),
2639 .dimensions = {3},
2640 .isIgnored = false,
2641 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2642 .numberOfConsumers = 1,
2643 .scale = 0.5f,
2644 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2645 .zeroPoint = 127
2646 }, { // param6
2647 .channelQuant = {},
2648 .data = TestBuffer::createFromVector<int32_t>({0}),
2649 .dimensions = {},
2650 .isIgnored = false,
2651 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2652 .numberOfConsumers = 1,
2653 .scale = 0.0f,
2654 .type = TestOperandType::INT32,
2655 .zeroPoint = 0
2656 }, { // param7
2657 .channelQuant = {},
2658 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2659 .dimensions = {2},
2660 .isIgnored = false,
2661 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2662 .numberOfConsumers = 1,
2663 .scale = 0.0f,
2664 .type = TestOperandType::TENSOR_INT32,
2665 .zeroPoint = 0
2666 }, { // output03
2667 .channelQuant = {},
2668 .data = TestBuffer::createFromVector<uint8_t>({131, 129}),
2669 .dimensions = {2},
2670 .isIgnored = false,
2671 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2672 .numberOfConsumers = 0,
2673 .scale = 0.5f,
2674 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2675 .zeroPoint = 127
2676 }, { // input03_new
2677 .channelQuant = {},
2678 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133}),
2679 .dimensions = {3},
2680 .isIgnored = false,
2681 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2682 .numberOfConsumers = 1,
2683 .scale = 0.5f,
2684 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2685 .zeroPoint = 127
2686 }, { // placeholder14
2687 .channelQuant = {},
2688 .data = TestBuffer::createFromVector<uint8_t>({127}),
2689 .dimensions = {1},
2690 .isIgnored = false,
2691 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2692 .numberOfConsumers = 1,
2693 .scale = 0.5f,
2694 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2695 .zeroPoint = 127
2696 }, { // param30
2697 .channelQuant = {},
2698 .data = TestBuffer::createFromVector<int32_t>({0}),
2699 .dimensions = {},
2700 .isIgnored = false,
2701 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2702 .numberOfConsumers = 1,
2703 .scale = 0.0f,
2704 .type = TestOperandType::INT32,
2705 .zeroPoint = 0
2706 }},
2707 .operations = {{
2708 .inputs = {4, 5, 6},
2709 .outputs = {0},
2710 .type = TestOperationType::ADD
2711 }, {
2712 .inputs = {0, 1, 2},
2713 .outputs = {3},
2714 .type = TestOperationType::GATHER
2715 }},
2716 .outputIndexes = {3}
2717 },
2718 .minSupportedVersion = TestHalVersion::V1_2,
2719 .referenced = {}
2720 };
2721 return model;
2722 }
2723
2724 const auto dummy_test_model_quant8_all_inputs_as_internal_4 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_4", get_test_model_quant8_all_inputs_as_internal_4());
2725
2726 } // namespace generated_tests::gather
2727
2728 namespace generated_tests::gather {
2729
get_test_model_int32_4()2730 const TestModel& get_test_model_int32_4() {
2731 static TestModel model = {
2732 .expectFailure = false,
2733 .expectedMultinomialDistributionTolerance = 0,
2734 .isRelaxed = false,
2735 .main = {
2736 .inputIndexes = {0},
2737 .operands = {{ // input03
2738 .channelQuant = {},
2739 .data = TestBuffer::createFromVector<int32_t>({1, 2, 3}),
2740 .dimensions = {3},
2741 .isIgnored = false,
2742 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2743 .numberOfConsumers = 1,
2744 .scale = 0.0f,
2745 .type = TestOperandType::TENSOR_INT32,
2746 .zeroPoint = 0
2747 }, { // param6
2748 .channelQuant = {},
2749 .data = TestBuffer::createFromVector<int32_t>({0}),
2750 .dimensions = {},
2751 .isIgnored = false,
2752 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2753 .numberOfConsumers = 1,
2754 .scale = 0.0f,
2755 .type = TestOperandType::INT32,
2756 .zeroPoint = 0
2757 }, { // param7
2758 .channelQuant = {},
2759 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2760 .dimensions = {2},
2761 .isIgnored = false,
2762 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2763 .numberOfConsumers = 1,
2764 .scale = 0.0f,
2765 .type = TestOperandType::TENSOR_INT32,
2766 .zeroPoint = 0
2767 }, { // output03
2768 .channelQuant = {},
2769 .data = TestBuffer::createFromVector<int32_t>({2, 1}),
2770 .dimensions = {2},
2771 .isIgnored = false,
2772 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2773 .numberOfConsumers = 0,
2774 .scale = 0.0f,
2775 .type = TestOperandType::TENSOR_INT32,
2776 .zeroPoint = 0
2777 }},
2778 .operations = {{
2779 .inputs = {0, 1, 2},
2780 .outputs = {3},
2781 .type = TestOperationType::GATHER
2782 }},
2783 .outputIndexes = {3}
2784 },
2785 .minSupportedVersion = TestHalVersion::V1_2,
2786 .referenced = {}
2787 };
2788 return model;
2789 }
2790
2791 const auto dummy_test_model_int32_4 = TestModelManager::get().add("gather_int32_4", get_test_model_int32_4());
2792
2793 } // namespace generated_tests::gather
2794
2795 namespace generated_tests::gather {
2796
get_test_model_float16_4()2797 const TestModel& get_test_model_float16_4() {
2798 static TestModel model = {
2799 .expectFailure = false,
2800 .expectedMultinomialDistributionTolerance = 0,
2801 .isRelaxed = false,
2802 .main = {
2803 .inputIndexes = {0},
2804 .operands = {{ // input03
2805 .channelQuant = {},
2806 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f}),
2807 .dimensions = {3},
2808 .isIgnored = false,
2809 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2810 .numberOfConsumers = 1,
2811 .scale = 0.0f,
2812 .type = TestOperandType::TENSOR_FLOAT16,
2813 .zeroPoint = 0
2814 }, { // param6
2815 .channelQuant = {},
2816 .data = TestBuffer::createFromVector<int32_t>({0}),
2817 .dimensions = {},
2818 .isIgnored = false,
2819 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2820 .numberOfConsumers = 1,
2821 .scale = 0.0f,
2822 .type = TestOperandType::INT32,
2823 .zeroPoint = 0
2824 }, { // param7
2825 .channelQuant = {},
2826 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2827 .dimensions = {2},
2828 .isIgnored = false,
2829 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2830 .numberOfConsumers = 1,
2831 .scale = 0.0f,
2832 .type = TestOperandType::TENSOR_INT32,
2833 .zeroPoint = 0
2834 }, { // output03
2835 .channelQuant = {},
2836 .data = TestBuffer::createFromVector<_Float16>({2.0f, 1.0f}),
2837 .dimensions = {2},
2838 .isIgnored = false,
2839 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2840 .numberOfConsumers = 0,
2841 .scale = 0.0f,
2842 .type = TestOperandType::TENSOR_FLOAT16,
2843 .zeroPoint = 0
2844 }},
2845 .operations = {{
2846 .inputs = {0, 1, 2},
2847 .outputs = {3},
2848 .type = TestOperationType::GATHER
2849 }},
2850 .outputIndexes = {3}
2851 },
2852 .minSupportedVersion = TestHalVersion::V1_2,
2853 .referenced = {}
2854 };
2855 return model;
2856 }
2857
2858 const auto dummy_test_model_float16_4 = TestModelManager::get().add("gather_float16_4", get_test_model_float16_4());
2859
2860 } // namespace generated_tests::gather
2861
2862 namespace generated_tests::gather {
2863
get_test_model_float16_all_inputs_as_internal_4()2864 const TestModel& get_test_model_float16_all_inputs_as_internal_4() {
2865 static TestModel model = {
2866 .expectFailure = false,
2867 .expectedMultinomialDistributionTolerance = 0,
2868 .isRelaxed = false,
2869 .main = {
2870 .inputIndexes = {4},
2871 .operands = {{ // input03
2872 .channelQuant = {},
2873 .data = TestBuffer::createFromVector<_Float16>({}),
2874 .dimensions = {3},
2875 .isIgnored = false,
2876 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2877 .numberOfConsumers = 1,
2878 .scale = 0.0f,
2879 .type = TestOperandType::TENSOR_FLOAT16,
2880 .zeroPoint = 0
2881 }, { // param6
2882 .channelQuant = {},
2883 .data = TestBuffer::createFromVector<int32_t>({0}),
2884 .dimensions = {},
2885 .isIgnored = false,
2886 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2887 .numberOfConsumers = 1,
2888 .scale = 0.0f,
2889 .type = TestOperandType::INT32,
2890 .zeroPoint = 0
2891 }, { // param7
2892 .channelQuant = {},
2893 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
2894 .dimensions = {2},
2895 .isIgnored = false,
2896 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2897 .numberOfConsumers = 1,
2898 .scale = 0.0f,
2899 .type = TestOperandType::TENSOR_INT32,
2900 .zeroPoint = 0
2901 }, { // output03
2902 .channelQuant = {},
2903 .data = TestBuffer::createFromVector<_Float16>({2.0f, 1.0f}),
2904 .dimensions = {2},
2905 .isIgnored = false,
2906 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2907 .numberOfConsumers = 0,
2908 .scale = 0.0f,
2909 .type = TestOperandType::TENSOR_FLOAT16,
2910 .zeroPoint = 0
2911 }, { // input03_new
2912 .channelQuant = {},
2913 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f}),
2914 .dimensions = {3},
2915 .isIgnored = false,
2916 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2917 .numberOfConsumers = 1,
2918 .scale = 0.0f,
2919 .type = TestOperandType::TENSOR_FLOAT16,
2920 .zeroPoint = 0
2921 }, { // placeholder15
2922 .channelQuant = {},
2923 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
2924 .dimensions = {1},
2925 .isIgnored = false,
2926 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2927 .numberOfConsumers = 1,
2928 .scale = 0.0f,
2929 .type = TestOperandType::TENSOR_FLOAT16,
2930 .zeroPoint = 0
2931 }, { // param31
2932 .channelQuant = {},
2933 .data = TestBuffer::createFromVector<int32_t>({0}),
2934 .dimensions = {},
2935 .isIgnored = false,
2936 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2937 .numberOfConsumers = 1,
2938 .scale = 0.0f,
2939 .type = TestOperandType::INT32,
2940 .zeroPoint = 0
2941 }},
2942 .operations = {{
2943 .inputs = {4, 5, 6},
2944 .outputs = {0},
2945 .type = TestOperationType::ADD
2946 }, {
2947 .inputs = {0, 1, 2},
2948 .outputs = {3},
2949 .type = TestOperationType::GATHER
2950 }},
2951 .outputIndexes = {3}
2952 },
2953 .minSupportedVersion = TestHalVersion::V1_2,
2954 .referenced = {}
2955 };
2956 return model;
2957 }
2958
2959 const auto dummy_test_model_float16_all_inputs_as_internal_4 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_4", get_test_model_float16_all_inputs_as_internal_4());
2960
2961 } // namespace generated_tests::gather
2962
2963 namespace generated_tests::gather {
2964
get_test_model_5()2965 const TestModel& get_test_model_5() {
2966 static TestModel model = {
2967 .expectFailure = false,
2968 .expectedMultinomialDistributionTolerance = 0,
2969 .isRelaxed = false,
2970 .main = {
2971 .inputIndexes = {0},
2972 .operands = {{ // input04
2973 .channelQuant = {},
2974 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
2975 .dimensions = {1, 2, 2},
2976 .isIgnored = false,
2977 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2978 .numberOfConsumers = 1,
2979 .scale = 0.0f,
2980 .type = TestOperandType::TENSOR_FLOAT32,
2981 .zeroPoint = 0
2982 }, { // param8
2983 .channelQuant = {},
2984 .data = TestBuffer::createFromVector<int32_t>({0}),
2985 .dimensions = {},
2986 .isIgnored = false,
2987 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2988 .numberOfConsumers = 1,
2989 .scale = 0.0f,
2990 .type = TestOperandType::INT32,
2991 .zeroPoint = 0
2992 }, { // param9
2993 .channelQuant = {},
2994 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
2995 .dimensions = {2},
2996 .isIgnored = false,
2997 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2998 .numberOfConsumers = 1,
2999 .scale = 0.0f,
3000 .type = TestOperandType::TENSOR_INT32,
3001 .zeroPoint = 0
3002 }, { // output04
3003 .channelQuant = {},
3004 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f, -2.0f, 0.2f, 0.7f, 0.8f}),
3005 .dimensions = {2, 2, 2},
3006 .isIgnored = false,
3007 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3008 .numberOfConsumers = 0,
3009 .scale = 0.0f,
3010 .type = TestOperandType::TENSOR_FLOAT32,
3011 .zeroPoint = 0
3012 }},
3013 .operations = {{
3014 .inputs = {0, 1, 2},
3015 .outputs = {3},
3016 .type = TestOperationType::GATHER
3017 }},
3018 .outputIndexes = {3}
3019 },
3020 .minSupportedVersion = TestHalVersion::V1_2,
3021 .referenced = {}
3022 };
3023 return model;
3024 }
3025
3026 const auto dummy_test_model_5 = TestModelManager::get().add("gather_5", get_test_model_5());
3027
3028 } // namespace generated_tests::gather
3029
3030 namespace generated_tests::gather {
3031
get_test_model_all_inputs_as_internal_5()3032 const TestModel& get_test_model_all_inputs_as_internal_5() {
3033 static TestModel model = {
3034 .expectFailure = false,
3035 .expectedMultinomialDistributionTolerance = 0,
3036 .isRelaxed = false,
3037 .main = {
3038 .inputIndexes = {4},
3039 .operands = {{ // input04
3040 .channelQuant = {},
3041 .data = TestBuffer::createFromVector<float>({}),
3042 .dimensions = {1, 2, 2},
3043 .isIgnored = false,
3044 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3045 .numberOfConsumers = 1,
3046 .scale = 0.0f,
3047 .type = TestOperandType::TENSOR_FLOAT32,
3048 .zeroPoint = 0
3049 }, { // param8
3050 .channelQuant = {},
3051 .data = TestBuffer::createFromVector<int32_t>({0}),
3052 .dimensions = {},
3053 .isIgnored = false,
3054 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3055 .numberOfConsumers = 1,
3056 .scale = 0.0f,
3057 .type = TestOperandType::INT32,
3058 .zeroPoint = 0
3059 }, { // param9
3060 .channelQuant = {},
3061 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3062 .dimensions = {2},
3063 .isIgnored = false,
3064 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3065 .numberOfConsumers = 1,
3066 .scale = 0.0f,
3067 .type = TestOperandType::TENSOR_INT32,
3068 .zeroPoint = 0
3069 }, { // output04
3070 .channelQuant = {},
3071 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f, -2.0f, 0.2f, 0.7f, 0.8f}),
3072 .dimensions = {2, 2, 2},
3073 .isIgnored = false,
3074 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3075 .numberOfConsumers = 0,
3076 .scale = 0.0f,
3077 .type = TestOperandType::TENSOR_FLOAT32,
3078 .zeroPoint = 0
3079 }, { // input04_new
3080 .channelQuant = {},
3081 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3082 .dimensions = {1, 2, 2},
3083 .isIgnored = false,
3084 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3085 .numberOfConsumers = 1,
3086 .scale = 0.0f,
3087 .type = TestOperandType::TENSOR_FLOAT32,
3088 .zeroPoint = 0
3089 }, { // placeholder16
3090 .channelQuant = {},
3091 .data = TestBuffer::createFromVector<float>({0.0f}),
3092 .dimensions = {1},
3093 .isIgnored = false,
3094 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3095 .numberOfConsumers = 1,
3096 .scale = 0.0f,
3097 .type = TestOperandType::TENSOR_FLOAT32,
3098 .zeroPoint = 0
3099 }, { // param32
3100 .channelQuant = {},
3101 .data = TestBuffer::createFromVector<int32_t>({0}),
3102 .dimensions = {},
3103 .isIgnored = false,
3104 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3105 .numberOfConsumers = 1,
3106 .scale = 0.0f,
3107 .type = TestOperandType::INT32,
3108 .zeroPoint = 0
3109 }},
3110 .operations = {{
3111 .inputs = {4, 5, 6},
3112 .outputs = {0},
3113 .type = TestOperationType::ADD
3114 }, {
3115 .inputs = {0, 1, 2},
3116 .outputs = {3},
3117 .type = TestOperationType::GATHER
3118 }},
3119 .outputIndexes = {3}
3120 },
3121 .minSupportedVersion = TestHalVersion::V1_2,
3122 .referenced = {}
3123 };
3124 return model;
3125 }
3126
3127 const auto dummy_test_model_all_inputs_as_internal_5 = TestModelManager::get().add("gather_all_inputs_as_internal_5", get_test_model_all_inputs_as_internal_5());
3128
3129 } // namespace generated_tests::gather
3130
3131 namespace generated_tests::gather {
3132
get_test_model_relaxed_5()3133 const TestModel& get_test_model_relaxed_5() {
3134 static TestModel model = {
3135 .expectFailure = false,
3136 .expectedMultinomialDistributionTolerance = 0,
3137 .isRelaxed = true,
3138 .main = {
3139 .inputIndexes = {0},
3140 .operands = {{ // input04
3141 .channelQuant = {},
3142 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3143 .dimensions = {1, 2, 2},
3144 .isIgnored = false,
3145 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3146 .numberOfConsumers = 1,
3147 .scale = 0.0f,
3148 .type = TestOperandType::TENSOR_FLOAT32,
3149 .zeroPoint = 0
3150 }, { // param8
3151 .channelQuant = {},
3152 .data = TestBuffer::createFromVector<int32_t>({0}),
3153 .dimensions = {},
3154 .isIgnored = false,
3155 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3156 .numberOfConsumers = 1,
3157 .scale = 0.0f,
3158 .type = TestOperandType::INT32,
3159 .zeroPoint = 0
3160 }, { // param9
3161 .channelQuant = {},
3162 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3163 .dimensions = {2},
3164 .isIgnored = false,
3165 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3166 .numberOfConsumers = 1,
3167 .scale = 0.0f,
3168 .type = TestOperandType::TENSOR_INT32,
3169 .zeroPoint = 0
3170 }, { // output04
3171 .channelQuant = {},
3172 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f, -2.0f, 0.2f, 0.7f, 0.8f}),
3173 .dimensions = {2, 2, 2},
3174 .isIgnored = false,
3175 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3176 .numberOfConsumers = 0,
3177 .scale = 0.0f,
3178 .type = TestOperandType::TENSOR_FLOAT32,
3179 .zeroPoint = 0
3180 }},
3181 .operations = {{
3182 .inputs = {0, 1, 2},
3183 .outputs = {3},
3184 .type = TestOperationType::GATHER
3185 }},
3186 .outputIndexes = {3}
3187 },
3188 .minSupportedVersion = TestHalVersion::UNKNOWN,
3189 .referenced = {}
3190 };
3191 return model;
3192 }
3193
3194 const auto dummy_test_model_relaxed_5 = TestModelManager::get().add("gather_relaxed_5", get_test_model_relaxed_5());
3195
3196 } // namespace generated_tests::gather
3197
3198 namespace generated_tests::gather {
3199
get_test_model_relaxed_all_inputs_as_internal_5()3200 const TestModel& get_test_model_relaxed_all_inputs_as_internal_5() {
3201 static TestModel model = {
3202 .expectFailure = false,
3203 .expectedMultinomialDistributionTolerance = 0,
3204 .isRelaxed = true,
3205 .main = {
3206 .inputIndexes = {4},
3207 .operands = {{ // input04
3208 .channelQuant = {},
3209 .data = TestBuffer::createFromVector<float>({}),
3210 .dimensions = {1, 2, 2},
3211 .isIgnored = false,
3212 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3213 .numberOfConsumers = 1,
3214 .scale = 0.0f,
3215 .type = TestOperandType::TENSOR_FLOAT32,
3216 .zeroPoint = 0
3217 }, { // param8
3218 .channelQuant = {},
3219 .data = TestBuffer::createFromVector<int32_t>({0}),
3220 .dimensions = {},
3221 .isIgnored = false,
3222 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3223 .numberOfConsumers = 1,
3224 .scale = 0.0f,
3225 .type = TestOperandType::INT32,
3226 .zeroPoint = 0
3227 }, { // param9
3228 .channelQuant = {},
3229 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3230 .dimensions = {2},
3231 .isIgnored = false,
3232 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3233 .numberOfConsumers = 1,
3234 .scale = 0.0f,
3235 .type = TestOperandType::TENSOR_INT32,
3236 .zeroPoint = 0
3237 }, { // output04
3238 .channelQuant = {},
3239 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f, -2.0f, 0.2f, 0.7f, 0.8f}),
3240 .dimensions = {2, 2, 2},
3241 .isIgnored = false,
3242 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3243 .numberOfConsumers = 0,
3244 .scale = 0.0f,
3245 .type = TestOperandType::TENSOR_FLOAT32,
3246 .zeroPoint = 0
3247 }, { // input04_new
3248 .channelQuant = {},
3249 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3250 .dimensions = {1, 2, 2},
3251 .isIgnored = false,
3252 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3253 .numberOfConsumers = 1,
3254 .scale = 0.0f,
3255 .type = TestOperandType::TENSOR_FLOAT32,
3256 .zeroPoint = 0
3257 }, { // placeholder17
3258 .channelQuant = {},
3259 .data = TestBuffer::createFromVector<float>({0.0f}),
3260 .dimensions = {1},
3261 .isIgnored = false,
3262 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3263 .numberOfConsumers = 1,
3264 .scale = 0.0f,
3265 .type = TestOperandType::TENSOR_FLOAT32,
3266 .zeroPoint = 0
3267 }, { // param33
3268 .channelQuant = {},
3269 .data = TestBuffer::createFromVector<int32_t>({0}),
3270 .dimensions = {},
3271 .isIgnored = false,
3272 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3273 .numberOfConsumers = 1,
3274 .scale = 0.0f,
3275 .type = TestOperandType::INT32,
3276 .zeroPoint = 0
3277 }},
3278 .operations = {{
3279 .inputs = {4, 5, 6},
3280 .outputs = {0},
3281 .type = TestOperationType::ADD
3282 }, {
3283 .inputs = {0, 1, 2},
3284 .outputs = {3},
3285 .type = TestOperationType::GATHER
3286 }},
3287 .outputIndexes = {3}
3288 },
3289 .minSupportedVersion = TestHalVersion::UNKNOWN,
3290 .referenced = {}
3291 };
3292 return model;
3293 }
3294
3295 const auto dummy_test_model_relaxed_all_inputs_as_internal_5 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_5", get_test_model_relaxed_all_inputs_as_internal_5());
3296
3297 } // namespace generated_tests::gather
3298
3299 namespace generated_tests::gather {
3300
get_test_model_quant8_5()3301 const TestModel& get_test_model_quant8_5() {
3302 static TestModel model = {
3303 .expectFailure = false,
3304 .expectedMultinomialDistributionTolerance = 0,
3305 .isRelaxed = false,
3306 .main = {
3307 .inputIndexes = {0},
3308 .operands = {{ // input04
3309 .channelQuant = {},
3310 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
3311 .dimensions = {1, 2, 2},
3312 .isIgnored = false,
3313 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3314 .numberOfConsumers = 1,
3315 .scale = 0.5f,
3316 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3317 .zeroPoint = 127
3318 }, { // param8
3319 .channelQuant = {},
3320 .data = TestBuffer::createFromVector<int32_t>({0}),
3321 .dimensions = {},
3322 .isIgnored = false,
3323 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3324 .numberOfConsumers = 1,
3325 .scale = 0.0f,
3326 .type = TestOperandType::INT32,
3327 .zeroPoint = 0
3328 }, { // param9
3329 .channelQuant = {},
3330 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3331 .dimensions = {2},
3332 .isIgnored = false,
3333 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3334 .numberOfConsumers = 1,
3335 .scale = 0.0f,
3336 .type = TestOperandType::TENSOR_INT32,
3337 .zeroPoint = 0
3338 }, { // output04
3339 .channelQuant = {},
3340 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129, 123, 127, 128, 129}),
3341 .dimensions = {2, 2, 2},
3342 .isIgnored = false,
3343 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3344 .numberOfConsumers = 0,
3345 .scale = 0.5f,
3346 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3347 .zeroPoint = 127
3348 }},
3349 .operations = {{
3350 .inputs = {0, 1, 2},
3351 .outputs = {3},
3352 .type = TestOperationType::GATHER
3353 }},
3354 .outputIndexes = {3}
3355 },
3356 .minSupportedVersion = TestHalVersion::V1_2,
3357 .referenced = {}
3358 };
3359 return model;
3360 }
3361
3362 const auto dummy_test_model_quant8_5 = TestModelManager::get().add("gather_quant8_5", get_test_model_quant8_5());
3363
3364 } // namespace generated_tests::gather
3365
3366 namespace generated_tests::gather {
3367
get_test_model_quant8_all_inputs_as_internal_5()3368 const TestModel& get_test_model_quant8_all_inputs_as_internal_5() {
3369 static TestModel model = {
3370 .expectFailure = false,
3371 .expectedMultinomialDistributionTolerance = 0,
3372 .isRelaxed = false,
3373 .main = {
3374 .inputIndexes = {4},
3375 .operands = {{ // input04
3376 .channelQuant = {},
3377 .data = TestBuffer::createFromVector<uint8_t>({}),
3378 .dimensions = {1, 2, 2},
3379 .isIgnored = false,
3380 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3381 .numberOfConsumers = 1,
3382 .scale = 0.5f,
3383 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3384 .zeroPoint = 127
3385 }, { // param8
3386 .channelQuant = {},
3387 .data = TestBuffer::createFromVector<int32_t>({0}),
3388 .dimensions = {},
3389 .isIgnored = false,
3390 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3391 .numberOfConsumers = 1,
3392 .scale = 0.0f,
3393 .type = TestOperandType::INT32,
3394 .zeroPoint = 0
3395 }, { // param9
3396 .channelQuant = {},
3397 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3398 .dimensions = {2},
3399 .isIgnored = false,
3400 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3401 .numberOfConsumers = 1,
3402 .scale = 0.0f,
3403 .type = TestOperandType::TENSOR_INT32,
3404 .zeroPoint = 0
3405 }, { // output04
3406 .channelQuant = {},
3407 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129, 123, 127, 128, 129}),
3408 .dimensions = {2, 2, 2},
3409 .isIgnored = false,
3410 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3411 .numberOfConsumers = 0,
3412 .scale = 0.5f,
3413 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3414 .zeroPoint = 127
3415 }, { // input04_new
3416 .channelQuant = {},
3417 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
3418 .dimensions = {1, 2, 2},
3419 .isIgnored = false,
3420 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3421 .numberOfConsumers = 1,
3422 .scale = 0.5f,
3423 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3424 .zeroPoint = 127
3425 }, { // placeholder18
3426 .channelQuant = {},
3427 .data = TestBuffer::createFromVector<uint8_t>({127}),
3428 .dimensions = {1},
3429 .isIgnored = false,
3430 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3431 .numberOfConsumers = 1,
3432 .scale = 0.5f,
3433 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3434 .zeroPoint = 127
3435 }, { // param34
3436 .channelQuant = {},
3437 .data = TestBuffer::createFromVector<int32_t>({0}),
3438 .dimensions = {},
3439 .isIgnored = false,
3440 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3441 .numberOfConsumers = 1,
3442 .scale = 0.0f,
3443 .type = TestOperandType::INT32,
3444 .zeroPoint = 0
3445 }},
3446 .operations = {{
3447 .inputs = {4, 5, 6},
3448 .outputs = {0},
3449 .type = TestOperationType::ADD
3450 }, {
3451 .inputs = {0, 1, 2},
3452 .outputs = {3},
3453 .type = TestOperationType::GATHER
3454 }},
3455 .outputIndexes = {3}
3456 },
3457 .minSupportedVersion = TestHalVersion::V1_2,
3458 .referenced = {}
3459 };
3460 return model;
3461 }
3462
3463 const auto dummy_test_model_quant8_all_inputs_as_internal_5 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_5", get_test_model_quant8_all_inputs_as_internal_5());
3464
3465 } // namespace generated_tests::gather
3466
3467 namespace generated_tests::gather {
3468
get_test_model_int32_5()3469 const TestModel& get_test_model_int32_5() {
3470 static TestModel model = {
3471 .expectFailure = false,
3472 .expectedMultinomialDistributionTolerance = 0,
3473 .isRelaxed = false,
3474 .main = {
3475 .inputIndexes = {0},
3476 .operands = {{ // input04
3477 .channelQuant = {},
3478 .data = TestBuffer::createFromVector<int32_t>({-2, 0, 1, 1}),
3479 .dimensions = {1, 2, 2},
3480 .isIgnored = false,
3481 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3482 .numberOfConsumers = 1,
3483 .scale = 0.0f,
3484 .type = TestOperandType::TENSOR_INT32,
3485 .zeroPoint = 0
3486 }, { // param8
3487 .channelQuant = {},
3488 .data = TestBuffer::createFromVector<int32_t>({0}),
3489 .dimensions = {},
3490 .isIgnored = false,
3491 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3492 .numberOfConsumers = 1,
3493 .scale = 0.0f,
3494 .type = TestOperandType::INT32,
3495 .zeroPoint = 0
3496 }, { // param9
3497 .channelQuant = {},
3498 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3499 .dimensions = {2},
3500 .isIgnored = false,
3501 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3502 .numberOfConsumers = 1,
3503 .scale = 0.0f,
3504 .type = TestOperandType::TENSOR_INT32,
3505 .zeroPoint = 0
3506 }, { // output04
3507 .channelQuant = {},
3508 .data = TestBuffer::createFromVector<int32_t>({-2, 0, 1, 1, -2, 0, 1, 1}),
3509 .dimensions = {2, 2, 2},
3510 .isIgnored = false,
3511 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3512 .numberOfConsumers = 0,
3513 .scale = 0.0f,
3514 .type = TestOperandType::TENSOR_INT32,
3515 .zeroPoint = 0
3516 }},
3517 .operations = {{
3518 .inputs = {0, 1, 2},
3519 .outputs = {3},
3520 .type = TestOperationType::GATHER
3521 }},
3522 .outputIndexes = {3}
3523 },
3524 .minSupportedVersion = TestHalVersion::V1_2,
3525 .referenced = {}
3526 };
3527 return model;
3528 }
3529
3530 const auto dummy_test_model_int32_5 = TestModelManager::get().add("gather_int32_5", get_test_model_int32_5());
3531
3532 } // namespace generated_tests::gather
3533
3534 namespace generated_tests::gather {
3535
get_test_model_float16_5()3536 const TestModel& get_test_model_float16_5() {
3537 static TestModel model = {
3538 .expectFailure = false,
3539 .expectedMultinomialDistributionTolerance = 0,
3540 .isRelaxed = false,
3541 .main = {
3542 .inputIndexes = {0},
3543 .operands = {{ // input04
3544 .channelQuant = {},
3545 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
3546 .dimensions = {1, 2, 2},
3547 .isIgnored = false,
3548 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3549 .numberOfConsumers = 1,
3550 .scale = 0.0f,
3551 .type = TestOperandType::TENSOR_FLOAT16,
3552 .zeroPoint = 0
3553 }, { // param8
3554 .channelQuant = {},
3555 .data = TestBuffer::createFromVector<int32_t>({0}),
3556 .dimensions = {},
3557 .isIgnored = false,
3558 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3559 .numberOfConsumers = 1,
3560 .scale = 0.0f,
3561 .type = TestOperandType::INT32,
3562 .zeroPoint = 0
3563 }, { // param9
3564 .channelQuant = {},
3565 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3566 .dimensions = {2},
3567 .isIgnored = false,
3568 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3569 .numberOfConsumers = 1,
3570 .scale = 0.0f,
3571 .type = TestOperandType::TENSOR_INT32,
3572 .zeroPoint = 0
3573 }, { // output04
3574 .channelQuant = {},
3575 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f, -2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
3576 .dimensions = {2, 2, 2},
3577 .isIgnored = false,
3578 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3579 .numberOfConsumers = 0,
3580 .scale = 0.0f,
3581 .type = TestOperandType::TENSOR_FLOAT16,
3582 .zeroPoint = 0
3583 }},
3584 .operations = {{
3585 .inputs = {0, 1, 2},
3586 .outputs = {3},
3587 .type = TestOperationType::GATHER
3588 }},
3589 .outputIndexes = {3}
3590 },
3591 .minSupportedVersion = TestHalVersion::V1_2,
3592 .referenced = {}
3593 };
3594 return model;
3595 }
3596
3597 const auto dummy_test_model_float16_5 = TestModelManager::get().add("gather_float16_5", get_test_model_float16_5());
3598
3599 } // namespace generated_tests::gather
3600
3601 namespace generated_tests::gather {
3602
get_test_model_float16_all_inputs_as_internal_5()3603 const TestModel& get_test_model_float16_all_inputs_as_internal_5() {
3604 static TestModel model = {
3605 .expectFailure = false,
3606 .expectedMultinomialDistributionTolerance = 0,
3607 .isRelaxed = false,
3608 .main = {
3609 .inputIndexes = {4},
3610 .operands = {{ // input04
3611 .channelQuant = {},
3612 .data = TestBuffer::createFromVector<_Float16>({}),
3613 .dimensions = {1, 2, 2},
3614 .isIgnored = false,
3615 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3616 .numberOfConsumers = 1,
3617 .scale = 0.0f,
3618 .type = TestOperandType::TENSOR_FLOAT16,
3619 .zeroPoint = 0
3620 }, { // param8
3621 .channelQuant = {},
3622 .data = TestBuffer::createFromVector<int32_t>({0}),
3623 .dimensions = {},
3624 .isIgnored = false,
3625 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3626 .numberOfConsumers = 1,
3627 .scale = 0.0f,
3628 .type = TestOperandType::INT32,
3629 .zeroPoint = 0
3630 }, { // param9
3631 .channelQuant = {},
3632 .data = TestBuffer::createFromVector<int32_t>({0, 0}),
3633 .dimensions = {2},
3634 .isIgnored = false,
3635 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3636 .numberOfConsumers = 1,
3637 .scale = 0.0f,
3638 .type = TestOperandType::TENSOR_INT32,
3639 .zeroPoint = 0
3640 }, { // output04
3641 .channelQuant = {},
3642 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f, -2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
3643 .dimensions = {2, 2, 2},
3644 .isIgnored = false,
3645 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3646 .numberOfConsumers = 0,
3647 .scale = 0.0f,
3648 .type = TestOperandType::TENSOR_FLOAT16,
3649 .zeroPoint = 0
3650 }, { // input04_new
3651 .channelQuant = {},
3652 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
3653 .dimensions = {1, 2, 2},
3654 .isIgnored = false,
3655 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3656 .numberOfConsumers = 1,
3657 .scale = 0.0f,
3658 .type = TestOperandType::TENSOR_FLOAT16,
3659 .zeroPoint = 0
3660 }, { // placeholder19
3661 .channelQuant = {},
3662 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
3663 .dimensions = {1},
3664 .isIgnored = false,
3665 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3666 .numberOfConsumers = 1,
3667 .scale = 0.0f,
3668 .type = TestOperandType::TENSOR_FLOAT16,
3669 .zeroPoint = 0
3670 }, { // param35
3671 .channelQuant = {},
3672 .data = TestBuffer::createFromVector<int32_t>({0}),
3673 .dimensions = {},
3674 .isIgnored = false,
3675 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3676 .numberOfConsumers = 1,
3677 .scale = 0.0f,
3678 .type = TestOperandType::INT32,
3679 .zeroPoint = 0
3680 }},
3681 .operations = {{
3682 .inputs = {4, 5, 6},
3683 .outputs = {0},
3684 .type = TestOperationType::ADD
3685 }, {
3686 .inputs = {0, 1, 2},
3687 .outputs = {3},
3688 .type = TestOperationType::GATHER
3689 }},
3690 .outputIndexes = {3}
3691 },
3692 .minSupportedVersion = TestHalVersion::V1_2,
3693 .referenced = {}
3694 };
3695 return model;
3696 }
3697
3698 const auto dummy_test_model_float16_all_inputs_as_internal_5 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_5", get_test_model_float16_all_inputs_as_internal_5());
3699
3700 } // namespace generated_tests::gather
3701
3702 namespace generated_tests::gather {
3703
get_test_model_6()3704 const TestModel& get_test_model_6() {
3705 static TestModel model = {
3706 .expectFailure = false,
3707 .expectedMultinomialDistributionTolerance = 0,
3708 .isRelaxed = false,
3709 .main = {
3710 .inputIndexes = {0},
3711 .operands = {{ // input05
3712 .channelQuant = {},
3713 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3714 .dimensions = {4, 1},
3715 .isIgnored = false,
3716 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3717 .numberOfConsumers = 1,
3718 .scale = 0.0f,
3719 .type = TestOperandType::TENSOR_FLOAT32,
3720 .zeroPoint = 0
3721 }, { // param10
3722 .channelQuant = {},
3723 .data = TestBuffer::createFromVector<int32_t>({0}),
3724 .dimensions = {},
3725 .isIgnored = false,
3726 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3727 .numberOfConsumers = 1,
3728 .scale = 0.0f,
3729 .type = TestOperandType::INT32,
3730 .zeroPoint = 0
3731 }, { // param11
3732 .channelQuant = {},
3733 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
3734 .dimensions = {2},
3735 .isIgnored = false,
3736 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3737 .numberOfConsumers = 1,
3738 .scale = 0.0f,
3739 .type = TestOperandType::TENSOR_INT32,
3740 .zeroPoint = 0
3741 }, { // output05
3742 .channelQuant = {},
3743 .data = TestBuffer::createFromVector<float>({0.2f, 0.8f}),
3744 .dimensions = {2, 1},
3745 .isIgnored = false,
3746 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3747 .numberOfConsumers = 0,
3748 .scale = 0.0f,
3749 .type = TestOperandType::TENSOR_FLOAT32,
3750 .zeroPoint = 0
3751 }},
3752 .operations = {{
3753 .inputs = {0, 1, 2},
3754 .outputs = {3},
3755 .type = TestOperationType::GATHER
3756 }},
3757 .outputIndexes = {3}
3758 },
3759 .minSupportedVersion = TestHalVersion::V1_2,
3760 .referenced = {}
3761 };
3762 return model;
3763 }
3764
3765 const auto dummy_test_model_6 = TestModelManager::get().add("gather_6", get_test_model_6());
3766
3767 } // namespace generated_tests::gather
3768
3769 namespace generated_tests::gather {
3770
get_test_model_all_inputs_as_internal_6()3771 const TestModel& get_test_model_all_inputs_as_internal_6() {
3772 static TestModel model = {
3773 .expectFailure = false,
3774 .expectedMultinomialDistributionTolerance = 0,
3775 .isRelaxed = false,
3776 .main = {
3777 .inputIndexes = {4},
3778 .operands = {{ // input05
3779 .channelQuant = {},
3780 .data = TestBuffer::createFromVector<float>({}),
3781 .dimensions = {4, 1},
3782 .isIgnored = false,
3783 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3784 .numberOfConsumers = 1,
3785 .scale = 0.0f,
3786 .type = TestOperandType::TENSOR_FLOAT32,
3787 .zeroPoint = 0
3788 }, { // param10
3789 .channelQuant = {},
3790 .data = TestBuffer::createFromVector<int32_t>({0}),
3791 .dimensions = {},
3792 .isIgnored = false,
3793 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3794 .numberOfConsumers = 1,
3795 .scale = 0.0f,
3796 .type = TestOperandType::INT32,
3797 .zeroPoint = 0
3798 }, { // param11
3799 .channelQuant = {},
3800 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
3801 .dimensions = {2},
3802 .isIgnored = false,
3803 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3804 .numberOfConsumers = 1,
3805 .scale = 0.0f,
3806 .type = TestOperandType::TENSOR_INT32,
3807 .zeroPoint = 0
3808 }, { // output05
3809 .channelQuant = {},
3810 .data = TestBuffer::createFromVector<float>({0.2f, 0.8f}),
3811 .dimensions = {2, 1},
3812 .isIgnored = false,
3813 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3814 .numberOfConsumers = 0,
3815 .scale = 0.0f,
3816 .type = TestOperandType::TENSOR_FLOAT32,
3817 .zeroPoint = 0
3818 }, { // input05_new
3819 .channelQuant = {},
3820 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3821 .dimensions = {4, 1},
3822 .isIgnored = false,
3823 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3824 .numberOfConsumers = 1,
3825 .scale = 0.0f,
3826 .type = TestOperandType::TENSOR_FLOAT32,
3827 .zeroPoint = 0
3828 }, { // placeholder20
3829 .channelQuant = {},
3830 .data = TestBuffer::createFromVector<float>({0.0f}),
3831 .dimensions = {1},
3832 .isIgnored = false,
3833 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3834 .numberOfConsumers = 1,
3835 .scale = 0.0f,
3836 .type = TestOperandType::TENSOR_FLOAT32,
3837 .zeroPoint = 0
3838 }, { // param36
3839 .channelQuant = {},
3840 .data = TestBuffer::createFromVector<int32_t>({0}),
3841 .dimensions = {},
3842 .isIgnored = false,
3843 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3844 .numberOfConsumers = 1,
3845 .scale = 0.0f,
3846 .type = TestOperandType::INT32,
3847 .zeroPoint = 0
3848 }},
3849 .operations = {{
3850 .inputs = {4, 5, 6},
3851 .outputs = {0},
3852 .type = TestOperationType::ADD
3853 }, {
3854 .inputs = {0, 1, 2},
3855 .outputs = {3},
3856 .type = TestOperationType::GATHER
3857 }},
3858 .outputIndexes = {3}
3859 },
3860 .minSupportedVersion = TestHalVersion::V1_2,
3861 .referenced = {}
3862 };
3863 return model;
3864 }
3865
3866 const auto dummy_test_model_all_inputs_as_internal_6 = TestModelManager::get().add("gather_all_inputs_as_internal_6", get_test_model_all_inputs_as_internal_6());
3867
3868 } // namespace generated_tests::gather
3869
3870 namespace generated_tests::gather {
3871
get_test_model_relaxed_6()3872 const TestModel& get_test_model_relaxed_6() {
3873 static TestModel model = {
3874 .expectFailure = false,
3875 .expectedMultinomialDistributionTolerance = 0,
3876 .isRelaxed = true,
3877 .main = {
3878 .inputIndexes = {0},
3879 .operands = {{ // input05
3880 .channelQuant = {},
3881 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3882 .dimensions = {4, 1},
3883 .isIgnored = false,
3884 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3885 .numberOfConsumers = 1,
3886 .scale = 0.0f,
3887 .type = TestOperandType::TENSOR_FLOAT32,
3888 .zeroPoint = 0
3889 }, { // param10
3890 .channelQuant = {},
3891 .data = TestBuffer::createFromVector<int32_t>({0}),
3892 .dimensions = {},
3893 .isIgnored = false,
3894 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3895 .numberOfConsumers = 1,
3896 .scale = 0.0f,
3897 .type = TestOperandType::INT32,
3898 .zeroPoint = 0
3899 }, { // param11
3900 .channelQuant = {},
3901 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
3902 .dimensions = {2},
3903 .isIgnored = false,
3904 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3905 .numberOfConsumers = 1,
3906 .scale = 0.0f,
3907 .type = TestOperandType::TENSOR_INT32,
3908 .zeroPoint = 0
3909 }, { // output05
3910 .channelQuant = {},
3911 .data = TestBuffer::createFromVector<float>({0.2f, 0.8f}),
3912 .dimensions = {2, 1},
3913 .isIgnored = false,
3914 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3915 .numberOfConsumers = 0,
3916 .scale = 0.0f,
3917 .type = TestOperandType::TENSOR_FLOAT32,
3918 .zeroPoint = 0
3919 }},
3920 .operations = {{
3921 .inputs = {0, 1, 2},
3922 .outputs = {3},
3923 .type = TestOperationType::GATHER
3924 }},
3925 .outputIndexes = {3}
3926 },
3927 .minSupportedVersion = TestHalVersion::UNKNOWN,
3928 .referenced = {}
3929 };
3930 return model;
3931 }
3932
3933 const auto dummy_test_model_relaxed_6 = TestModelManager::get().add("gather_relaxed_6", get_test_model_relaxed_6());
3934
3935 } // namespace generated_tests::gather
3936
3937 namespace generated_tests::gather {
3938
get_test_model_relaxed_all_inputs_as_internal_6()3939 const TestModel& get_test_model_relaxed_all_inputs_as_internal_6() {
3940 static TestModel model = {
3941 .expectFailure = false,
3942 .expectedMultinomialDistributionTolerance = 0,
3943 .isRelaxed = true,
3944 .main = {
3945 .inputIndexes = {4},
3946 .operands = {{ // input05
3947 .channelQuant = {},
3948 .data = TestBuffer::createFromVector<float>({}),
3949 .dimensions = {4, 1},
3950 .isIgnored = false,
3951 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3952 .numberOfConsumers = 1,
3953 .scale = 0.0f,
3954 .type = TestOperandType::TENSOR_FLOAT32,
3955 .zeroPoint = 0
3956 }, { // param10
3957 .channelQuant = {},
3958 .data = TestBuffer::createFromVector<int32_t>({0}),
3959 .dimensions = {},
3960 .isIgnored = false,
3961 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3962 .numberOfConsumers = 1,
3963 .scale = 0.0f,
3964 .type = TestOperandType::INT32,
3965 .zeroPoint = 0
3966 }, { // param11
3967 .channelQuant = {},
3968 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
3969 .dimensions = {2},
3970 .isIgnored = false,
3971 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3972 .numberOfConsumers = 1,
3973 .scale = 0.0f,
3974 .type = TestOperandType::TENSOR_INT32,
3975 .zeroPoint = 0
3976 }, { // output05
3977 .channelQuant = {},
3978 .data = TestBuffer::createFromVector<float>({0.2f, 0.8f}),
3979 .dimensions = {2, 1},
3980 .isIgnored = false,
3981 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3982 .numberOfConsumers = 0,
3983 .scale = 0.0f,
3984 .type = TestOperandType::TENSOR_FLOAT32,
3985 .zeroPoint = 0
3986 }, { // input05_new
3987 .channelQuant = {},
3988 .data = TestBuffer::createFromVector<float>({-2.0f, 0.2f, 0.7f, 0.8f}),
3989 .dimensions = {4, 1},
3990 .isIgnored = false,
3991 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3992 .numberOfConsumers = 1,
3993 .scale = 0.0f,
3994 .type = TestOperandType::TENSOR_FLOAT32,
3995 .zeroPoint = 0
3996 }, { // placeholder21
3997 .channelQuant = {},
3998 .data = TestBuffer::createFromVector<float>({0.0f}),
3999 .dimensions = {1},
4000 .isIgnored = false,
4001 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4002 .numberOfConsumers = 1,
4003 .scale = 0.0f,
4004 .type = TestOperandType::TENSOR_FLOAT32,
4005 .zeroPoint = 0
4006 }, { // param37
4007 .channelQuant = {},
4008 .data = TestBuffer::createFromVector<int32_t>({0}),
4009 .dimensions = {},
4010 .isIgnored = false,
4011 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4012 .numberOfConsumers = 1,
4013 .scale = 0.0f,
4014 .type = TestOperandType::INT32,
4015 .zeroPoint = 0
4016 }},
4017 .operations = {{
4018 .inputs = {4, 5, 6},
4019 .outputs = {0},
4020 .type = TestOperationType::ADD
4021 }, {
4022 .inputs = {0, 1, 2},
4023 .outputs = {3},
4024 .type = TestOperationType::GATHER
4025 }},
4026 .outputIndexes = {3}
4027 },
4028 .minSupportedVersion = TestHalVersion::UNKNOWN,
4029 .referenced = {}
4030 };
4031 return model;
4032 }
4033
4034 const auto dummy_test_model_relaxed_all_inputs_as_internal_6 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_6", get_test_model_relaxed_all_inputs_as_internal_6());
4035
4036 } // namespace generated_tests::gather
4037
4038 namespace generated_tests::gather {
4039
get_test_model_quant8_6()4040 const TestModel& get_test_model_quant8_6() {
4041 static TestModel model = {
4042 .expectFailure = false,
4043 .expectedMultinomialDistributionTolerance = 0,
4044 .isRelaxed = false,
4045 .main = {
4046 .inputIndexes = {0},
4047 .operands = {{ // input05
4048 .channelQuant = {},
4049 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
4050 .dimensions = {4, 1},
4051 .isIgnored = false,
4052 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4053 .numberOfConsumers = 1,
4054 .scale = 0.5f,
4055 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4056 .zeroPoint = 127
4057 }, { // param10
4058 .channelQuant = {},
4059 .data = TestBuffer::createFromVector<int32_t>({0}),
4060 .dimensions = {},
4061 .isIgnored = false,
4062 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4063 .numberOfConsumers = 1,
4064 .scale = 0.0f,
4065 .type = TestOperandType::INT32,
4066 .zeroPoint = 0
4067 }, { // param11
4068 .channelQuant = {},
4069 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
4070 .dimensions = {2},
4071 .isIgnored = false,
4072 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4073 .numberOfConsumers = 1,
4074 .scale = 0.0f,
4075 .type = TestOperandType::TENSOR_INT32,
4076 .zeroPoint = 0
4077 }, { // output05
4078 .channelQuant = {},
4079 .data = TestBuffer::createFromVector<uint8_t>({127, 129}),
4080 .dimensions = {2, 1},
4081 .isIgnored = false,
4082 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4083 .numberOfConsumers = 0,
4084 .scale = 0.5f,
4085 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4086 .zeroPoint = 127
4087 }},
4088 .operations = {{
4089 .inputs = {0, 1, 2},
4090 .outputs = {3},
4091 .type = TestOperationType::GATHER
4092 }},
4093 .outputIndexes = {3}
4094 },
4095 .minSupportedVersion = TestHalVersion::V1_2,
4096 .referenced = {}
4097 };
4098 return model;
4099 }
4100
4101 const auto dummy_test_model_quant8_6 = TestModelManager::get().add("gather_quant8_6", get_test_model_quant8_6());
4102
4103 } // namespace generated_tests::gather
4104
4105 namespace generated_tests::gather {
4106
get_test_model_quant8_all_inputs_as_internal_6()4107 const TestModel& get_test_model_quant8_all_inputs_as_internal_6() {
4108 static TestModel model = {
4109 .expectFailure = false,
4110 .expectedMultinomialDistributionTolerance = 0,
4111 .isRelaxed = false,
4112 .main = {
4113 .inputIndexes = {4},
4114 .operands = {{ // input05
4115 .channelQuant = {},
4116 .data = TestBuffer::createFromVector<uint8_t>({}),
4117 .dimensions = {4, 1},
4118 .isIgnored = false,
4119 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4120 .numberOfConsumers = 1,
4121 .scale = 0.5f,
4122 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4123 .zeroPoint = 127
4124 }, { // param10
4125 .channelQuant = {},
4126 .data = TestBuffer::createFromVector<int32_t>({0}),
4127 .dimensions = {},
4128 .isIgnored = false,
4129 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4130 .numberOfConsumers = 1,
4131 .scale = 0.0f,
4132 .type = TestOperandType::INT32,
4133 .zeroPoint = 0
4134 }, { // param11
4135 .channelQuant = {},
4136 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
4137 .dimensions = {2},
4138 .isIgnored = false,
4139 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4140 .numberOfConsumers = 1,
4141 .scale = 0.0f,
4142 .type = TestOperandType::TENSOR_INT32,
4143 .zeroPoint = 0
4144 }, { // output05
4145 .channelQuant = {},
4146 .data = TestBuffer::createFromVector<uint8_t>({127, 129}),
4147 .dimensions = {2, 1},
4148 .isIgnored = false,
4149 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4150 .numberOfConsumers = 0,
4151 .scale = 0.5f,
4152 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4153 .zeroPoint = 127
4154 }, { // input05_new
4155 .channelQuant = {},
4156 .data = TestBuffer::createFromVector<uint8_t>({123, 127, 128, 129}),
4157 .dimensions = {4, 1},
4158 .isIgnored = false,
4159 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4160 .numberOfConsumers = 1,
4161 .scale = 0.5f,
4162 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4163 .zeroPoint = 127
4164 }, { // placeholder22
4165 .channelQuant = {},
4166 .data = TestBuffer::createFromVector<uint8_t>({127}),
4167 .dimensions = {1},
4168 .isIgnored = false,
4169 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4170 .numberOfConsumers = 1,
4171 .scale = 0.5f,
4172 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4173 .zeroPoint = 127
4174 }, { // param38
4175 .channelQuant = {},
4176 .data = TestBuffer::createFromVector<int32_t>({0}),
4177 .dimensions = {},
4178 .isIgnored = false,
4179 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4180 .numberOfConsumers = 1,
4181 .scale = 0.0f,
4182 .type = TestOperandType::INT32,
4183 .zeroPoint = 0
4184 }},
4185 .operations = {{
4186 .inputs = {4, 5, 6},
4187 .outputs = {0},
4188 .type = TestOperationType::ADD
4189 }, {
4190 .inputs = {0, 1, 2},
4191 .outputs = {3},
4192 .type = TestOperationType::GATHER
4193 }},
4194 .outputIndexes = {3}
4195 },
4196 .minSupportedVersion = TestHalVersion::V1_2,
4197 .referenced = {}
4198 };
4199 return model;
4200 }
4201
4202 const auto dummy_test_model_quant8_all_inputs_as_internal_6 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_6", get_test_model_quant8_all_inputs_as_internal_6());
4203
4204 } // namespace generated_tests::gather
4205
4206 namespace generated_tests::gather {
4207
get_test_model_int32_6()4208 const TestModel& get_test_model_int32_6() {
4209 static TestModel model = {
4210 .expectFailure = false,
4211 .expectedMultinomialDistributionTolerance = 0,
4212 .isRelaxed = false,
4213 .main = {
4214 .inputIndexes = {0},
4215 .operands = {{ // input05
4216 .channelQuant = {},
4217 .data = TestBuffer::createFromVector<int32_t>({-2, 0, 1, 1}),
4218 .dimensions = {4, 1},
4219 .isIgnored = false,
4220 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4221 .numberOfConsumers = 1,
4222 .scale = 0.0f,
4223 .type = TestOperandType::TENSOR_INT32,
4224 .zeroPoint = 0
4225 }, { // param10
4226 .channelQuant = {},
4227 .data = TestBuffer::createFromVector<int32_t>({0}),
4228 .dimensions = {},
4229 .isIgnored = false,
4230 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4231 .numberOfConsumers = 1,
4232 .scale = 0.0f,
4233 .type = TestOperandType::INT32,
4234 .zeroPoint = 0
4235 }, { // param11
4236 .channelQuant = {},
4237 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
4238 .dimensions = {2},
4239 .isIgnored = false,
4240 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4241 .numberOfConsumers = 1,
4242 .scale = 0.0f,
4243 .type = TestOperandType::TENSOR_INT32,
4244 .zeroPoint = 0
4245 }, { // output05
4246 .channelQuant = {},
4247 .data = TestBuffer::createFromVector<int32_t>({0, 1}),
4248 .dimensions = {2, 1},
4249 .isIgnored = false,
4250 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4251 .numberOfConsumers = 0,
4252 .scale = 0.0f,
4253 .type = TestOperandType::TENSOR_INT32,
4254 .zeroPoint = 0
4255 }},
4256 .operations = {{
4257 .inputs = {0, 1, 2},
4258 .outputs = {3},
4259 .type = TestOperationType::GATHER
4260 }},
4261 .outputIndexes = {3}
4262 },
4263 .minSupportedVersion = TestHalVersion::V1_2,
4264 .referenced = {}
4265 };
4266 return model;
4267 }
4268
4269 const auto dummy_test_model_int32_6 = TestModelManager::get().add("gather_int32_6", get_test_model_int32_6());
4270
4271 } // namespace generated_tests::gather
4272
4273 namespace generated_tests::gather {
4274
get_test_model_float16_6()4275 const TestModel& get_test_model_float16_6() {
4276 static TestModel model = {
4277 .expectFailure = false,
4278 .expectedMultinomialDistributionTolerance = 0,
4279 .isRelaxed = false,
4280 .main = {
4281 .inputIndexes = {0},
4282 .operands = {{ // input05
4283 .channelQuant = {},
4284 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
4285 .dimensions = {4, 1},
4286 .isIgnored = false,
4287 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4288 .numberOfConsumers = 1,
4289 .scale = 0.0f,
4290 .type = TestOperandType::TENSOR_FLOAT16,
4291 .zeroPoint = 0
4292 }, { // param10
4293 .channelQuant = {},
4294 .data = TestBuffer::createFromVector<int32_t>({0}),
4295 .dimensions = {},
4296 .isIgnored = false,
4297 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4298 .numberOfConsumers = 1,
4299 .scale = 0.0f,
4300 .type = TestOperandType::INT32,
4301 .zeroPoint = 0
4302 }, { // param11
4303 .channelQuant = {},
4304 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
4305 .dimensions = {2},
4306 .isIgnored = false,
4307 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4308 .numberOfConsumers = 1,
4309 .scale = 0.0f,
4310 .type = TestOperandType::TENSOR_INT32,
4311 .zeroPoint = 0
4312 }, { // output05
4313 .channelQuant = {},
4314 .data = TestBuffer::createFromVector<_Float16>({0.20000000298023224f, 0.800000011920929f}),
4315 .dimensions = {2, 1},
4316 .isIgnored = false,
4317 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4318 .numberOfConsumers = 0,
4319 .scale = 0.0f,
4320 .type = TestOperandType::TENSOR_FLOAT16,
4321 .zeroPoint = 0
4322 }},
4323 .operations = {{
4324 .inputs = {0, 1, 2},
4325 .outputs = {3},
4326 .type = TestOperationType::GATHER
4327 }},
4328 .outputIndexes = {3}
4329 },
4330 .minSupportedVersion = TestHalVersion::V1_2,
4331 .referenced = {}
4332 };
4333 return model;
4334 }
4335
4336 const auto dummy_test_model_float16_6 = TestModelManager::get().add("gather_float16_6", get_test_model_float16_6());
4337
4338 } // namespace generated_tests::gather
4339
4340 namespace generated_tests::gather {
4341
get_test_model_float16_all_inputs_as_internal_6()4342 const TestModel& get_test_model_float16_all_inputs_as_internal_6() {
4343 static TestModel model = {
4344 .expectFailure = false,
4345 .expectedMultinomialDistributionTolerance = 0,
4346 .isRelaxed = false,
4347 .main = {
4348 .inputIndexes = {4},
4349 .operands = {{ // input05
4350 .channelQuant = {},
4351 .data = TestBuffer::createFromVector<_Float16>({}),
4352 .dimensions = {4, 1},
4353 .isIgnored = false,
4354 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4355 .numberOfConsumers = 1,
4356 .scale = 0.0f,
4357 .type = TestOperandType::TENSOR_FLOAT16,
4358 .zeroPoint = 0
4359 }, { // param10
4360 .channelQuant = {},
4361 .data = TestBuffer::createFromVector<int32_t>({0}),
4362 .dimensions = {},
4363 .isIgnored = false,
4364 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4365 .numberOfConsumers = 1,
4366 .scale = 0.0f,
4367 .type = TestOperandType::INT32,
4368 .zeroPoint = 0
4369 }, { // param11
4370 .channelQuant = {},
4371 .data = TestBuffer::createFromVector<int32_t>({1, 3}),
4372 .dimensions = {2},
4373 .isIgnored = false,
4374 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4375 .numberOfConsumers = 1,
4376 .scale = 0.0f,
4377 .type = TestOperandType::TENSOR_INT32,
4378 .zeroPoint = 0
4379 }, { // output05
4380 .channelQuant = {},
4381 .data = TestBuffer::createFromVector<_Float16>({0.20000000298023224f, 0.800000011920929f}),
4382 .dimensions = {2, 1},
4383 .isIgnored = false,
4384 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4385 .numberOfConsumers = 0,
4386 .scale = 0.0f,
4387 .type = TestOperandType::TENSOR_FLOAT16,
4388 .zeroPoint = 0
4389 }, { // input05_new
4390 .channelQuant = {},
4391 .data = TestBuffer::createFromVector<_Float16>({-2.0f, 0.20000000298023224f, 0.699999988079071f, 0.800000011920929f}),
4392 .dimensions = {4, 1},
4393 .isIgnored = false,
4394 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4395 .numberOfConsumers = 1,
4396 .scale = 0.0f,
4397 .type = TestOperandType::TENSOR_FLOAT16,
4398 .zeroPoint = 0
4399 }, { // placeholder23
4400 .channelQuant = {},
4401 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
4402 .dimensions = {1},
4403 .isIgnored = false,
4404 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4405 .numberOfConsumers = 1,
4406 .scale = 0.0f,
4407 .type = TestOperandType::TENSOR_FLOAT16,
4408 .zeroPoint = 0
4409 }, { // param39
4410 .channelQuant = {},
4411 .data = TestBuffer::createFromVector<int32_t>({0}),
4412 .dimensions = {},
4413 .isIgnored = false,
4414 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4415 .numberOfConsumers = 1,
4416 .scale = 0.0f,
4417 .type = TestOperandType::INT32,
4418 .zeroPoint = 0
4419 }},
4420 .operations = {{
4421 .inputs = {4, 5, 6},
4422 .outputs = {0},
4423 .type = TestOperationType::ADD
4424 }, {
4425 .inputs = {0, 1, 2},
4426 .outputs = {3},
4427 .type = TestOperationType::GATHER
4428 }},
4429 .outputIndexes = {3}
4430 },
4431 .minSupportedVersion = TestHalVersion::V1_2,
4432 .referenced = {}
4433 };
4434 return model;
4435 }
4436
4437 const auto dummy_test_model_float16_all_inputs_as_internal_6 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_6", get_test_model_float16_all_inputs_as_internal_6());
4438
4439 } // namespace generated_tests::gather
4440
4441 namespace generated_tests::gather {
4442
get_test_model_7()4443 const TestModel& get_test_model_7() {
4444 static TestModel model = {
4445 .expectFailure = false,
4446 .expectedMultinomialDistributionTolerance = 0,
4447 .isRelaxed = false,
4448 .main = {
4449 .inputIndexes = {0},
4450 .operands = {{ // input06
4451 .channelQuant = {},
4452 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
4453 .dimensions = {1, 2, 3},
4454 .isIgnored = false,
4455 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4456 .numberOfConsumers = 1,
4457 .scale = 0.0f,
4458 .type = TestOperandType::TENSOR_FLOAT32,
4459 .zeroPoint = 0
4460 }, { // param12
4461 .channelQuant = {},
4462 .data = TestBuffer::createFromVector<int32_t>({1}),
4463 .dimensions = {},
4464 .isIgnored = false,
4465 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4466 .numberOfConsumers = 1,
4467 .scale = 0.0f,
4468 .type = TestOperandType::INT32,
4469 .zeroPoint = 0
4470 }, { // param13
4471 .channelQuant = {},
4472 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4473 .dimensions = {2},
4474 .isIgnored = false,
4475 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4476 .numberOfConsumers = 1,
4477 .scale = 0.0f,
4478 .type = TestOperandType::TENSOR_INT32,
4479 .zeroPoint = 0
4480 }, { // output06
4481 .channelQuant = {},
4482 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
4483 .dimensions = {1, 2, 3},
4484 .isIgnored = false,
4485 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4486 .numberOfConsumers = 0,
4487 .scale = 0.0f,
4488 .type = TestOperandType::TENSOR_FLOAT32,
4489 .zeroPoint = 0
4490 }},
4491 .operations = {{
4492 .inputs = {0, 1, 2},
4493 .outputs = {3},
4494 .type = TestOperationType::GATHER
4495 }},
4496 .outputIndexes = {3}
4497 },
4498 .minSupportedVersion = TestHalVersion::V1_2,
4499 .referenced = {}
4500 };
4501 return model;
4502 }
4503
4504 const auto dummy_test_model_7 = TestModelManager::get().add("gather_7", get_test_model_7());
4505
4506 } // namespace generated_tests::gather
4507
4508 namespace generated_tests::gather {
4509
get_test_model_all_inputs_as_internal_7()4510 const TestModel& get_test_model_all_inputs_as_internal_7() {
4511 static TestModel model = {
4512 .expectFailure = false,
4513 .expectedMultinomialDistributionTolerance = 0,
4514 .isRelaxed = false,
4515 .main = {
4516 .inputIndexes = {4},
4517 .operands = {{ // input06
4518 .channelQuant = {},
4519 .data = TestBuffer::createFromVector<float>({}),
4520 .dimensions = {1, 2, 3},
4521 .isIgnored = false,
4522 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4523 .numberOfConsumers = 1,
4524 .scale = 0.0f,
4525 .type = TestOperandType::TENSOR_FLOAT32,
4526 .zeroPoint = 0
4527 }, { // param12
4528 .channelQuant = {},
4529 .data = TestBuffer::createFromVector<int32_t>({1}),
4530 .dimensions = {},
4531 .isIgnored = false,
4532 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4533 .numberOfConsumers = 1,
4534 .scale = 0.0f,
4535 .type = TestOperandType::INT32,
4536 .zeroPoint = 0
4537 }, { // param13
4538 .channelQuant = {},
4539 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4540 .dimensions = {2},
4541 .isIgnored = false,
4542 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4543 .numberOfConsumers = 1,
4544 .scale = 0.0f,
4545 .type = TestOperandType::TENSOR_INT32,
4546 .zeroPoint = 0
4547 }, { // output06
4548 .channelQuant = {},
4549 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
4550 .dimensions = {1, 2, 3},
4551 .isIgnored = false,
4552 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4553 .numberOfConsumers = 0,
4554 .scale = 0.0f,
4555 .type = TestOperandType::TENSOR_FLOAT32,
4556 .zeroPoint = 0
4557 }, { // input06_new
4558 .channelQuant = {},
4559 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
4560 .dimensions = {1, 2, 3},
4561 .isIgnored = false,
4562 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4563 .numberOfConsumers = 1,
4564 .scale = 0.0f,
4565 .type = TestOperandType::TENSOR_FLOAT32,
4566 .zeroPoint = 0
4567 }, { // placeholder24
4568 .channelQuant = {},
4569 .data = TestBuffer::createFromVector<float>({0.0f}),
4570 .dimensions = {1},
4571 .isIgnored = false,
4572 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4573 .numberOfConsumers = 1,
4574 .scale = 0.0f,
4575 .type = TestOperandType::TENSOR_FLOAT32,
4576 .zeroPoint = 0
4577 }, { // param40
4578 .channelQuant = {},
4579 .data = TestBuffer::createFromVector<int32_t>({0}),
4580 .dimensions = {},
4581 .isIgnored = false,
4582 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4583 .numberOfConsumers = 1,
4584 .scale = 0.0f,
4585 .type = TestOperandType::INT32,
4586 .zeroPoint = 0
4587 }},
4588 .operations = {{
4589 .inputs = {4, 5, 6},
4590 .outputs = {0},
4591 .type = TestOperationType::ADD
4592 }, {
4593 .inputs = {0, 1, 2},
4594 .outputs = {3},
4595 .type = TestOperationType::GATHER
4596 }},
4597 .outputIndexes = {3}
4598 },
4599 .minSupportedVersion = TestHalVersion::V1_2,
4600 .referenced = {}
4601 };
4602 return model;
4603 }
4604
4605 const auto dummy_test_model_all_inputs_as_internal_7 = TestModelManager::get().add("gather_all_inputs_as_internal_7", get_test_model_all_inputs_as_internal_7());
4606
4607 } // namespace generated_tests::gather
4608
4609 namespace generated_tests::gather {
4610
get_test_model_relaxed_7()4611 const TestModel& get_test_model_relaxed_7() {
4612 static TestModel model = {
4613 .expectFailure = false,
4614 .expectedMultinomialDistributionTolerance = 0,
4615 .isRelaxed = true,
4616 .main = {
4617 .inputIndexes = {0},
4618 .operands = {{ // input06
4619 .channelQuant = {},
4620 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
4621 .dimensions = {1, 2, 3},
4622 .isIgnored = false,
4623 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4624 .numberOfConsumers = 1,
4625 .scale = 0.0f,
4626 .type = TestOperandType::TENSOR_FLOAT32,
4627 .zeroPoint = 0
4628 }, { // param12
4629 .channelQuant = {},
4630 .data = TestBuffer::createFromVector<int32_t>({1}),
4631 .dimensions = {},
4632 .isIgnored = false,
4633 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4634 .numberOfConsumers = 1,
4635 .scale = 0.0f,
4636 .type = TestOperandType::INT32,
4637 .zeroPoint = 0
4638 }, { // param13
4639 .channelQuant = {},
4640 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4641 .dimensions = {2},
4642 .isIgnored = false,
4643 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4644 .numberOfConsumers = 1,
4645 .scale = 0.0f,
4646 .type = TestOperandType::TENSOR_INT32,
4647 .zeroPoint = 0
4648 }, { // output06
4649 .channelQuant = {},
4650 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
4651 .dimensions = {1, 2, 3},
4652 .isIgnored = false,
4653 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4654 .numberOfConsumers = 0,
4655 .scale = 0.0f,
4656 .type = TestOperandType::TENSOR_FLOAT32,
4657 .zeroPoint = 0
4658 }},
4659 .operations = {{
4660 .inputs = {0, 1, 2},
4661 .outputs = {3},
4662 .type = TestOperationType::GATHER
4663 }},
4664 .outputIndexes = {3}
4665 },
4666 .minSupportedVersion = TestHalVersion::UNKNOWN,
4667 .referenced = {}
4668 };
4669 return model;
4670 }
4671
4672 const auto dummy_test_model_relaxed_7 = TestModelManager::get().add("gather_relaxed_7", get_test_model_relaxed_7());
4673
4674 } // namespace generated_tests::gather
4675
4676 namespace generated_tests::gather {
4677
get_test_model_relaxed_all_inputs_as_internal_7()4678 const TestModel& get_test_model_relaxed_all_inputs_as_internal_7() {
4679 static TestModel model = {
4680 .expectFailure = false,
4681 .expectedMultinomialDistributionTolerance = 0,
4682 .isRelaxed = true,
4683 .main = {
4684 .inputIndexes = {4},
4685 .operands = {{ // input06
4686 .channelQuant = {},
4687 .data = TestBuffer::createFromVector<float>({}),
4688 .dimensions = {1, 2, 3},
4689 .isIgnored = false,
4690 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4691 .numberOfConsumers = 1,
4692 .scale = 0.0f,
4693 .type = TestOperandType::TENSOR_FLOAT32,
4694 .zeroPoint = 0
4695 }, { // param12
4696 .channelQuant = {},
4697 .data = TestBuffer::createFromVector<int32_t>({1}),
4698 .dimensions = {},
4699 .isIgnored = false,
4700 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4701 .numberOfConsumers = 1,
4702 .scale = 0.0f,
4703 .type = TestOperandType::INT32,
4704 .zeroPoint = 0
4705 }, { // param13
4706 .channelQuant = {},
4707 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4708 .dimensions = {2},
4709 .isIgnored = false,
4710 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4711 .numberOfConsumers = 1,
4712 .scale = 0.0f,
4713 .type = TestOperandType::TENSOR_INT32,
4714 .zeroPoint = 0
4715 }, { // output06
4716 .channelQuant = {},
4717 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
4718 .dimensions = {1, 2, 3},
4719 .isIgnored = false,
4720 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4721 .numberOfConsumers = 0,
4722 .scale = 0.0f,
4723 .type = TestOperandType::TENSOR_FLOAT32,
4724 .zeroPoint = 0
4725 }, { // input06_new
4726 .channelQuant = {},
4727 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
4728 .dimensions = {1, 2, 3},
4729 .isIgnored = false,
4730 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4731 .numberOfConsumers = 1,
4732 .scale = 0.0f,
4733 .type = TestOperandType::TENSOR_FLOAT32,
4734 .zeroPoint = 0
4735 }, { // placeholder25
4736 .channelQuant = {},
4737 .data = TestBuffer::createFromVector<float>({0.0f}),
4738 .dimensions = {1},
4739 .isIgnored = false,
4740 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4741 .numberOfConsumers = 1,
4742 .scale = 0.0f,
4743 .type = TestOperandType::TENSOR_FLOAT32,
4744 .zeroPoint = 0
4745 }, { // param41
4746 .channelQuant = {},
4747 .data = TestBuffer::createFromVector<int32_t>({0}),
4748 .dimensions = {},
4749 .isIgnored = false,
4750 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4751 .numberOfConsumers = 1,
4752 .scale = 0.0f,
4753 .type = TestOperandType::INT32,
4754 .zeroPoint = 0
4755 }},
4756 .operations = {{
4757 .inputs = {4, 5, 6},
4758 .outputs = {0},
4759 .type = TestOperationType::ADD
4760 }, {
4761 .inputs = {0, 1, 2},
4762 .outputs = {3},
4763 .type = TestOperationType::GATHER
4764 }},
4765 .outputIndexes = {3}
4766 },
4767 .minSupportedVersion = TestHalVersion::UNKNOWN,
4768 .referenced = {}
4769 };
4770 return model;
4771 }
4772
4773 const auto dummy_test_model_relaxed_all_inputs_as_internal_7 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_7", get_test_model_relaxed_all_inputs_as_internal_7());
4774
4775 } // namespace generated_tests::gather
4776
4777 namespace generated_tests::gather {
4778
get_test_model_quant8_7()4779 const TestModel& get_test_model_quant8_7() {
4780 static TestModel model = {
4781 .expectFailure = false,
4782 .expectedMultinomialDistributionTolerance = 0,
4783 .isRelaxed = false,
4784 .main = {
4785 .inputIndexes = {0},
4786 .operands = {{ // input06
4787 .channelQuant = {},
4788 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
4789 .dimensions = {1, 2, 3},
4790 .isIgnored = false,
4791 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4792 .numberOfConsumers = 1,
4793 .scale = 0.5f,
4794 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4795 .zeroPoint = 127
4796 }, { // param12
4797 .channelQuant = {},
4798 .data = TestBuffer::createFromVector<int32_t>({1}),
4799 .dimensions = {},
4800 .isIgnored = false,
4801 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4802 .numberOfConsumers = 1,
4803 .scale = 0.0f,
4804 .type = TestOperandType::INT32,
4805 .zeroPoint = 0
4806 }, { // param13
4807 .channelQuant = {},
4808 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4809 .dimensions = {2},
4810 .isIgnored = false,
4811 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4812 .numberOfConsumers = 1,
4813 .scale = 0.0f,
4814 .type = TestOperandType::TENSOR_INT32,
4815 .zeroPoint = 0
4816 }, { // output06
4817 .channelQuant = {},
4818 .data = TestBuffer::createFromVector<uint8_t>({135, 137, 139, 129, 131, 133}),
4819 .dimensions = {1, 2, 3},
4820 .isIgnored = false,
4821 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4822 .numberOfConsumers = 0,
4823 .scale = 0.5f,
4824 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4825 .zeroPoint = 127
4826 }},
4827 .operations = {{
4828 .inputs = {0, 1, 2},
4829 .outputs = {3},
4830 .type = TestOperationType::GATHER
4831 }},
4832 .outputIndexes = {3}
4833 },
4834 .minSupportedVersion = TestHalVersion::V1_2,
4835 .referenced = {}
4836 };
4837 return model;
4838 }
4839
4840 const auto dummy_test_model_quant8_7 = TestModelManager::get().add("gather_quant8_7", get_test_model_quant8_7());
4841
4842 } // namespace generated_tests::gather
4843
4844 namespace generated_tests::gather {
4845
get_test_model_quant8_all_inputs_as_internal_7()4846 const TestModel& get_test_model_quant8_all_inputs_as_internal_7() {
4847 static TestModel model = {
4848 .expectFailure = false,
4849 .expectedMultinomialDistributionTolerance = 0,
4850 .isRelaxed = false,
4851 .main = {
4852 .inputIndexes = {4},
4853 .operands = {{ // input06
4854 .channelQuant = {},
4855 .data = TestBuffer::createFromVector<uint8_t>({}),
4856 .dimensions = {1, 2, 3},
4857 .isIgnored = false,
4858 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4859 .numberOfConsumers = 1,
4860 .scale = 0.5f,
4861 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4862 .zeroPoint = 127
4863 }, { // param12
4864 .channelQuant = {},
4865 .data = TestBuffer::createFromVector<int32_t>({1}),
4866 .dimensions = {},
4867 .isIgnored = false,
4868 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4869 .numberOfConsumers = 1,
4870 .scale = 0.0f,
4871 .type = TestOperandType::INT32,
4872 .zeroPoint = 0
4873 }, { // param13
4874 .channelQuant = {},
4875 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4876 .dimensions = {2},
4877 .isIgnored = false,
4878 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4879 .numberOfConsumers = 1,
4880 .scale = 0.0f,
4881 .type = TestOperandType::TENSOR_INT32,
4882 .zeroPoint = 0
4883 }, { // output06
4884 .channelQuant = {},
4885 .data = TestBuffer::createFromVector<uint8_t>({135, 137, 139, 129, 131, 133}),
4886 .dimensions = {1, 2, 3},
4887 .isIgnored = false,
4888 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4889 .numberOfConsumers = 0,
4890 .scale = 0.5f,
4891 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4892 .zeroPoint = 127
4893 }, { // input06_new
4894 .channelQuant = {},
4895 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
4896 .dimensions = {1, 2, 3},
4897 .isIgnored = false,
4898 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4899 .numberOfConsumers = 1,
4900 .scale = 0.5f,
4901 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4902 .zeroPoint = 127
4903 }, { // placeholder26
4904 .channelQuant = {},
4905 .data = TestBuffer::createFromVector<uint8_t>({127}),
4906 .dimensions = {1},
4907 .isIgnored = false,
4908 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4909 .numberOfConsumers = 1,
4910 .scale = 0.5f,
4911 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
4912 .zeroPoint = 127
4913 }, { // param42
4914 .channelQuant = {},
4915 .data = TestBuffer::createFromVector<int32_t>({0}),
4916 .dimensions = {},
4917 .isIgnored = false,
4918 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4919 .numberOfConsumers = 1,
4920 .scale = 0.0f,
4921 .type = TestOperandType::INT32,
4922 .zeroPoint = 0
4923 }},
4924 .operations = {{
4925 .inputs = {4, 5, 6},
4926 .outputs = {0},
4927 .type = TestOperationType::ADD
4928 }, {
4929 .inputs = {0, 1, 2},
4930 .outputs = {3},
4931 .type = TestOperationType::GATHER
4932 }},
4933 .outputIndexes = {3}
4934 },
4935 .minSupportedVersion = TestHalVersion::V1_2,
4936 .referenced = {}
4937 };
4938 return model;
4939 }
4940
4941 const auto dummy_test_model_quant8_all_inputs_as_internal_7 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_7", get_test_model_quant8_all_inputs_as_internal_7());
4942
4943 } // namespace generated_tests::gather
4944
4945 namespace generated_tests::gather {
4946
get_test_model_int32_7()4947 const TestModel& get_test_model_int32_7() {
4948 static TestModel model = {
4949 .expectFailure = false,
4950 .expectedMultinomialDistributionTolerance = 0,
4951 .isRelaxed = false,
4952 .main = {
4953 .inputIndexes = {0},
4954 .operands = {{ // input06
4955 .channelQuant = {},
4956 .data = TestBuffer::createFromVector<int32_t>({1, 2, 3, 4, 5, 6}),
4957 .dimensions = {1, 2, 3},
4958 .isIgnored = false,
4959 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4960 .numberOfConsumers = 1,
4961 .scale = 0.0f,
4962 .type = TestOperandType::TENSOR_INT32,
4963 .zeroPoint = 0
4964 }, { // param12
4965 .channelQuant = {},
4966 .data = TestBuffer::createFromVector<int32_t>({1}),
4967 .dimensions = {},
4968 .isIgnored = false,
4969 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4970 .numberOfConsumers = 1,
4971 .scale = 0.0f,
4972 .type = TestOperandType::INT32,
4973 .zeroPoint = 0
4974 }, { // param13
4975 .channelQuant = {},
4976 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
4977 .dimensions = {2},
4978 .isIgnored = false,
4979 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4980 .numberOfConsumers = 1,
4981 .scale = 0.0f,
4982 .type = TestOperandType::TENSOR_INT32,
4983 .zeroPoint = 0
4984 }, { // output06
4985 .channelQuant = {},
4986 .data = TestBuffer::createFromVector<int32_t>({4, 5, 6, 1, 2, 3}),
4987 .dimensions = {1, 2, 3},
4988 .isIgnored = false,
4989 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4990 .numberOfConsumers = 0,
4991 .scale = 0.0f,
4992 .type = TestOperandType::TENSOR_INT32,
4993 .zeroPoint = 0
4994 }},
4995 .operations = {{
4996 .inputs = {0, 1, 2},
4997 .outputs = {3},
4998 .type = TestOperationType::GATHER
4999 }},
5000 .outputIndexes = {3}
5001 },
5002 .minSupportedVersion = TestHalVersion::V1_2,
5003 .referenced = {}
5004 };
5005 return model;
5006 }
5007
5008 const auto dummy_test_model_int32_7 = TestModelManager::get().add("gather_int32_7", get_test_model_int32_7());
5009
5010 } // namespace generated_tests::gather
5011
5012 namespace generated_tests::gather {
5013
get_test_model_float16_7()5014 const TestModel& get_test_model_float16_7() {
5015 static TestModel model = {
5016 .expectFailure = false,
5017 .expectedMultinomialDistributionTolerance = 0,
5018 .isRelaxed = false,
5019 .main = {
5020 .inputIndexes = {0},
5021 .operands = {{ // input06
5022 .channelQuant = {},
5023 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5024 .dimensions = {1, 2, 3},
5025 .isIgnored = false,
5026 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5027 .numberOfConsumers = 1,
5028 .scale = 0.0f,
5029 .type = TestOperandType::TENSOR_FLOAT16,
5030 .zeroPoint = 0
5031 }, { // param12
5032 .channelQuant = {},
5033 .data = TestBuffer::createFromVector<int32_t>({1}),
5034 .dimensions = {},
5035 .isIgnored = false,
5036 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5037 .numberOfConsumers = 1,
5038 .scale = 0.0f,
5039 .type = TestOperandType::INT32,
5040 .zeroPoint = 0
5041 }, { // param13
5042 .channelQuant = {},
5043 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
5044 .dimensions = {2},
5045 .isIgnored = false,
5046 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5047 .numberOfConsumers = 1,
5048 .scale = 0.0f,
5049 .type = TestOperandType::TENSOR_INT32,
5050 .zeroPoint = 0
5051 }, { // output06
5052 .channelQuant = {},
5053 .data = TestBuffer::createFromVector<_Float16>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
5054 .dimensions = {1, 2, 3},
5055 .isIgnored = false,
5056 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5057 .numberOfConsumers = 0,
5058 .scale = 0.0f,
5059 .type = TestOperandType::TENSOR_FLOAT16,
5060 .zeroPoint = 0
5061 }},
5062 .operations = {{
5063 .inputs = {0, 1, 2},
5064 .outputs = {3},
5065 .type = TestOperationType::GATHER
5066 }},
5067 .outputIndexes = {3}
5068 },
5069 .minSupportedVersion = TestHalVersion::V1_2,
5070 .referenced = {}
5071 };
5072 return model;
5073 }
5074
5075 const auto dummy_test_model_float16_7 = TestModelManager::get().add("gather_float16_7", get_test_model_float16_7());
5076
5077 } // namespace generated_tests::gather
5078
5079 namespace generated_tests::gather {
5080
get_test_model_float16_all_inputs_as_internal_7()5081 const TestModel& get_test_model_float16_all_inputs_as_internal_7() {
5082 static TestModel model = {
5083 .expectFailure = false,
5084 .expectedMultinomialDistributionTolerance = 0,
5085 .isRelaxed = false,
5086 .main = {
5087 .inputIndexes = {4},
5088 .operands = {{ // input06
5089 .channelQuant = {},
5090 .data = TestBuffer::createFromVector<_Float16>({}),
5091 .dimensions = {1, 2, 3},
5092 .isIgnored = false,
5093 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
5094 .numberOfConsumers = 1,
5095 .scale = 0.0f,
5096 .type = TestOperandType::TENSOR_FLOAT16,
5097 .zeroPoint = 0
5098 }, { // param12
5099 .channelQuant = {},
5100 .data = TestBuffer::createFromVector<int32_t>({1}),
5101 .dimensions = {},
5102 .isIgnored = false,
5103 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5104 .numberOfConsumers = 1,
5105 .scale = 0.0f,
5106 .type = TestOperandType::INT32,
5107 .zeroPoint = 0
5108 }, { // param13
5109 .channelQuant = {},
5110 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
5111 .dimensions = {2},
5112 .isIgnored = false,
5113 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5114 .numberOfConsumers = 1,
5115 .scale = 0.0f,
5116 .type = TestOperandType::TENSOR_INT32,
5117 .zeroPoint = 0
5118 }, { // output06
5119 .channelQuant = {},
5120 .data = TestBuffer::createFromVector<_Float16>({4.0f, 5.0f, 6.0f, 1.0f, 2.0f, 3.0f}),
5121 .dimensions = {1, 2, 3},
5122 .isIgnored = false,
5123 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5124 .numberOfConsumers = 0,
5125 .scale = 0.0f,
5126 .type = TestOperandType::TENSOR_FLOAT16,
5127 .zeroPoint = 0
5128 }, { // input06_new
5129 .channelQuant = {},
5130 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5131 .dimensions = {1, 2, 3},
5132 .isIgnored = false,
5133 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5134 .numberOfConsumers = 1,
5135 .scale = 0.0f,
5136 .type = TestOperandType::TENSOR_FLOAT16,
5137 .zeroPoint = 0
5138 }, { // placeholder27
5139 .channelQuant = {},
5140 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
5141 .dimensions = {1},
5142 .isIgnored = false,
5143 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5144 .numberOfConsumers = 1,
5145 .scale = 0.0f,
5146 .type = TestOperandType::TENSOR_FLOAT16,
5147 .zeroPoint = 0
5148 }, { // param43
5149 .channelQuant = {},
5150 .data = TestBuffer::createFromVector<int32_t>({0}),
5151 .dimensions = {},
5152 .isIgnored = false,
5153 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5154 .numberOfConsumers = 1,
5155 .scale = 0.0f,
5156 .type = TestOperandType::INT32,
5157 .zeroPoint = 0
5158 }},
5159 .operations = {{
5160 .inputs = {4, 5, 6},
5161 .outputs = {0},
5162 .type = TestOperationType::ADD
5163 }, {
5164 .inputs = {0, 1, 2},
5165 .outputs = {3},
5166 .type = TestOperationType::GATHER
5167 }},
5168 .outputIndexes = {3}
5169 },
5170 .minSupportedVersion = TestHalVersion::V1_2,
5171 .referenced = {}
5172 };
5173 return model;
5174 }
5175
5176 const auto dummy_test_model_float16_all_inputs_as_internal_7 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_7", get_test_model_float16_all_inputs_as_internal_7());
5177
5178 } // namespace generated_tests::gather
5179
5180 namespace generated_tests::gather {
5181
get_test_model_8()5182 const TestModel& get_test_model_8() {
5183 static TestModel model = {
5184 .expectFailure = false,
5185 .expectedMultinomialDistributionTolerance = 0,
5186 .isRelaxed = false,
5187 .main = {
5188 .inputIndexes = {0},
5189 .operands = {{ // input07
5190 .channelQuant = {},
5191 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5192 .dimensions = {1, 2, 3},
5193 .isIgnored = false,
5194 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5195 .numberOfConsumers = 1,
5196 .scale = 0.0f,
5197 .type = TestOperandType::TENSOR_FLOAT32,
5198 .zeroPoint = 0
5199 }, { // param14
5200 .channelQuant = {},
5201 .data = TestBuffer::createFromVector<int32_t>({-1}),
5202 .dimensions = {},
5203 .isIgnored = false,
5204 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5205 .numberOfConsumers = 1,
5206 .scale = 0.0f,
5207 .type = TestOperandType::INT32,
5208 .zeroPoint = 0
5209 }, { // param15
5210 .channelQuant = {},
5211 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5212 .dimensions = {2},
5213 .isIgnored = false,
5214 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5215 .numberOfConsumers = 1,
5216 .scale = 0.0f,
5217 .type = TestOperandType::TENSOR_INT32,
5218 .zeroPoint = 0
5219 }, { // output07
5220 .channelQuant = {},
5221 .data = TestBuffer::createFromVector<float>({3.0f, 1.0f, 6.0f, 4.0f}),
5222 .dimensions = {1, 2, 2},
5223 .isIgnored = false,
5224 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5225 .numberOfConsumers = 0,
5226 .scale = 0.0f,
5227 .type = TestOperandType::TENSOR_FLOAT32,
5228 .zeroPoint = 0
5229 }},
5230 .operations = {{
5231 .inputs = {0, 1, 2},
5232 .outputs = {3},
5233 .type = TestOperationType::GATHER
5234 }},
5235 .outputIndexes = {3}
5236 },
5237 .minSupportedVersion = TestHalVersion::V1_2,
5238 .referenced = {}
5239 };
5240 return model;
5241 }
5242
5243 const auto dummy_test_model_8 = TestModelManager::get().add("gather_8", get_test_model_8());
5244
5245 } // namespace generated_tests::gather
5246
5247 namespace generated_tests::gather {
5248
get_test_model_all_inputs_as_internal_8()5249 const TestModel& get_test_model_all_inputs_as_internal_8() {
5250 static TestModel model = {
5251 .expectFailure = false,
5252 .expectedMultinomialDistributionTolerance = 0,
5253 .isRelaxed = false,
5254 .main = {
5255 .inputIndexes = {4},
5256 .operands = {{ // input07
5257 .channelQuant = {},
5258 .data = TestBuffer::createFromVector<float>({}),
5259 .dimensions = {1, 2, 3},
5260 .isIgnored = false,
5261 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
5262 .numberOfConsumers = 1,
5263 .scale = 0.0f,
5264 .type = TestOperandType::TENSOR_FLOAT32,
5265 .zeroPoint = 0
5266 }, { // param14
5267 .channelQuant = {},
5268 .data = TestBuffer::createFromVector<int32_t>({-1}),
5269 .dimensions = {},
5270 .isIgnored = false,
5271 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5272 .numberOfConsumers = 1,
5273 .scale = 0.0f,
5274 .type = TestOperandType::INT32,
5275 .zeroPoint = 0
5276 }, { // param15
5277 .channelQuant = {},
5278 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5279 .dimensions = {2},
5280 .isIgnored = false,
5281 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5282 .numberOfConsumers = 1,
5283 .scale = 0.0f,
5284 .type = TestOperandType::TENSOR_INT32,
5285 .zeroPoint = 0
5286 }, { // output07
5287 .channelQuant = {},
5288 .data = TestBuffer::createFromVector<float>({3.0f, 1.0f, 6.0f, 4.0f}),
5289 .dimensions = {1, 2, 2},
5290 .isIgnored = false,
5291 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5292 .numberOfConsumers = 0,
5293 .scale = 0.0f,
5294 .type = TestOperandType::TENSOR_FLOAT32,
5295 .zeroPoint = 0
5296 }, { // input07_new
5297 .channelQuant = {},
5298 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5299 .dimensions = {1, 2, 3},
5300 .isIgnored = false,
5301 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5302 .numberOfConsumers = 1,
5303 .scale = 0.0f,
5304 .type = TestOperandType::TENSOR_FLOAT32,
5305 .zeroPoint = 0
5306 }, { // placeholder28
5307 .channelQuant = {},
5308 .data = TestBuffer::createFromVector<float>({0.0f}),
5309 .dimensions = {1},
5310 .isIgnored = false,
5311 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5312 .numberOfConsumers = 1,
5313 .scale = 0.0f,
5314 .type = TestOperandType::TENSOR_FLOAT32,
5315 .zeroPoint = 0
5316 }, { // param44
5317 .channelQuant = {},
5318 .data = TestBuffer::createFromVector<int32_t>({0}),
5319 .dimensions = {},
5320 .isIgnored = false,
5321 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5322 .numberOfConsumers = 1,
5323 .scale = 0.0f,
5324 .type = TestOperandType::INT32,
5325 .zeroPoint = 0
5326 }},
5327 .operations = {{
5328 .inputs = {4, 5, 6},
5329 .outputs = {0},
5330 .type = TestOperationType::ADD
5331 }, {
5332 .inputs = {0, 1, 2},
5333 .outputs = {3},
5334 .type = TestOperationType::GATHER
5335 }},
5336 .outputIndexes = {3}
5337 },
5338 .minSupportedVersion = TestHalVersion::V1_2,
5339 .referenced = {}
5340 };
5341 return model;
5342 }
5343
5344 const auto dummy_test_model_all_inputs_as_internal_8 = TestModelManager::get().add("gather_all_inputs_as_internal_8", get_test_model_all_inputs_as_internal_8());
5345
5346 } // namespace generated_tests::gather
5347
5348 namespace generated_tests::gather {
5349
get_test_model_relaxed_8()5350 const TestModel& get_test_model_relaxed_8() {
5351 static TestModel model = {
5352 .expectFailure = false,
5353 .expectedMultinomialDistributionTolerance = 0,
5354 .isRelaxed = true,
5355 .main = {
5356 .inputIndexes = {0},
5357 .operands = {{ // input07
5358 .channelQuant = {},
5359 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5360 .dimensions = {1, 2, 3},
5361 .isIgnored = false,
5362 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5363 .numberOfConsumers = 1,
5364 .scale = 0.0f,
5365 .type = TestOperandType::TENSOR_FLOAT32,
5366 .zeroPoint = 0
5367 }, { // param14
5368 .channelQuant = {},
5369 .data = TestBuffer::createFromVector<int32_t>({-1}),
5370 .dimensions = {},
5371 .isIgnored = false,
5372 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5373 .numberOfConsumers = 1,
5374 .scale = 0.0f,
5375 .type = TestOperandType::INT32,
5376 .zeroPoint = 0
5377 }, { // param15
5378 .channelQuant = {},
5379 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5380 .dimensions = {2},
5381 .isIgnored = false,
5382 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5383 .numberOfConsumers = 1,
5384 .scale = 0.0f,
5385 .type = TestOperandType::TENSOR_INT32,
5386 .zeroPoint = 0
5387 }, { // output07
5388 .channelQuant = {},
5389 .data = TestBuffer::createFromVector<float>({3.0f, 1.0f, 6.0f, 4.0f}),
5390 .dimensions = {1, 2, 2},
5391 .isIgnored = false,
5392 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5393 .numberOfConsumers = 0,
5394 .scale = 0.0f,
5395 .type = TestOperandType::TENSOR_FLOAT32,
5396 .zeroPoint = 0
5397 }},
5398 .operations = {{
5399 .inputs = {0, 1, 2},
5400 .outputs = {3},
5401 .type = TestOperationType::GATHER
5402 }},
5403 .outputIndexes = {3}
5404 },
5405 .minSupportedVersion = TestHalVersion::UNKNOWN,
5406 .referenced = {}
5407 };
5408 return model;
5409 }
5410
5411 const auto dummy_test_model_relaxed_8 = TestModelManager::get().add("gather_relaxed_8", get_test_model_relaxed_8());
5412
5413 } // namespace generated_tests::gather
5414
5415 namespace generated_tests::gather {
5416
get_test_model_relaxed_all_inputs_as_internal_8()5417 const TestModel& get_test_model_relaxed_all_inputs_as_internal_8() {
5418 static TestModel model = {
5419 .expectFailure = false,
5420 .expectedMultinomialDistributionTolerance = 0,
5421 .isRelaxed = true,
5422 .main = {
5423 .inputIndexes = {4},
5424 .operands = {{ // input07
5425 .channelQuant = {},
5426 .data = TestBuffer::createFromVector<float>({}),
5427 .dimensions = {1, 2, 3},
5428 .isIgnored = false,
5429 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
5430 .numberOfConsumers = 1,
5431 .scale = 0.0f,
5432 .type = TestOperandType::TENSOR_FLOAT32,
5433 .zeroPoint = 0
5434 }, { // param14
5435 .channelQuant = {},
5436 .data = TestBuffer::createFromVector<int32_t>({-1}),
5437 .dimensions = {},
5438 .isIgnored = false,
5439 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5440 .numberOfConsumers = 1,
5441 .scale = 0.0f,
5442 .type = TestOperandType::INT32,
5443 .zeroPoint = 0
5444 }, { // param15
5445 .channelQuant = {},
5446 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5447 .dimensions = {2},
5448 .isIgnored = false,
5449 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5450 .numberOfConsumers = 1,
5451 .scale = 0.0f,
5452 .type = TestOperandType::TENSOR_INT32,
5453 .zeroPoint = 0
5454 }, { // output07
5455 .channelQuant = {},
5456 .data = TestBuffer::createFromVector<float>({3.0f, 1.0f, 6.0f, 4.0f}),
5457 .dimensions = {1, 2, 2},
5458 .isIgnored = false,
5459 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5460 .numberOfConsumers = 0,
5461 .scale = 0.0f,
5462 .type = TestOperandType::TENSOR_FLOAT32,
5463 .zeroPoint = 0
5464 }, { // input07_new
5465 .channelQuant = {},
5466 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5467 .dimensions = {1, 2, 3},
5468 .isIgnored = false,
5469 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5470 .numberOfConsumers = 1,
5471 .scale = 0.0f,
5472 .type = TestOperandType::TENSOR_FLOAT32,
5473 .zeroPoint = 0
5474 }, { // placeholder29
5475 .channelQuant = {},
5476 .data = TestBuffer::createFromVector<float>({0.0f}),
5477 .dimensions = {1},
5478 .isIgnored = false,
5479 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5480 .numberOfConsumers = 1,
5481 .scale = 0.0f,
5482 .type = TestOperandType::TENSOR_FLOAT32,
5483 .zeroPoint = 0
5484 }, { // param45
5485 .channelQuant = {},
5486 .data = TestBuffer::createFromVector<int32_t>({0}),
5487 .dimensions = {},
5488 .isIgnored = false,
5489 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5490 .numberOfConsumers = 1,
5491 .scale = 0.0f,
5492 .type = TestOperandType::INT32,
5493 .zeroPoint = 0
5494 }},
5495 .operations = {{
5496 .inputs = {4, 5, 6},
5497 .outputs = {0},
5498 .type = TestOperationType::ADD
5499 }, {
5500 .inputs = {0, 1, 2},
5501 .outputs = {3},
5502 .type = TestOperationType::GATHER
5503 }},
5504 .outputIndexes = {3}
5505 },
5506 .minSupportedVersion = TestHalVersion::UNKNOWN,
5507 .referenced = {}
5508 };
5509 return model;
5510 }
5511
5512 const auto dummy_test_model_relaxed_all_inputs_as_internal_8 = TestModelManager::get().add("gather_relaxed_all_inputs_as_internal_8", get_test_model_relaxed_all_inputs_as_internal_8());
5513
5514 } // namespace generated_tests::gather
5515
5516 namespace generated_tests::gather {
5517
get_test_model_quant8_8()5518 const TestModel& get_test_model_quant8_8() {
5519 static TestModel model = {
5520 .expectFailure = false,
5521 .expectedMultinomialDistributionTolerance = 0,
5522 .isRelaxed = false,
5523 .main = {
5524 .inputIndexes = {0},
5525 .operands = {{ // input07
5526 .channelQuant = {},
5527 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
5528 .dimensions = {1, 2, 3},
5529 .isIgnored = false,
5530 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5531 .numberOfConsumers = 1,
5532 .scale = 0.5f,
5533 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5534 .zeroPoint = 127
5535 }, { // param14
5536 .channelQuant = {},
5537 .data = TestBuffer::createFromVector<int32_t>({-1}),
5538 .dimensions = {},
5539 .isIgnored = false,
5540 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5541 .numberOfConsumers = 1,
5542 .scale = 0.0f,
5543 .type = TestOperandType::INT32,
5544 .zeroPoint = 0
5545 }, { // param15
5546 .channelQuant = {},
5547 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5548 .dimensions = {2},
5549 .isIgnored = false,
5550 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5551 .numberOfConsumers = 1,
5552 .scale = 0.0f,
5553 .type = TestOperandType::TENSOR_INT32,
5554 .zeroPoint = 0
5555 }, { // output07
5556 .channelQuant = {},
5557 .data = TestBuffer::createFromVector<uint8_t>({133, 129, 139, 135}),
5558 .dimensions = {1, 2, 2},
5559 .isIgnored = false,
5560 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5561 .numberOfConsumers = 0,
5562 .scale = 0.5f,
5563 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5564 .zeroPoint = 127
5565 }},
5566 .operations = {{
5567 .inputs = {0, 1, 2},
5568 .outputs = {3},
5569 .type = TestOperationType::GATHER
5570 }},
5571 .outputIndexes = {3}
5572 },
5573 .minSupportedVersion = TestHalVersion::V1_2,
5574 .referenced = {}
5575 };
5576 return model;
5577 }
5578
5579 const auto dummy_test_model_quant8_8 = TestModelManager::get().add("gather_quant8_8", get_test_model_quant8_8());
5580
5581 } // namespace generated_tests::gather
5582
5583 namespace generated_tests::gather {
5584
get_test_model_quant8_all_inputs_as_internal_8()5585 const TestModel& get_test_model_quant8_all_inputs_as_internal_8() {
5586 static TestModel model = {
5587 .expectFailure = false,
5588 .expectedMultinomialDistributionTolerance = 0,
5589 .isRelaxed = false,
5590 .main = {
5591 .inputIndexes = {4},
5592 .operands = {{ // input07
5593 .channelQuant = {},
5594 .data = TestBuffer::createFromVector<uint8_t>({}),
5595 .dimensions = {1, 2, 3},
5596 .isIgnored = false,
5597 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
5598 .numberOfConsumers = 1,
5599 .scale = 0.5f,
5600 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5601 .zeroPoint = 127
5602 }, { // param14
5603 .channelQuant = {},
5604 .data = TestBuffer::createFromVector<int32_t>({-1}),
5605 .dimensions = {},
5606 .isIgnored = false,
5607 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5608 .numberOfConsumers = 1,
5609 .scale = 0.0f,
5610 .type = TestOperandType::INT32,
5611 .zeroPoint = 0
5612 }, { // param15
5613 .channelQuant = {},
5614 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5615 .dimensions = {2},
5616 .isIgnored = false,
5617 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5618 .numberOfConsumers = 1,
5619 .scale = 0.0f,
5620 .type = TestOperandType::TENSOR_INT32,
5621 .zeroPoint = 0
5622 }, { // output07
5623 .channelQuant = {},
5624 .data = TestBuffer::createFromVector<uint8_t>({133, 129, 139, 135}),
5625 .dimensions = {1, 2, 2},
5626 .isIgnored = false,
5627 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5628 .numberOfConsumers = 0,
5629 .scale = 0.5f,
5630 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5631 .zeroPoint = 127
5632 }, { // input07_new
5633 .channelQuant = {},
5634 .data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
5635 .dimensions = {1, 2, 3},
5636 .isIgnored = false,
5637 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5638 .numberOfConsumers = 1,
5639 .scale = 0.5f,
5640 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5641 .zeroPoint = 127
5642 }, { // placeholder30
5643 .channelQuant = {},
5644 .data = TestBuffer::createFromVector<uint8_t>({127}),
5645 .dimensions = {1},
5646 .isIgnored = false,
5647 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5648 .numberOfConsumers = 1,
5649 .scale = 0.5f,
5650 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
5651 .zeroPoint = 127
5652 }, { // param46
5653 .channelQuant = {},
5654 .data = TestBuffer::createFromVector<int32_t>({0}),
5655 .dimensions = {},
5656 .isIgnored = false,
5657 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5658 .numberOfConsumers = 1,
5659 .scale = 0.0f,
5660 .type = TestOperandType::INT32,
5661 .zeroPoint = 0
5662 }},
5663 .operations = {{
5664 .inputs = {4, 5, 6},
5665 .outputs = {0},
5666 .type = TestOperationType::ADD
5667 }, {
5668 .inputs = {0, 1, 2},
5669 .outputs = {3},
5670 .type = TestOperationType::GATHER
5671 }},
5672 .outputIndexes = {3}
5673 },
5674 .minSupportedVersion = TestHalVersion::V1_2,
5675 .referenced = {}
5676 };
5677 return model;
5678 }
5679
5680 const auto dummy_test_model_quant8_all_inputs_as_internal_8 = TestModelManager::get().add("gather_quant8_all_inputs_as_internal_8", get_test_model_quant8_all_inputs_as_internal_8());
5681
5682 } // namespace generated_tests::gather
5683
5684 namespace generated_tests::gather {
5685
get_test_model_int32_8()5686 const TestModel& get_test_model_int32_8() {
5687 static TestModel model = {
5688 .expectFailure = false,
5689 .expectedMultinomialDistributionTolerance = 0,
5690 .isRelaxed = false,
5691 .main = {
5692 .inputIndexes = {0},
5693 .operands = {{ // input07
5694 .channelQuant = {},
5695 .data = TestBuffer::createFromVector<int32_t>({1, 2, 3, 4, 5, 6}),
5696 .dimensions = {1, 2, 3},
5697 .isIgnored = false,
5698 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5699 .numberOfConsumers = 1,
5700 .scale = 0.0f,
5701 .type = TestOperandType::TENSOR_INT32,
5702 .zeroPoint = 0
5703 }, { // param14
5704 .channelQuant = {},
5705 .data = TestBuffer::createFromVector<int32_t>({-1}),
5706 .dimensions = {},
5707 .isIgnored = false,
5708 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5709 .numberOfConsumers = 1,
5710 .scale = 0.0f,
5711 .type = TestOperandType::INT32,
5712 .zeroPoint = 0
5713 }, { // param15
5714 .channelQuant = {},
5715 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5716 .dimensions = {2},
5717 .isIgnored = false,
5718 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5719 .numberOfConsumers = 1,
5720 .scale = 0.0f,
5721 .type = TestOperandType::TENSOR_INT32,
5722 .zeroPoint = 0
5723 }, { // output07
5724 .channelQuant = {},
5725 .data = TestBuffer::createFromVector<int32_t>({3, 1, 6, 4}),
5726 .dimensions = {1, 2, 2},
5727 .isIgnored = false,
5728 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5729 .numberOfConsumers = 0,
5730 .scale = 0.0f,
5731 .type = TestOperandType::TENSOR_INT32,
5732 .zeroPoint = 0
5733 }},
5734 .operations = {{
5735 .inputs = {0, 1, 2},
5736 .outputs = {3},
5737 .type = TestOperationType::GATHER
5738 }},
5739 .outputIndexes = {3}
5740 },
5741 .minSupportedVersion = TestHalVersion::V1_2,
5742 .referenced = {}
5743 };
5744 return model;
5745 }
5746
5747 const auto dummy_test_model_int32_8 = TestModelManager::get().add("gather_int32_8", get_test_model_int32_8());
5748
5749 } // namespace generated_tests::gather
5750
5751 namespace generated_tests::gather {
5752
get_test_model_float16_8()5753 const TestModel& get_test_model_float16_8() {
5754 static TestModel model = {
5755 .expectFailure = false,
5756 .expectedMultinomialDistributionTolerance = 0,
5757 .isRelaxed = false,
5758 .main = {
5759 .inputIndexes = {0},
5760 .operands = {{ // input07
5761 .channelQuant = {},
5762 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5763 .dimensions = {1, 2, 3},
5764 .isIgnored = false,
5765 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5766 .numberOfConsumers = 1,
5767 .scale = 0.0f,
5768 .type = TestOperandType::TENSOR_FLOAT16,
5769 .zeroPoint = 0
5770 }, { // param14
5771 .channelQuant = {},
5772 .data = TestBuffer::createFromVector<int32_t>({-1}),
5773 .dimensions = {},
5774 .isIgnored = false,
5775 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5776 .numberOfConsumers = 1,
5777 .scale = 0.0f,
5778 .type = TestOperandType::INT32,
5779 .zeroPoint = 0
5780 }, { // param15
5781 .channelQuant = {},
5782 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5783 .dimensions = {2},
5784 .isIgnored = false,
5785 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5786 .numberOfConsumers = 1,
5787 .scale = 0.0f,
5788 .type = TestOperandType::TENSOR_INT32,
5789 .zeroPoint = 0
5790 }, { // output07
5791 .channelQuant = {},
5792 .data = TestBuffer::createFromVector<_Float16>({3.0f, 1.0f, 6.0f, 4.0f}),
5793 .dimensions = {1, 2, 2},
5794 .isIgnored = false,
5795 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5796 .numberOfConsumers = 0,
5797 .scale = 0.0f,
5798 .type = TestOperandType::TENSOR_FLOAT16,
5799 .zeroPoint = 0
5800 }},
5801 .operations = {{
5802 .inputs = {0, 1, 2},
5803 .outputs = {3},
5804 .type = TestOperationType::GATHER
5805 }},
5806 .outputIndexes = {3}
5807 },
5808 .minSupportedVersion = TestHalVersion::V1_2,
5809 .referenced = {}
5810 };
5811 return model;
5812 }
5813
5814 const auto dummy_test_model_float16_8 = TestModelManager::get().add("gather_float16_8", get_test_model_float16_8());
5815
5816 } // namespace generated_tests::gather
5817
5818 namespace generated_tests::gather {
5819
get_test_model_float16_all_inputs_as_internal_8()5820 const TestModel& get_test_model_float16_all_inputs_as_internal_8() {
5821 static TestModel model = {
5822 .expectFailure = false,
5823 .expectedMultinomialDistributionTolerance = 0,
5824 .isRelaxed = false,
5825 .main = {
5826 .inputIndexes = {4},
5827 .operands = {{ // input07
5828 .channelQuant = {},
5829 .data = TestBuffer::createFromVector<_Float16>({}),
5830 .dimensions = {1, 2, 3},
5831 .isIgnored = false,
5832 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
5833 .numberOfConsumers = 1,
5834 .scale = 0.0f,
5835 .type = TestOperandType::TENSOR_FLOAT16,
5836 .zeroPoint = 0
5837 }, { // param14
5838 .channelQuant = {},
5839 .data = TestBuffer::createFromVector<int32_t>({-1}),
5840 .dimensions = {},
5841 .isIgnored = false,
5842 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5843 .numberOfConsumers = 1,
5844 .scale = 0.0f,
5845 .type = TestOperandType::INT32,
5846 .zeroPoint = 0
5847 }, { // param15
5848 .channelQuant = {},
5849 .data = TestBuffer::createFromVector<int32_t>({2, 0}),
5850 .dimensions = {2},
5851 .isIgnored = false,
5852 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5853 .numberOfConsumers = 1,
5854 .scale = 0.0f,
5855 .type = TestOperandType::TENSOR_INT32,
5856 .zeroPoint = 0
5857 }, { // output07
5858 .channelQuant = {},
5859 .data = TestBuffer::createFromVector<_Float16>({3.0f, 1.0f, 6.0f, 4.0f}),
5860 .dimensions = {1, 2, 2},
5861 .isIgnored = false,
5862 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
5863 .numberOfConsumers = 0,
5864 .scale = 0.0f,
5865 .type = TestOperandType::TENSOR_FLOAT16,
5866 .zeroPoint = 0
5867 }, { // input07_new
5868 .channelQuant = {},
5869 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
5870 .dimensions = {1, 2, 3},
5871 .isIgnored = false,
5872 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
5873 .numberOfConsumers = 1,
5874 .scale = 0.0f,
5875 .type = TestOperandType::TENSOR_FLOAT16,
5876 .zeroPoint = 0
5877 }, { // placeholder31
5878 .channelQuant = {},
5879 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
5880 .dimensions = {1},
5881 .isIgnored = false,
5882 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5883 .numberOfConsumers = 1,
5884 .scale = 0.0f,
5885 .type = TestOperandType::TENSOR_FLOAT16,
5886 .zeroPoint = 0
5887 }, { // param47
5888 .channelQuant = {},
5889 .data = TestBuffer::createFromVector<int32_t>({0}),
5890 .dimensions = {},
5891 .isIgnored = false,
5892 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
5893 .numberOfConsumers = 1,
5894 .scale = 0.0f,
5895 .type = TestOperandType::INT32,
5896 .zeroPoint = 0
5897 }},
5898 .operations = {{
5899 .inputs = {4, 5, 6},
5900 .outputs = {0},
5901 .type = TestOperationType::ADD
5902 }, {
5903 .inputs = {0, 1, 2},
5904 .outputs = {3},
5905 .type = TestOperationType::GATHER
5906 }},
5907 .outputIndexes = {3}
5908 },
5909 .minSupportedVersion = TestHalVersion::V1_2,
5910 .referenced = {}
5911 };
5912 return model;
5913 }
5914
5915 const auto dummy_test_model_float16_all_inputs_as_internal_8 = TestModelManager::get().add("gather_float16_all_inputs_as_internal_8", get_test_model_float16_all_inputs_as_internal_8());
5916
5917 } // namespace generated_tests::gather
5918
5919