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