1 // Generated from slice.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;
6
7 namespace generated_tests::slice {
8
get_test_model()9 const TestModel& get_test_model() {
10 static TestModel model = {
11 .expectFailure = false,
12 .expectedMultinomialDistributionTolerance = 0,
13 .isRelaxed = false,
14 .main = {
15 .inputIndexes = {0, 1, 2},
16 .operands = {{ // input
17 .channelQuant = {},
18 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
19 .dimensions = {4},
20 .isIgnored = false,
21 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
22 .numberOfConsumers = 1,
23 .scale = 0.0f,
24 .type = TestOperandType::TENSOR_FLOAT32,
25 .zeroPoint = 0
26 }, { // begin
27 .channelQuant = {},
28 .data = TestBuffer::createFromVector<int32_t>({1}),
29 .dimensions = {1},
30 .isIgnored = false,
31 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
32 .numberOfConsumers = 1,
33 .scale = 0.0f,
34 .type = TestOperandType::TENSOR_INT32,
35 .zeroPoint = 0
36 }, { // size
37 .channelQuant = {},
38 .data = TestBuffer::createFromVector<int32_t>({2}),
39 .dimensions = {1},
40 .isIgnored = false,
41 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
42 .numberOfConsumers = 1,
43 .scale = 0.0f,
44 .type = TestOperandType::TENSOR_INT32,
45 .zeroPoint = 0
46 }, { // output
47 .channelQuant = {},
48 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
49 .dimensions = {2},
50 .isIgnored = false,
51 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
52 .numberOfConsumers = 0,
53 .scale = 0.0f,
54 .type = TestOperandType::TENSOR_FLOAT32,
55 .zeroPoint = 0
56 }},
57 .operations = {{
58 .inputs = {0, 1, 2},
59 .outputs = {3},
60 .type = TestOperationType::SLICE
61 }},
62 .outputIndexes = {3}
63 },
64 .minSupportedVersion = TestHalVersion::V1_2,
65 .referenced = {}
66 };
67 return model;
68 }
69
70 const auto dummy_test_model = TestModelManager::get().add("slice", get_test_model());
71
72 } // namespace generated_tests::slice
73
74 namespace generated_tests::slice {
75
get_test_model_all_inputs_as_internal()76 const TestModel& get_test_model_all_inputs_as_internal() {
77 static TestModel model = {
78 .expectFailure = false,
79 .expectedMultinomialDistributionTolerance = 0,
80 .isRelaxed = false,
81 .main = {
82 .inputIndexes = {1, 2, 4},
83 .operands = {{ // input
84 .channelQuant = {},
85 .data = TestBuffer::createFromVector<float>({}),
86 .dimensions = {4},
87 .isIgnored = false,
88 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
89 .numberOfConsumers = 1,
90 .scale = 0.0f,
91 .type = TestOperandType::TENSOR_FLOAT32,
92 .zeroPoint = 0
93 }, { // begin
94 .channelQuant = {},
95 .data = TestBuffer::createFromVector<int32_t>({1}),
96 .dimensions = {1},
97 .isIgnored = false,
98 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
99 .numberOfConsumers = 1,
100 .scale = 0.0f,
101 .type = TestOperandType::TENSOR_INT32,
102 .zeroPoint = 0
103 }, { // size
104 .channelQuant = {},
105 .data = TestBuffer::createFromVector<int32_t>({2}),
106 .dimensions = {1},
107 .isIgnored = false,
108 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
109 .numberOfConsumers = 1,
110 .scale = 0.0f,
111 .type = TestOperandType::TENSOR_INT32,
112 .zeroPoint = 0
113 }, { // output
114 .channelQuant = {},
115 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
116 .dimensions = {2},
117 .isIgnored = false,
118 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
119 .numberOfConsumers = 0,
120 .scale = 0.0f,
121 .type = TestOperandType::TENSOR_FLOAT32,
122 .zeroPoint = 0
123 }, { // input_new
124 .channelQuant = {},
125 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
126 .dimensions = {4},
127 .isIgnored = false,
128 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
129 .numberOfConsumers = 1,
130 .scale = 0.0f,
131 .type = TestOperandType::TENSOR_FLOAT32,
132 .zeroPoint = 0
133 }, { // dummy
134 .channelQuant = {},
135 .data = TestBuffer::createFromVector<float>({0.0f}),
136 .dimensions = {1},
137 .isIgnored = false,
138 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
139 .numberOfConsumers = 1,
140 .scale = 0.0f,
141 .type = TestOperandType::TENSOR_FLOAT32,
142 .zeroPoint = 0
143 }, { // param15
144 .channelQuant = {},
145 .data = TestBuffer::createFromVector<int32_t>({0}),
146 .dimensions = {},
147 .isIgnored = false,
148 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
149 .numberOfConsumers = 1,
150 .scale = 0.0f,
151 .type = TestOperandType::INT32,
152 .zeroPoint = 0
153 }},
154 .operations = {{
155 .inputs = {4, 5, 6},
156 .outputs = {0},
157 .type = TestOperationType::ADD
158 }, {
159 .inputs = {0, 1, 2},
160 .outputs = {3},
161 .type = TestOperationType::SLICE
162 }},
163 .outputIndexes = {3}
164 },
165 .minSupportedVersion = TestHalVersion::V1_2,
166 .referenced = {}
167 };
168 return model;
169 }
170
171 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("slice_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
172
173 } // namespace generated_tests::slice
174
175 namespace generated_tests::slice {
176
get_test_model_relaxed()177 const TestModel& get_test_model_relaxed() {
178 static TestModel model = {
179 .expectFailure = false,
180 .expectedMultinomialDistributionTolerance = 0,
181 .isRelaxed = true,
182 .main = {
183 .inputIndexes = {0, 1, 2},
184 .operands = {{ // input
185 .channelQuant = {},
186 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
187 .dimensions = {4},
188 .isIgnored = false,
189 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
190 .numberOfConsumers = 1,
191 .scale = 0.0f,
192 .type = TestOperandType::TENSOR_FLOAT32,
193 .zeroPoint = 0
194 }, { // begin
195 .channelQuant = {},
196 .data = TestBuffer::createFromVector<int32_t>({1}),
197 .dimensions = {1},
198 .isIgnored = false,
199 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
200 .numberOfConsumers = 1,
201 .scale = 0.0f,
202 .type = TestOperandType::TENSOR_INT32,
203 .zeroPoint = 0
204 }, { // size
205 .channelQuant = {},
206 .data = TestBuffer::createFromVector<int32_t>({2}),
207 .dimensions = {1},
208 .isIgnored = false,
209 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
210 .numberOfConsumers = 1,
211 .scale = 0.0f,
212 .type = TestOperandType::TENSOR_INT32,
213 .zeroPoint = 0
214 }, { // output
215 .channelQuant = {},
216 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
217 .dimensions = {2},
218 .isIgnored = false,
219 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
220 .numberOfConsumers = 0,
221 .scale = 0.0f,
222 .type = TestOperandType::TENSOR_FLOAT32,
223 .zeroPoint = 0
224 }},
225 .operations = {{
226 .inputs = {0, 1, 2},
227 .outputs = {3},
228 .type = TestOperationType::SLICE
229 }},
230 .outputIndexes = {3}
231 },
232 .minSupportedVersion = TestHalVersion::UNKNOWN,
233 .referenced = {}
234 };
235 return model;
236 }
237
238 const auto dummy_test_model_relaxed = TestModelManager::get().add("slice_relaxed", get_test_model_relaxed());
239
240 } // namespace generated_tests::slice
241
242 namespace generated_tests::slice {
243
get_test_model_relaxed_all_inputs_as_internal()244 const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
245 static TestModel model = {
246 .expectFailure = false,
247 .expectedMultinomialDistributionTolerance = 0,
248 .isRelaxed = true,
249 .main = {
250 .inputIndexes = {1, 2, 4},
251 .operands = {{ // input
252 .channelQuant = {},
253 .data = TestBuffer::createFromVector<float>({}),
254 .dimensions = {4},
255 .isIgnored = false,
256 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
257 .numberOfConsumers = 1,
258 .scale = 0.0f,
259 .type = TestOperandType::TENSOR_FLOAT32,
260 .zeroPoint = 0
261 }, { // begin
262 .channelQuant = {},
263 .data = TestBuffer::createFromVector<int32_t>({1}),
264 .dimensions = {1},
265 .isIgnored = false,
266 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
267 .numberOfConsumers = 1,
268 .scale = 0.0f,
269 .type = TestOperandType::TENSOR_INT32,
270 .zeroPoint = 0
271 }, { // size
272 .channelQuant = {},
273 .data = TestBuffer::createFromVector<int32_t>({2}),
274 .dimensions = {1},
275 .isIgnored = false,
276 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
277 .numberOfConsumers = 1,
278 .scale = 0.0f,
279 .type = TestOperandType::TENSOR_INT32,
280 .zeroPoint = 0
281 }, { // output
282 .channelQuant = {},
283 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
284 .dimensions = {2},
285 .isIgnored = false,
286 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
287 .numberOfConsumers = 0,
288 .scale = 0.0f,
289 .type = TestOperandType::TENSOR_FLOAT32,
290 .zeroPoint = 0
291 }, { // input_new
292 .channelQuant = {},
293 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
294 .dimensions = {4},
295 .isIgnored = false,
296 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
297 .numberOfConsumers = 1,
298 .scale = 0.0f,
299 .type = TestOperandType::TENSOR_FLOAT32,
300 .zeroPoint = 0
301 }, { // dummy1
302 .channelQuant = {},
303 .data = TestBuffer::createFromVector<float>({0.0f}),
304 .dimensions = {1},
305 .isIgnored = false,
306 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
307 .numberOfConsumers = 1,
308 .scale = 0.0f,
309 .type = TestOperandType::TENSOR_FLOAT32,
310 .zeroPoint = 0
311 }, { // param16
312 .channelQuant = {},
313 .data = TestBuffer::createFromVector<int32_t>({0}),
314 .dimensions = {},
315 .isIgnored = false,
316 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
317 .numberOfConsumers = 1,
318 .scale = 0.0f,
319 .type = TestOperandType::INT32,
320 .zeroPoint = 0
321 }},
322 .operations = {{
323 .inputs = {4, 5, 6},
324 .outputs = {0},
325 .type = TestOperationType::ADD
326 }, {
327 .inputs = {0, 1, 2},
328 .outputs = {3},
329 .type = TestOperationType::SLICE
330 }},
331 .outputIndexes = {3}
332 },
333 .minSupportedVersion = TestHalVersion::UNKNOWN,
334 .referenced = {}
335 };
336 return model;
337 }
338
339 const auto dummy_test_model_relaxed_all_inputs_as_internal = TestModelManager::get().add("slice_relaxed_all_inputs_as_internal", get_test_model_relaxed_all_inputs_as_internal());
340
341 } // namespace generated_tests::slice
342
343 namespace generated_tests::slice {
344
get_test_model_float16()345 const TestModel& get_test_model_float16() {
346 static TestModel model = {
347 .expectFailure = false,
348 .expectedMultinomialDistributionTolerance = 0,
349 .isRelaxed = false,
350 .main = {
351 .inputIndexes = {0, 1, 2},
352 .operands = {{ // input
353 .channelQuant = {},
354 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f}),
355 .dimensions = {4},
356 .isIgnored = false,
357 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
358 .numberOfConsumers = 1,
359 .scale = 0.0f,
360 .type = TestOperandType::TENSOR_FLOAT16,
361 .zeroPoint = 0
362 }, { // begin
363 .channelQuant = {},
364 .data = TestBuffer::createFromVector<int32_t>({1}),
365 .dimensions = {1},
366 .isIgnored = false,
367 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
368 .numberOfConsumers = 1,
369 .scale = 0.0f,
370 .type = TestOperandType::TENSOR_INT32,
371 .zeroPoint = 0
372 }, { // size
373 .channelQuant = {},
374 .data = TestBuffer::createFromVector<int32_t>({2}),
375 .dimensions = {1},
376 .isIgnored = false,
377 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
378 .numberOfConsumers = 1,
379 .scale = 0.0f,
380 .type = TestOperandType::TENSOR_INT32,
381 .zeroPoint = 0
382 }, { // output
383 .channelQuant = {},
384 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
385 .dimensions = {2},
386 .isIgnored = false,
387 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
388 .numberOfConsumers = 0,
389 .scale = 0.0f,
390 .type = TestOperandType::TENSOR_FLOAT16,
391 .zeroPoint = 0
392 }},
393 .operations = {{
394 .inputs = {0, 1, 2},
395 .outputs = {3},
396 .type = TestOperationType::SLICE
397 }},
398 .outputIndexes = {3}
399 },
400 .minSupportedVersion = TestHalVersion::V1_2,
401 .referenced = {}
402 };
403 return model;
404 }
405
406 const auto dummy_test_model_float16 = TestModelManager::get().add("slice_float16", get_test_model_float16());
407
408 } // namespace generated_tests::slice
409
410 namespace generated_tests::slice {
411
get_test_model_float16_all_inputs_as_internal()412 const TestModel& get_test_model_float16_all_inputs_as_internal() {
413 static TestModel model = {
414 .expectFailure = false,
415 .expectedMultinomialDistributionTolerance = 0,
416 .isRelaxed = false,
417 .main = {
418 .inputIndexes = {1, 2, 4},
419 .operands = {{ // input
420 .channelQuant = {},
421 .data = TestBuffer::createFromVector<_Float16>({}),
422 .dimensions = {4},
423 .isIgnored = false,
424 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
425 .numberOfConsumers = 1,
426 .scale = 0.0f,
427 .type = TestOperandType::TENSOR_FLOAT16,
428 .zeroPoint = 0
429 }, { // begin
430 .channelQuant = {},
431 .data = TestBuffer::createFromVector<int32_t>({1}),
432 .dimensions = {1},
433 .isIgnored = false,
434 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
435 .numberOfConsumers = 1,
436 .scale = 0.0f,
437 .type = TestOperandType::TENSOR_INT32,
438 .zeroPoint = 0
439 }, { // size
440 .channelQuant = {},
441 .data = TestBuffer::createFromVector<int32_t>({2}),
442 .dimensions = {1},
443 .isIgnored = false,
444 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
445 .numberOfConsumers = 1,
446 .scale = 0.0f,
447 .type = TestOperandType::TENSOR_INT32,
448 .zeroPoint = 0
449 }, { // output
450 .channelQuant = {},
451 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
452 .dimensions = {2},
453 .isIgnored = false,
454 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
455 .numberOfConsumers = 0,
456 .scale = 0.0f,
457 .type = TestOperandType::TENSOR_FLOAT16,
458 .zeroPoint = 0
459 }, { // input_new
460 .channelQuant = {},
461 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f}),
462 .dimensions = {4},
463 .isIgnored = false,
464 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
465 .numberOfConsumers = 1,
466 .scale = 0.0f,
467 .type = TestOperandType::TENSOR_FLOAT16,
468 .zeroPoint = 0
469 }, { // dummy2
470 .channelQuant = {},
471 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
472 .dimensions = {1},
473 .isIgnored = false,
474 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
475 .numberOfConsumers = 1,
476 .scale = 0.0f,
477 .type = TestOperandType::TENSOR_FLOAT16,
478 .zeroPoint = 0
479 }, { // param17
480 .channelQuant = {},
481 .data = TestBuffer::createFromVector<int32_t>({0}),
482 .dimensions = {},
483 .isIgnored = false,
484 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
485 .numberOfConsumers = 1,
486 .scale = 0.0f,
487 .type = TestOperandType::INT32,
488 .zeroPoint = 0
489 }},
490 .operations = {{
491 .inputs = {4, 5, 6},
492 .outputs = {0},
493 .type = TestOperationType::ADD
494 }, {
495 .inputs = {0, 1, 2},
496 .outputs = {3},
497 .type = TestOperationType::SLICE
498 }},
499 .outputIndexes = {3}
500 },
501 .minSupportedVersion = TestHalVersion::V1_2,
502 .referenced = {}
503 };
504 return model;
505 }
506
507 const auto dummy_test_model_float16_all_inputs_as_internal = TestModelManager::get().add("slice_float16_all_inputs_as_internal", get_test_model_float16_all_inputs_as_internal());
508
509 } // namespace generated_tests::slice
510
511 namespace generated_tests::slice {
512
get_test_model_2()513 const TestModel& get_test_model_2() {
514 static TestModel model = {
515 .expectFailure = false,
516 .expectedMultinomialDistributionTolerance = 0,
517 .isRelaxed = false,
518 .main = {
519 .inputIndexes = {0, 1, 2},
520 .operands = {{ // input1
521 .channelQuant = {},
522 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
523 .dimensions = {2, 3},
524 .isIgnored = false,
525 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
526 .numberOfConsumers = 1,
527 .scale = 0.0f,
528 .type = TestOperandType::TENSOR_FLOAT32,
529 .zeroPoint = 0
530 }, { // begin1
531 .channelQuant = {},
532 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
533 .dimensions = {2},
534 .isIgnored = false,
535 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
536 .numberOfConsumers = 1,
537 .scale = 0.0f,
538 .type = TestOperandType::TENSOR_INT32,
539 .zeroPoint = 0
540 }, { // size1
541 .channelQuant = {},
542 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
543 .dimensions = {2},
544 .isIgnored = false,
545 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
546 .numberOfConsumers = 1,
547 .scale = 0.0f,
548 .type = TestOperandType::TENSOR_INT32,
549 .zeroPoint = 0
550 }, { // output1
551 .channelQuant = {},
552 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f}),
553 .dimensions = {1, 2},
554 .isIgnored = false,
555 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
556 .numberOfConsumers = 0,
557 .scale = 0.0f,
558 .type = TestOperandType::TENSOR_FLOAT32,
559 .zeroPoint = 0
560 }},
561 .operations = {{
562 .inputs = {0, 1, 2},
563 .outputs = {3},
564 .type = TestOperationType::SLICE
565 }},
566 .outputIndexes = {3}
567 },
568 .minSupportedVersion = TestHalVersion::V1_2,
569 .referenced = {}
570 };
571 return model;
572 }
573
574 const auto dummy_test_model_2 = TestModelManager::get().add("slice_2", get_test_model_2());
575
576 } // namespace generated_tests::slice
577
578 namespace generated_tests::slice {
579
get_test_model_all_inputs_as_internal_2()580 const TestModel& get_test_model_all_inputs_as_internal_2() {
581 static TestModel model = {
582 .expectFailure = false,
583 .expectedMultinomialDistributionTolerance = 0,
584 .isRelaxed = false,
585 .main = {
586 .inputIndexes = {1, 2, 4},
587 .operands = {{ // input1
588 .channelQuant = {},
589 .data = TestBuffer::createFromVector<float>({}),
590 .dimensions = {2, 3},
591 .isIgnored = false,
592 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
593 .numberOfConsumers = 1,
594 .scale = 0.0f,
595 .type = TestOperandType::TENSOR_FLOAT32,
596 .zeroPoint = 0
597 }, { // begin1
598 .channelQuant = {},
599 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
600 .dimensions = {2},
601 .isIgnored = false,
602 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
603 .numberOfConsumers = 1,
604 .scale = 0.0f,
605 .type = TestOperandType::TENSOR_INT32,
606 .zeroPoint = 0
607 }, { // size1
608 .channelQuant = {},
609 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
610 .dimensions = {2},
611 .isIgnored = false,
612 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
613 .numberOfConsumers = 1,
614 .scale = 0.0f,
615 .type = TestOperandType::TENSOR_INT32,
616 .zeroPoint = 0
617 }, { // output1
618 .channelQuant = {},
619 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f}),
620 .dimensions = {1, 2},
621 .isIgnored = false,
622 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
623 .numberOfConsumers = 0,
624 .scale = 0.0f,
625 .type = TestOperandType::TENSOR_FLOAT32,
626 .zeroPoint = 0
627 }, { // input1_new
628 .channelQuant = {},
629 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
630 .dimensions = {2, 3},
631 .isIgnored = false,
632 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
633 .numberOfConsumers = 1,
634 .scale = 0.0f,
635 .type = TestOperandType::TENSOR_FLOAT32,
636 .zeroPoint = 0
637 }, { // dummy3
638 .channelQuant = {},
639 .data = TestBuffer::createFromVector<float>({0.0f}),
640 .dimensions = {1},
641 .isIgnored = false,
642 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
643 .numberOfConsumers = 1,
644 .scale = 0.0f,
645 .type = TestOperandType::TENSOR_FLOAT32,
646 .zeroPoint = 0
647 }, { // param18
648 .channelQuant = {},
649 .data = TestBuffer::createFromVector<int32_t>({0}),
650 .dimensions = {},
651 .isIgnored = false,
652 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
653 .numberOfConsumers = 1,
654 .scale = 0.0f,
655 .type = TestOperandType::INT32,
656 .zeroPoint = 0
657 }},
658 .operations = {{
659 .inputs = {4, 5, 6},
660 .outputs = {0},
661 .type = TestOperationType::ADD
662 }, {
663 .inputs = {0, 1, 2},
664 .outputs = {3},
665 .type = TestOperationType::SLICE
666 }},
667 .outputIndexes = {3}
668 },
669 .minSupportedVersion = TestHalVersion::V1_2,
670 .referenced = {}
671 };
672 return model;
673 }
674
675 const auto dummy_test_model_all_inputs_as_internal_2 = TestModelManager::get().add("slice_all_inputs_as_internal_2", get_test_model_all_inputs_as_internal_2());
676
677 } // namespace generated_tests::slice
678
679 namespace generated_tests::slice {
680
get_test_model_relaxed_2()681 const TestModel& get_test_model_relaxed_2() {
682 static TestModel model = {
683 .expectFailure = false,
684 .expectedMultinomialDistributionTolerance = 0,
685 .isRelaxed = true,
686 .main = {
687 .inputIndexes = {0, 1, 2},
688 .operands = {{ // input1
689 .channelQuant = {},
690 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
691 .dimensions = {2, 3},
692 .isIgnored = false,
693 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
694 .numberOfConsumers = 1,
695 .scale = 0.0f,
696 .type = TestOperandType::TENSOR_FLOAT32,
697 .zeroPoint = 0
698 }, { // begin1
699 .channelQuant = {},
700 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
701 .dimensions = {2},
702 .isIgnored = false,
703 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
704 .numberOfConsumers = 1,
705 .scale = 0.0f,
706 .type = TestOperandType::TENSOR_INT32,
707 .zeroPoint = 0
708 }, { // size1
709 .channelQuant = {},
710 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
711 .dimensions = {2},
712 .isIgnored = false,
713 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
714 .numberOfConsumers = 1,
715 .scale = 0.0f,
716 .type = TestOperandType::TENSOR_INT32,
717 .zeroPoint = 0
718 }, { // output1
719 .channelQuant = {},
720 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f}),
721 .dimensions = {1, 2},
722 .isIgnored = false,
723 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
724 .numberOfConsumers = 0,
725 .scale = 0.0f,
726 .type = TestOperandType::TENSOR_FLOAT32,
727 .zeroPoint = 0
728 }},
729 .operations = {{
730 .inputs = {0, 1, 2},
731 .outputs = {3},
732 .type = TestOperationType::SLICE
733 }},
734 .outputIndexes = {3}
735 },
736 .minSupportedVersion = TestHalVersion::UNKNOWN,
737 .referenced = {}
738 };
739 return model;
740 }
741
742 const auto dummy_test_model_relaxed_2 = TestModelManager::get().add("slice_relaxed_2", get_test_model_relaxed_2());
743
744 } // namespace generated_tests::slice
745
746 namespace generated_tests::slice {
747
get_test_model_relaxed_all_inputs_as_internal_2()748 const TestModel& get_test_model_relaxed_all_inputs_as_internal_2() {
749 static TestModel model = {
750 .expectFailure = false,
751 .expectedMultinomialDistributionTolerance = 0,
752 .isRelaxed = true,
753 .main = {
754 .inputIndexes = {1, 2, 4},
755 .operands = {{ // input1
756 .channelQuant = {},
757 .data = TestBuffer::createFromVector<float>({}),
758 .dimensions = {2, 3},
759 .isIgnored = false,
760 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
761 .numberOfConsumers = 1,
762 .scale = 0.0f,
763 .type = TestOperandType::TENSOR_FLOAT32,
764 .zeroPoint = 0
765 }, { // begin1
766 .channelQuant = {},
767 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
768 .dimensions = {2},
769 .isIgnored = false,
770 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
771 .numberOfConsumers = 1,
772 .scale = 0.0f,
773 .type = TestOperandType::TENSOR_INT32,
774 .zeroPoint = 0
775 }, { // size1
776 .channelQuant = {},
777 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
778 .dimensions = {2},
779 .isIgnored = false,
780 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
781 .numberOfConsumers = 1,
782 .scale = 0.0f,
783 .type = TestOperandType::TENSOR_INT32,
784 .zeroPoint = 0
785 }, { // output1
786 .channelQuant = {},
787 .data = TestBuffer::createFromVector<float>({4.0f, 5.0f}),
788 .dimensions = {1, 2},
789 .isIgnored = false,
790 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
791 .numberOfConsumers = 0,
792 .scale = 0.0f,
793 .type = TestOperandType::TENSOR_FLOAT32,
794 .zeroPoint = 0
795 }, { // input1_new
796 .channelQuant = {},
797 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
798 .dimensions = {2, 3},
799 .isIgnored = false,
800 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
801 .numberOfConsumers = 1,
802 .scale = 0.0f,
803 .type = TestOperandType::TENSOR_FLOAT32,
804 .zeroPoint = 0
805 }, { // dummy4
806 .channelQuant = {},
807 .data = TestBuffer::createFromVector<float>({0.0f}),
808 .dimensions = {1},
809 .isIgnored = false,
810 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
811 .numberOfConsumers = 1,
812 .scale = 0.0f,
813 .type = TestOperandType::TENSOR_FLOAT32,
814 .zeroPoint = 0
815 }, { // param19
816 .channelQuant = {},
817 .data = TestBuffer::createFromVector<int32_t>({0}),
818 .dimensions = {},
819 .isIgnored = false,
820 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
821 .numberOfConsumers = 1,
822 .scale = 0.0f,
823 .type = TestOperandType::INT32,
824 .zeroPoint = 0
825 }},
826 .operations = {{
827 .inputs = {4, 5, 6},
828 .outputs = {0},
829 .type = TestOperationType::ADD
830 }, {
831 .inputs = {0, 1, 2},
832 .outputs = {3},
833 .type = TestOperationType::SLICE
834 }},
835 .outputIndexes = {3}
836 },
837 .minSupportedVersion = TestHalVersion::UNKNOWN,
838 .referenced = {}
839 };
840 return model;
841 }
842
843 const auto dummy_test_model_relaxed_all_inputs_as_internal_2 = TestModelManager::get().add("slice_relaxed_all_inputs_as_internal_2", get_test_model_relaxed_all_inputs_as_internal_2());
844
845 } // namespace generated_tests::slice
846
847 namespace generated_tests::slice {
848
get_test_model_float16_2()849 const TestModel& get_test_model_float16_2() {
850 static TestModel model = {
851 .expectFailure = false,
852 .expectedMultinomialDistributionTolerance = 0,
853 .isRelaxed = false,
854 .main = {
855 .inputIndexes = {0, 1, 2},
856 .operands = {{ // input1
857 .channelQuant = {},
858 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
859 .dimensions = {2, 3},
860 .isIgnored = false,
861 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
862 .numberOfConsumers = 1,
863 .scale = 0.0f,
864 .type = TestOperandType::TENSOR_FLOAT16,
865 .zeroPoint = 0
866 }, { // begin1
867 .channelQuant = {},
868 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
869 .dimensions = {2},
870 .isIgnored = false,
871 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
872 .numberOfConsumers = 1,
873 .scale = 0.0f,
874 .type = TestOperandType::TENSOR_INT32,
875 .zeroPoint = 0
876 }, { // size1
877 .channelQuant = {},
878 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
879 .dimensions = {2},
880 .isIgnored = false,
881 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
882 .numberOfConsumers = 1,
883 .scale = 0.0f,
884 .type = TestOperandType::TENSOR_INT32,
885 .zeroPoint = 0
886 }, { // output1
887 .channelQuant = {},
888 .data = TestBuffer::createFromVector<_Float16>({4.0f, 5.0f}),
889 .dimensions = {1, 2},
890 .isIgnored = false,
891 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
892 .numberOfConsumers = 0,
893 .scale = 0.0f,
894 .type = TestOperandType::TENSOR_FLOAT16,
895 .zeroPoint = 0
896 }},
897 .operations = {{
898 .inputs = {0, 1, 2},
899 .outputs = {3},
900 .type = TestOperationType::SLICE
901 }},
902 .outputIndexes = {3}
903 },
904 .minSupportedVersion = TestHalVersion::V1_2,
905 .referenced = {}
906 };
907 return model;
908 }
909
910 const auto dummy_test_model_float16_2 = TestModelManager::get().add("slice_float16_2", get_test_model_float16_2());
911
912 } // namespace generated_tests::slice
913
914 namespace generated_tests::slice {
915
get_test_model_float16_all_inputs_as_internal_2()916 const TestModel& get_test_model_float16_all_inputs_as_internal_2() {
917 static TestModel model = {
918 .expectFailure = false,
919 .expectedMultinomialDistributionTolerance = 0,
920 .isRelaxed = false,
921 .main = {
922 .inputIndexes = {1, 2, 4},
923 .operands = {{ // input1
924 .channelQuant = {},
925 .data = TestBuffer::createFromVector<_Float16>({}),
926 .dimensions = {2, 3},
927 .isIgnored = false,
928 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
929 .numberOfConsumers = 1,
930 .scale = 0.0f,
931 .type = TestOperandType::TENSOR_FLOAT16,
932 .zeroPoint = 0
933 }, { // begin1
934 .channelQuant = {},
935 .data = TestBuffer::createFromVector<int32_t>({1, 0}),
936 .dimensions = {2},
937 .isIgnored = false,
938 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
939 .numberOfConsumers = 1,
940 .scale = 0.0f,
941 .type = TestOperandType::TENSOR_INT32,
942 .zeroPoint = 0
943 }, { // size1
944 .channelQuant = {},
945 .data = TestBuffer::createFromVector<int32_t>({1, 2}),
946 .dimensions = {2},
947 .isIgnored = false,
948 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
949 .numberOfConsumers = 1,
950 .scale = 0.0f,
951 .type = TestOperandType::TENSOR_INT32,
952 .zeroPoint = 0
953 }, { // output1
954 .channelQuant = {},
955 .data = TestBuffer::createFromVector<_Float16>({4.0f, 5.0f}),
956 .dimensions = {1, 2},
957 .isIgnored = false,
958 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
959 .numberOfConsumers = 0,
960 .scale = 0.0f,
961 .type = TestOperandType::TENSOR_FLOAT16,
962 .zeroPoint = 0
963 }, { // input1_new
964 .channelQuant = {},
965 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}),
966 .dimensions = {2, 3},
967 .isIgnored = false,
968 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
969 .numberOfConsumers = 1,
970 .scale = 0.0f,
971 .type = TestOperandType::TENSOR_FLOAT16,
972 .zeroPoint = 0
973 }, { // dummy5
974 .channelQuant = {},
975 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
976 .dimensions = {1},
977 .isIgnored = false,
978 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
979 .numberOfConsumers = 1,
980 .scale = 0.0f,
981 .type = TestOperandType::TENSOR_FLOAT16,
982 .zeroPoint = 0
983 }, { // param20
984 .channelQuant = {},
985 .data = TestBuffer::createFromVector<int32_t>({0}),
986 .dimensions = {},
987 .isIgnored = false,
988 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
989 .numberOfConsumers = 1,
990 .scale = 0.0f,
991 .type = TestOperandType::INT32,
992 .zeroPoint = 0
993 }},
994 .operations = {{
995 .inputs = {4, 5, 6},
996 .outputs = {0},
997 .type = TestOperationType::ADD
998 }, {
999 .inputs = {0, 1, 2},
1000 .outputs = {3},
1001 .type = TestOperationType::SLICE
1002 }},
1003 .outputIndexes = {3}
1004 },
1005 .minSupportedVersion = TestHalVersion::V1_2,
1006 .referenced = {}
1007 };
1008 return model;
1009 }
1010
1011 const auto dummy_test_model_float16_all_inputs_as_internal_2 = TestModelManager::get().add("slice_float16_all_inputs_as_internal_2", get_test_model_float16_all_inputs_as_internal_2());
1012
1013 } // namespace generated_tests::slice
1014
1015 namespace generated_tests::slice {
1016
get_test_model_3()1017 const TestModel& get_test_model_3() {
1018 static TestModel model = {
1019 .expectFailure = false,
1020 .expectedMultinomialDistributionTolerance = 0,
1021 .isRelaxed = false,
1022 .main = {
1023 .inputIndexes = {0, 1, 2},
1024 .operands = {{ // input2
1025 .channelQuant = {},
1026 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1027 .dimensions = {2, 3, 2},
1028 .isIgnored = false,
1029 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1030 .numberOfConsumers = 1,
1031 .scale = 0.0f,
1032 .type = TestOperandType::TENSOR_FLOAT32,
1033 .zeroPoint = 0
1034 }, { // begin2
1035 .channelQuant = {},
1036 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1037 .dimensions = {3},
1038 .isIgnored = false,
1039 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1040 .numberOfConsumers = 1,
1041 .scale = 0.0f,
1042 .type = TestOperandType::TENSOR_INT32,
1043 .zeroPoint = 0
1044 }, { // size2
1045 .channelQuant = {},
1046 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1047 .dimensions = {3},
1048 .isIgnored = false,
1049 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1050 .numberOfConsumers = 1,
1051 .scale = 0.0f,
1052 .type = TestOperandType::TENSOR_INT32,
1053 .zeroPoint = 0
1054 }, { // output2
1055 .channelQuant = {},
1056 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1057 .dimensions = {2, 3, 2},
1058 .isIgnored = false,
1059 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1060 .numberOfConsumers = 0,
1061 .scale = 0.0f,
1062 .type = TestOperandType::TENSOR_FLOAT32,
1063 .zeroPoint = 0
1064 }},
1065 .operations = {{
1066 .inputs = {0, 1, 2},
1067 .outputs = {3},
1068 .type = TestOperationType::SLICE
1069 }},
1070 .outputIndexes = {3}
1071 },
1072 .minSupportedVersion = TestHalVersion::V1_2,
1073 .referenced = {}
1074 };
1075 return model;
1076 }
1077
1078 const auto dummy_test_model_3 = TestModelManager::get().add("slice_3", get_test_model_3());
1079
1080 } // namespace generated_tests::slice
1081
1082 namespace generated_tests::slice {
1083
get_test_model_all_inputs_as_internal_3()1084 const TestModel& get_test_model_all_inputs_as_internal_3() {
1085 static TestModel model = {
1086 .expectFailure = false,
1087 .expectedMultinomialDistributionTolerance = 0,
1088 .isRelaxed = false,
1089 .main = {
1090 .inputIndexes = {1, 2, 4},
1091 .operands = {{ // input2
1092 .channelQuant = {},
1093 .data = TestBuffer::createFromVector<float>({}),
1094 .dimensions = {2, 3, 2},
1095 .isIgnored = false,
1096 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1097 .numberOfConsumers = 1,
1098 .scale = 0.0f,
1099 .type = TestOperandType::TENSOR_FLOAT32,
1100 .zeroPoint = 0
1101 }, { // begin2
1102 .channelQuant = {},
1103 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1104 .dimensions = {3},
1105 .isIgnored = false,
1106 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1107 .numberOfConsumers = 1,
1108 .scale = 0.0f,
1109 .type = TestOperandType::TENSOR_INT32,
1110 .zeroPoint = 0
1111 }, { // size2
1112 .channelQuant = {},
1113 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1114 .dimensions = {3},
1115 .isIgnored = false,
1116 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1117 .numberOfConsumers = 1,
1118 .scale = 0.0f,
1119 .type = TestOperandType::TENSOR_INT32,
1120 .zeroPoint = 0
1121 }, { // output2
1122 .channelQuant = {},
1123 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1124 .dimensions = {2, 3, 2},
1125 .isIgnored = false,
1126 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1127 .numberOfConsumers = 0,
1128 .scale = 0.0f,
1129 .type = TestOperandType::TENSOR_FLOAT32,
1130 .zeroPoint = 0
1131 }, { // input2_new
1132 .channelQuant = {},
1133 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1134 .dimensions = {2, 3, 2},
1135 .isIgnored = false,
1136 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1137 .numberOfConsumers = 1,
1138 .scale = 0.0f,
1139 .type = TestOperandType::TENSOR_FLOAT32,
1140 .zeroPoint = 0
1141 }, { // dummy6
1142 .channelQuant = {},
1143 .data = TestBuffer::createFromVector<float>({0.0f}),
1144 .dimensions = {1},
1145 .isIgnored = false,
1146 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1147 .numberOfConsumers = 1,
1148 .scale = 0.0f,
1149 .type = TestOperandType::TENSOR_FLOAT32,
1150 .zeroPoint = 0
1151 }, { // param21
1152 .channelQuant = {},
1153 .data = TestBuffer::createFromVector<int32_t>({0}),
1154 .dimensions = {},
1155 .isIgnored = false,
1156 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1157 .numberOfConsumers = 1,
1158 .scale = 0.0f,
1159 .type = TestOperandType::INT32,
1160 .zeroPoint = 0
1161 }},
1162 .operations = {{
1163 .inputs = {4, 5, 6},
1164 .outputs = {0},
1165 .type = TestOperationType::ADD
1166 }, {
1167 .inputs = {0, 1, 2},
1168 .outputs = {3},
1169 .type = TestOperationType::SLICE
1170 }},
1171 .outputIndexes = {3}
1172 },
1173 .minSupportedVersion = TestHalVersion::V1_2,
1174 .referenced = {}
1175 };
1176 return model;
1177 }
1178
1179 const auto dummy_test_model_all_inputs_as_internal_3 = TestModelManager::get().add("slice_all_inputs_as_internal_3", get_test_model_all_inputs_as_internal_3());
1180
1181 } // namespace generated_tests::slice
1182
1183 namespace generated_tests::slice {
1184
get_test_model_relaxed_3()1185 const TestModel& get_test_model_relaxed_3() {
1186 static TestModel model = {
1187 .expectFailure = false,
1188 .expectedMultinomialDistributionTolerance = 0,
1189 .isRelaxed = true,
1190 .main = {
1191 .inputIndexes = {0, 1, 2},
1192 .operands = {{ // input2
1193 .channelQuant = {},
1194 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1195 .dimensions = {2, 3, 2},
1196 .isIgnored = false,
1197 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1198 .numberOfConsumers = 1,
1199 .scale = 0.0f,
1200 .type = TestOperandType::TENSOR_FLOAT32,
1201 .zeroPoint = 0
1202 }, { // begin2
1203 .channelQuant = {},
1204 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1205 .dimensions = {3},
1206 .isIgnored = false,
1207 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1208 .numberOfConsumers = 1,
1209 .scale = 0.0f,
1210 .type = TestOperandType::TENSOR_INT32,
1211 .zeroPoint = 0
1212 }, { // size2
1213 .channelQuant = {},
1214 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1215 .dimensions = {3},
1216 .isIgnored = false,
1217 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1218 .numberOfConsumers = 1,
1219 .scale = 0.0f,
1220 .type = TestOperandType::TENSOR_INT32,
1221 .zeroPoint = 0
1222 }, { // output2
1223 .channelQuant = {},
1224 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1225 .dimensions = {2, 3, 2},
1226 .isIgnored = false,
1227 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1228 .numberOfConsumers = 0,
1229 .scale = 0.0f,
1230 .type = TestOperandType::TENSOR_FLOAT32,
1231 .zeroPoint = 0
1232 }},
1233 .operations = {{
1234 .inputs = {0, 1, 2},
1235 .outputs = {3},
1236 .type = TestOperationType::SLICE
1237 }},
1238 .outputIndexes = {3}
1239 },
1240 .minSupportedVersion = TestHalVersion::UNKNOWN,
1241 .referenced = {}
1242 };
1243 return model;
1244 }
1245
1246 const auto dummy_test_model_relaxed_3 = TestModelManager::get().add("slice_relaxed_3", get_test_model_relaxed_3());
1247
1248 } // namespace generated_tests::slice
1249
1250 namespace generated_tests::slice {
1251
get_test_model_relaxed_all_inputs_as_internal_3()1252 const TestModel& get_test_model_relaxed_all_inputs_as_internal_3() {
1253 static TestModel model = {
1254 .expectFailure = false,
1255 .expectedMultinomialDistributionTolerance = 0,
1256 .isRelaxed = true,
1257 .main = {
1258 .inputIndexes = {1, 2, 4},
1259 .operands = {{ // input2
1260 .channelQuant = {},
1261 .data = TestBuffer::createFromVector<float>({}),
1262 .dimensions = {2, 3, 2},
1263 .isIgnored = false,
1264 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1265 .numberOfConsumers = 1,
1266 .scale = 0.0f,
1267 .type = TestOperandType::TENSOR_FLOAT32,
1268 .zeroPoint = 0
1269 }, { // begin2
1270 .channelQuant = {},
1271 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1272 .dimensions = {3},
1273 .isIgnored = false,
1274 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1275 .numberOfConsumers = 1,
1276 .scale = 0.0f,
1277 .type = TestOperandType::TENSOR_INT32,
1278 .zeroPoint = 0
1279 }, { // size2
1280 .channelQuant = {},
1281 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1282 .dimensions = {3},
1283 .isIgnored = false,
1284 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1285 .numberOfConsumers = 1,
1286 .scale = 0.0f,
1287 .type = TestOperandType::TENSOR_INT32,
1288 .zeroPoint = 0
1289 }, { // output2
1290 .channelQuant = {},
1291 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1292 .dimensions = {2, 3, 2},
1293 .isIgnored = false,
1294 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1295 .numberOfConsumers = 0,
1296 .scale = 0.0f,
1297 .type = TestOperandType::TENSOR_FLOAT32,
1298 .zeroPoint = 0
1299 }, { // input2_new
1300 .channelQuant = {},
1301 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1302 .dimensions = {2, 3, 2},
1303 .isIgnored = false,
1304 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1305 .numberOfConsumers = 1,
1306 .scale = 0.0f,
1307 .type = TestOperandType::TENSOR_FLOAT32,
1308 .zeroPoint = 0
1309 }, { // dummy7
1310 .channelQuant = {},
1311 .data = TestBuffer::createFromVector<float>({0.0f}),
1312 .dimensions = {1},
1313 .isIgnored = false,
1314 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1315 .numberOfConsumers = 1,
1316 .scale = 0.0f,
1317 .type = TestOperandType::TENSOR_FLOAT32,
1318 .zeroPoint = 0
1319 }, { // param22
1320 .channelQuant = {},
1321 .data = TestBuffer::createFromVector<int32_t>({0}),
1322 .dimensions = {},
1323 .isIgnored = false,
1324 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1325 .numberOfConsumers = 1,
1326 .scale = 0.0f,
1327 .type = TestOperandType::INT32,
1328 .zeroPoint = 0
1329 }},
1330 .operations = {{
1331 .inputs = {4, 5, 6},
1332 .outputs = {0},
1333 .type = TestOperationType::ADD
1334 }, {
1335 .inputs = {0, 1, 2},
1336 .outputs = {3},
1337 .type = TestOperationType::SLICE
1338 }},
1339 .outputIndexes = {3}
1340 },
1341 .minSupportedVersion = TestHalVersion::UNKNOWN,
1342 .referenced = {}
1343 };
1344 return model;
1345 }
1346
1347 const auto dummy_test_model_relaxed_all_inputs_as_internal_3 = TestModelManager::get().add("slice_relaxed_all_inputs_as_internal_3", get_test_model_relaxed_all_inputs_as_internal_3());
1348
1349 } // namespace generated_tests::slice
1350
1351 namespace generated_tests::slice {
1352
get_test_model_float16_3()1353 const TestModel& get_test_model_float16_3() {
1354 static TestModel model = {
1355 .expectFailure = false,
1356 .expectedMultinomialDistributionTolerance = 0,
1357 .isRelaxed = false,
1358 .main = {
1359 .inputIndexes = {0, 1, 2},
1360 .operands = {{ // input2
1361 .channelQuant = {},
1362 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1363 .dimensions = {2, 3, 2},
1364 .isIgnored = false,
1365 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1366 .numberOfConsumers = 1,
1367 .scale = 0.0f,
1368 .type = TestOperandType::TENSOR_FLOAT16,
1369 .zeroPoint = 0
1370 }, { // begin2
1371 .channelQuant = {},
1372 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1373 .dimensions = {3},
1374 .isIgnored = false,
1375 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1376 .numberOfConsumers = 1,
1377 .scale = 0.0f,
1378 .type = TestOperandType::TENSOR_INT32,
1379 .zeroPoint = 0
1380 }, { // size2
1381 .channelQuant = {},
1382 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1383 .dimensions = {3},
1384 .isIgnored = false,
1385 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1386 .numberOfConsumers = 1,
1387 .scale = 0.0f,
1388 .type = TestOperandType::TENSOR_INT32,
1389 .zeroPoint = 0
1390 }, { // output2
1391 .channelQuant = {},
1392 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1393 .dimensions = {2, 3, 2},
1394 .isIgnored = false,
1395 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1396 .numberOfConsumers = 0,
1397 .scale = 0.0f,
1398 .type = TestOperandType::TENSOR_FLOAT16,
1399 .zeroPoint = 0
1400 }},
1401 .operations = {{
1402 .inputs = {0, 1, 2},
1403 .outputs = {3},
1404 .type = TestOperationType::SLICE
1405 }},
1406 .outputIndexes = {3}
1407 },
1408 .minSupportedVersion = TestHalVersion::V1_2,
1409 .referenced = {}
1410 };
1411 return model;
1412 }
1413
1414 const auto dummy_test_model_float16_3 = TestModelManager::get().add("slice_float16_3", get_test_model_float16_3());
1415
1416 } // namespace generated_tests::slice
1417
1418 namespace generated_tests::slice {
1419
get_test_model_float16_all_inputs_as_internal_3()1420 const TestModel& get_test_model_float16_all_inputs_as_internal_3() {
1421 static TestModel model = {
1422 .expectFailure = false,
1423 .expectedMultinomialDistributionTolerance = 0,
1424 .isRelaxed = false,
1425 .main = {
1426 .inputIndexes = {1, 2, 4},
1427 .operands = {{ // input2
1428 .channelQuant = {},
1429 .data = TestBuffer::createFromVector<_Float16>({}),
1430 .dimensions = {2, 3, 2},
1431 .isIgnored = false,
1432 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1433 .numberOfConsumers = 1,
1434 .scale = 0.0f,
1435 .type = TestOperandType::TENSOR_FLOAT16,
1436 .zeroPoint = 0
1437 }, { // begin2
1438 .channelQuant = {},
1439 .data = TestBuffer::createFromVector<int32_t>({0, 0, 0}),
1440 .dimensions = {3},
1441 .isIgnored = false,
1442 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1443 .numberOfConsumers = 1,
1444 .scale = 0.0f,
1445 .type = TestOperandType::TENSOR_INT32,
1446 .zeroPoint = 0
1447 }, { // size2
1448 .channelQuant = {},
1449 .data = TestBuffer::createFromVector<int32_t>({2, 3, 2}),
1450 .dimensions = {3},
1451 .isIgnored = false,
1452 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1453 .numberOfConsumers = 1,
1454 .scale = 0.0f,
1455 .type = TestOperandType::TENSOR_INT32,
1456 .zeroPoint = 0
1457 }, { // output2
1458 .channelQuant = {},
1459 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1460 .dimensions = {2, 3, 2},
1461 .isIgnored = false,
1462 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1463 .numberOfConsumers = 0,
1464 .scale = 0.0f,
1465 .type = TestOperandType::TENSOR_FLOAT16,
1466 .zeroPoint = 0
1467 }, { // input2_new
1468 .channelQuant = {},
1469 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}),
1470 .dimensions = {2, 3, 2},
1471 .isIgnored = false,
1472 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1473 .numberOfConsumers = 1,
1474 .scale = 0.0f,
1475 .type = TestOperandType::TENSOR_FLOAT16,
1476 .zeroPoint = 0
1477 }, { // dummy8
1478 .channelQuant = {},
1479 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1480 .dimensions = {1},
1481 .isIgnored = false,
1482 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1483 .numberOfConsumers = 1,
1484 .scale = 0.0f,
1485 .type = TestOperandType::TENSOR_FLOAT16,
1486 .zeroPoint = 0
1487 }, { // param23
1488 .channelQuant = {},
1489 .data = TestBuffer::createFromVector<int32_t>({0}),
1490 .dimensions = {},
1491 .isIgnored = false,
1492 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1493 .numberOfConsumers = 1,
1494 .scale = 0.0f,
1495 .type = TestOperandType::INT32,
1496 .zeroPoint = 0
1497 }},
1498 .operations = {{
1499 .inputs = {4, 5, 6},
1500 .outputs = {0},
1501 .type = TestOperationType::ADD
1502 }, {
1503 .inputs = {0, 1, 2},
1504 .outputs = {3},
1505 .type = TestOperationType::SLICE
1506 }},
1507 .outputIndexes = {3}
1508 },
1509 .minSupportedVersion = TestHalVersion::V1_2,
1510 .referenced = {}
1511 };
1512 return model;
1513 }
1514
1515 const auto dummy_test_model_float16_all_inputs_as_internal_3 = TestModelManager::get().add("slice_float16_all_inputs_as_internal_3", get_test_model_float16_all_inputs_as_internal_3());
1516
1517 } // namespace generated_tests::slice
1518
1519 namespace generated_tests::slice {
1520
get_test_model_4()1521 const TestModel& get_test_model_4() {
1522 static TestModel model = {
1523 .expectFailure = false,
1524 .expectedMultinomialDistributionTolerance = 0,
1525 .isRelaxed = false,
1526 .main = {
1527 .inputIndexes = {0, 1, 2},
1528 .operands = {{ // input3
1529 .channelQuant = {},
1530 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
1531 .dimensions = {4, 1, 1, 1},
1532 .isIgnored = false,
1533 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1534 .numberOfConsumers = 1,
1535 .scale = 0.0f,
1536 .type = TestOperandType::TENSOR_FLOAT32,
1537 .zeroPoint = 0
1538 }, { // begin3
1539 .channelQuant = {},
1540 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1541 .dimensions = {4},
1542 .isIgnored = false,
1543 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1544 .numberOfConsumers = 1,
1545 .scale = 0.0f,
1546 .type = TestOperandType::TENSOR_INT32,
1547 .zeroPoint = 0
1548 }, { // size3
1549 .channelQuant = {},
1550 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1551 .dimensions = {4},
1552 .isIgnored = false,
1553 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1554 .numberOfConsumers = 1,
1555 .scale = 0.0f,
1556 .type = TestOperandType::TENSOR_INT32,
1557 .zeroPoint = 0
1558 }, { // output3
1559 .channelQuant = {},
1560 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f, 4.0f}),
1561 .dimensions = {3, 1, 1, 1},
1562 .isIgnored = false,
1563 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1564 .numberOfConsumers = 0,
1565 .scale = 0.0f,
1566 .type = TestOperandType::TENSOR_FLOAT32,
1567 .zeroPoint = 0
1568 }},
1569 .operations = {{
1570 .inputs = {0, 1, 2},
1571 .outputs = {3},
1572 .type = TestOperationType::SLICE
1573 }},
1574 .outputIndexes = {3}
1575 },
1576 .minSupportedVersion = TestHalVersion::V1_2,
1577 .referenced = {}
1578 };
1579 return model;
1580 }
1581
1582 const auto dummy_test_model_4 = TestModelManager::get().add("slice_4", get_test_model_4());
1583
1584 } // namespace generated_tests::slice
1585
1586 namespace generated_tests::slice {
1587
get_test_model_all_inputs_as_internal_4()1588 const TestModel& get_test_model_all_inputs_as_internal_4() {
1589 static TestModel model = {
1590 .expectFailure = false,
1591 .expectedMultinomialDistributionTolerance = 0,
1592 .isRelaxed = false,
1593 .main = {
1594 .inputIndexes = {1, 2, 4},
1595 .operands = {{ // input3
1596 .channelQuant = {},
1597 .data = TestBuffer::createFromVector<float>({}),
1598 .dimensions = {4, 1, 1, 1},
1599 .isIgnored = false,
1600 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1601 .numberOfConsumers = 1,
1602 .scale = 0.0f,
1603 .type = TestOperandType::TENSOR_FLOAT32,
1604 .zeroPoint = 0
1605 }, { // begin3
1606 .channelQuant = {},
1607 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1608 .dimensions = {4},
1609 .isIgnored = false,
1610 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1611 .numberOfConsumers = 1,
1612 .scale = 0.0f,
1613 .type = TestOperandType::TENSOR_INT32,
1614 .zeroPoint = 0
1615 }, { // size3
1616 .channelQuant = {},
1617 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1618 .dimensions = {4},
1619 .isIgnored = false,
1620 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1621 .numberOfConsumers = 1,
1622 .scale = 0.0f,
1623 .type = TestOperandType::TENSOR_INT32,
1624 .zeroPoint = 0
1625 }, { // output3
1626 .channelQuant = {},
1627 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f, 4.0f}),
1628 .dimensions = {3, 1, 1, 1},
1629 .isIgnored = false,
1630 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1631 .numberOfConsumers = 0,
1632 .scale = 0.0f,
1633 .type = TestOperandType::TENSOR_FLOAT32,
1634 .zeroPoint = 0
1635 }, { // input3_new
1636 .channelQuant = {},
1637 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
1638 .dimensions = {4, 1, 1, 1},
1639 .isIgnored = false,
1640 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1641 .numberOfConsumers = 1,
1642 .scale = 0.0f,
1643 .type = TestOperandType::TENSOR_FLOAT32,
1644 .zeroPoint = 0
1645 }, { // dummy9
1646 .channelQuant = {},
1647 .data = TestBuffer::createFromVector<float>({0.0f}),
1648 .dimensions = {1},
1649 .isIgnored = false,
1650 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1651 .numberOfConsumers = 1,
1652 .scale = 0.0f,
1653 .type = TestOperandType::TENSOR_FLOAT32,
1654 .zeroPoint = 0
1655 }, { // param24
1656 .channelQuant = {},
1657 .data = TestBuffer::createFromVector<int32_t>({0}),
1658 .dimensions = {},
1659 .isIgnored = false,
1660 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1661 .numberOfConsumers = 1,
1662 .scale = 0.0f,
1663 .type = TestOperandType::INT32,
1664 .zeroPoint = 0
1665 }},
1666 .operations = {{
1667 .inputs = {4, 5, 6},
1668 .outputs = {0},
1669 .type = TestOperationType::ADD
1670 }, {
1671 .inputs = {0, 1, 2},
1672 .outputs = {3},
1673 .type = TestOperationType::SLICE
1674 }},
1675 .outputIndexes = {3}
1676 },
1677 .minSupportedVersion = TestHalVersion::V1_2,
1678 .referenced = {}
1679 };
1680 return model;
1681 }
1682
1683 const auto dummy_test_model_all_inputs_as_internal_4 = TestModelManager::get().add("slice_all_inputs_as_internal_4", get_test_model_all_inputs_as_internal_4());
1684
1685 } // namespace generated_tests::slice
1686
1687 namespace generated_tests::slice {
1688
get_test_model_relaxed_4()1689 const TestModel& get_test_model_relaxed_4() {
1690 static TestModel model = {
1691 .expectFailure = false,
1692 .expectedMultinomialDistributionTolerance = 0,
1693 .isRelaxed = true,
1694 .main = {
1695 .inputIndexes = {0, 1, 2},
1696 .operands = {{ // input3
1697 .channelQuant = {},
1698 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
1699 .dimensions = {4, 1, 1, 1},
1700 .isIgnored = false,
1701 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1702 .numberOfConsumers = 1,
1703 .scale = 0.0f,
1704 .type = TestOperandType::TENSOR_FLOAT32,
1705 .zeroPoint = 0
1706 }, { // begin3
1707 .channelQuant = {},
1708 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1709 .dimensions = {4},
1710 .isIgnored = false,
1711 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1712 .numberOfConsumers = 1,
1713 .scale = 0.0f,
1714 .type = TestOperandType::TENSOR_INT32,
1715 .zeroPoint = 0
1716 }, { // size3
1717 .channelQuant = {},
1718 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1719 .dimensions = {4},
1720 .isIgnored = false,
1721 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1722 .numberOfConsumers = 1,
1723 .scale = 0.0f,
1724 .type = TestOperandType::TENSOR_INT32,
1725 .zeroPoint = 0
1726 }, { // output3
1727 .channelQuant = {},
1728 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f, 4.0f}),
1729 .dimensions = {3, 1, 1, 1},
1730 .isIgnored = false,
1731 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1732 .numberOfConsumers = 0,
1733 .scale = 0.0f,
1734 .type = TestOperandType::TENSOR_FLOAT32,
1735 .zeroPoint = 0
1736 }},
1737 .operations = {{
1738 .inputs = {0, 1, 2},
1739 .outputs = {3},
1740 .type = TestOperationType::SLICE
1741 }},
1742 .outputIndexes = {3}
1743 },
1744 .minSupportedVersion = TestHalVersion::UNKNOWN,
1745 .referenced = {}
1746 };
1747 return model;
1748 }
1749
1750 const auto dummy_test_model_relaxed_4 = TestModelManager::get().add("slice_relaxed_4", get_test_model_relaxed_4());
1751
1752 } // namespace generated_tests::slice
1753
1754 namespace generated_tests::slice {
1755
get_test_model_relaxed_all_inputs_as_internal_4()1756 const TestModel& get_test_model_relaxed_all_inputs_as_internal_4() {
1757 static TestModel model = {
1758 .expectFailure = false,
1759 .expectedMultinomialDistributionTolerance = 0,
1760 .isRelaxed = true,
1761 .main = {
1762 .inputIndexes = {1, 2, 4},
1763 .operands = {{ // input3
1764 .channelQuant = {},
1765 .data = TestBuffer::createFromVector<float>({}),
1766 .dimensions = {4, 1, 1, 1},
1767 .isIgnored = false,
1768 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1769 .numberOfConsumers = 1,
1770 .scale = 0.0f,
1771 .type = TestOperandType::TENSOR_FLOAT32,
1772 .zeroPoint = 0
1773 }, { // begin3
1774 .channelQuant = {},
1775 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1776 .dimensions = {4},
1777 .isIgnored = false,
1778 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1779 .numberOfConsumers = 1,
1780 .scale = 0.0f,
1781 .type = TestOperandType::TENSOR_INT32,
1782 .zeroPoint = 0
1783 }, { // size3
1784 .channelQuant = {},
1785 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1786 .dimensions = {4},
1787 .isIgnored = false,
1788 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1789 .numberOfConsumers = 1,
1790 .scale = 0.0f,
1791 .type = TestOperandType::TENSOR_INT32,
1792 .zeroPoint = 0
1793 }, { // output3
1794 .channelQuant = {},
1795 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f, 4.0f}),
1796 .dimensions = {3, 1, 1, 1},
1797 .isIgnored = false,
1798 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1799 .numberOfConsumers = 0,
1800 .scale = 0.0f,
1801 .type = TestOperandType::TENSOR_FLOAT32,
1802 .zeroPoint = 0
1803 }, { // input3_new
1804 .channelQuant = {},
1805 .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f}),
1806 .dimensions = {4, 1, 1, 1},
1807 .isIgnored = false,
1808 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1809 .numberOfConsumers = 1,
1810 .scale = 0.0f,
1811 .type = TestOperandType::TENSOR_FLOAT32,
1812 .zeroPoint = 0
1813 }, { // dummy10
1814 .channelQuant = {},
1815 .data = TestBuffer::createFromVector<float>({0.0f}),
1816 .dimensions = {1},
1817 .isIgnored = false,
1818 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1819 .numberOfConsumers = 1,
1820 .scale = 0.0f,
1821 .type = TestOperandType::TENSOR_FLOAT32,
1822 .zeroPoint = 0
1823 }, { // param25
1824 .channelQuant = {},
1825 .data = TestBuffer::createFromVector<int32_t>({0}),
1826 .dimensions = {},
1827 .isIgnored = false,
1828 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1829 .numberOfConsumers = 1,
1830 .scale = 0.0f,
1831 .type = TestOperandType::INT32,
1832 .zeroPoint = 0
1833 }},
1834 .operations = {{
1835 .inputs = {4, 5, 6},
1836 .outputs = {0},
1837 .type = TestOperationType::ADD
1838 }, {
1839 .inputs = {0, 1, 2},
1840 .outputs = {3},
1841 .type = TestOperationType::SLICE
1842 }},
1843 .outputIndexes = {3}
1844 },
1845 .minSupportedVersion = TestHalVersion::UNKNOWN,
1846 .referenced = {}
1847 };
1848 return model;
1849 }
1850
1851 const auto dummy_test_model_relaxed_all_inputs_as_internal_4 = TestModelManager::get().add("slice_relaxed_all_inputs_as_internal_4", get_test_model_relaxed_all_inputs_as_internal_4());
1852
1853 } // namespace generated_tests::slice
1854
1855 namespace generated_tests::slice {
1856
get_test_model_float16_4()1857 const TestModel& get_test_model_float16_4() {
1858 static TestModel model = {
1859 .expectFailure = false,
1860 .expectedMultinomialDistributionTolerance = 0,
1861 .isRelaxed = false,
1862 .main = {
1863 .inputIndexes = {0, 1, 2},
1864 .operands = {{ // input3
1865 .channelQuant = {},
1866 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f}),
1867 .dimensions = {4, 1, 1, 1},
1868 .isIgnored = false,
1869 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1870 .numberOfConsumers = 1,
1871 .scale = 0.0f,
1872 .type = TestOperandType::TENSOR_FLOAT16,
1873 .zeroPoint = 0
1874 }, { // begin3
1875 .channelQuant = {},
1876 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1877 .dimensions = {4},
1878 .isIgnored = false,
1879 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1880 .numberOfConsumers = 1,
1881 .scale = 0.0f,
1882 .type = TestOperandType::TENSOR_INT32,
1883 .zeroPoint = 0
1884 }, { // size3
1885 .channelQuant = {},
1886 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1887 .dimensions = {4},
1888 .isIgnored = false,
1889 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1890 .numberOfConsumers = 1,
1891 .scale = 0.0f,
1892 .type = TestOperandType::TENSOR_INT32,
1893 .zeroPoint = 0
1894 }, { // output3
1895 .channelQuant = {},
1896 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f, 4.0f}),
1897 .dimensions = {3, 1, 1, 1},
1898 .isIgnored = false,
1899 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1900 .numberOfConsumers = 0,
1901 .scale = 0.0f,
1902 .type = TestOperandType::TENSOR_FLOAT16,
1903 .zeroPoint = 0
1904 }},
1905 .operations = {{
1906 .inputs = {0, 1, 2},
1907 .outputs = {3},
1908 .type = TestOperationType::SLICE
1909 }},
1910 .outputIndexes = {3}
1911 },
1912 .minSupportedVersion = TestHalVersion::V1_2,
1913 .referenced = {}
1914 };
1915 return model;
1916 }
1917
1918 const auto dummy_test_model_float16_4 = TestModelManager::get().add("slice_float16_4", get_test_model_float16_4());
1919
1920 } // namespace generated_tests::slice
1921
1922 namespace generated_tests::slice {
1923
get_test_model_float16_all_inputs_as_internal_4()1924 const TestModel& get_test_model_float16_all_inputs_as_internal_4() {
1925 static TestModel model = {
1926 .expectFailure = false,
1927 .expectedMultinomialDistributionTolerance = 0,
1928 .isRelaxed = false,
1929 .main = {
1930 .inputIndexes = {1, 2, 4},
1931 .operands = {{ // input3
1932 .channelQuant = {},
1933 .data = TestBuffer::createFromVector<_Float16>({}),
1934 .dimensions = {4, 1, 1, 1},
1935 .isIgnored = false,
1936 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1937 .numberOfConsumers = 1,
1938 .scale = 0.0f,
1939 .type = TestOperandType::TENSOR_FLOAT16,
1940 .zeroPoint = 0
1941 }, { // begin3
1942 .channelQuant = {},
1943 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
1944 .dimensions = {4},
1945 .isIgnored = false,
1946 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1947 .numberOfConsumers = 1,
1948 .scale = 0.0f,
1949 .type = TestOperandType::TENSOR_INT32,
1950 .zeroPoint = 0
1951 }, { // size3
1952 .channelQuant = {},
1953 .data = TestBuffer::createFromVector<int32_t>({3, 1, 1, 1}),
1954 .dimensions = {4},
1955 .isIgnored = false,
1956 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1957 .numberOfConsumers = 1,
1958 .scale = 0.0f,
1959 .type = TestOperandType::TENSOR_INT32,
1960 .zeroPoint = 0
1961 }, { // output3
1962 .channelQuant = {},
1963 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f, 4.0f}),
1964 .dimensions = {3, 1, 1, 1},
1965 .isIgnored = false,
1966 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1967 .numberOfConsumers = 0,
1968 .scale = 0.0f,
1969 .type = TestOperandType::TENSOR_FLOAT16,
1970 .zeroPoint = 0
1971 }, { // input3_new
1972 .channelQuant = {},
1973 .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f}),
1974 .dimensions = {4, 1, 1, 1},
1975 .isIgnored = false,
1976 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1977 .numberOfConsumers = 1,
1978 .scale = 0.0f,
1979 .type = TestOperandType::TENSOR_FLOAT16,
1980 .zeroPoint = 0
1981 }, { // dummy11
1982 .channelQuant = {},
1983 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1984 .dimensions = {1},
1985 .isIgnored = false,
1986 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1987 .numberOfConsumers = 1,
1988 .scale = 0.0f,
1989 .type = TestOperandType::TENSOR_FLOAT16,
1990 .zeroPoint = 0
1991 }, { // param26
1992 .channelQuant = {},
1993 .data = TestBuffer::createFromVector<int32_t>({0}),
1994 .dimensions = {},
1995 .isIgnored = false,
1996 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1997 .numberOfConsumers = 1,
1998 .scale = 0.0f,
1999 .type = TestOperandType::INT32,
2000 .zeroPoint = 0
2001 }},
2002 .operations = {{
2003 .inputs = {4, 5, 6},
2004 .outputs = {0},
2005 .type = TestOperationType::ADD
2006 }, {
2007 .inputs = {0, 1, 2},
2008 .outputs = {3},
2009 .type = TestOperationType::SLICE
2010 }},
2011 .outputIndexes = {3}
2012 },
2013 .minSupportedVersion = TestHalVersion::V1_2,
2014 .referenced = {}
2015 };
2016 return model;
2017 }
2018
2019 const auto dummy_test_model_float16_all_inputs_as_internal_4 = TestModelManager::get().add("slice_float16_all_inputs_as_internal_4", get_test_model_float16_all_inputs_as_internal_4());
2020
2021 } // namespace generated_tests::slice
2022
2023 namespace generated_tests::slice {
2024
get_test_model_5()2025 const TestModel& get_test_model_5() {
2026 static TestModel model = {
2027 .expectFailure = false,
2028 .expectedMultinomialDistributionTolerance = 0,
2029 .isRelaxed = false,
2030 .main = {
2031 .inputIndexes = {0, 1, 2},
2032 .operands = {{ // input4
2033 .channelQuant = {},
2034 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2035 .dimensions = {3, 2, 3, 1},
2036 .isIgnored = false,
2037 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2038 .numberOfConsumers = 1,
2039 .scale = 0.0f,
2040 .type = TestOperandType::TENSOR_INT32,
2041 .zeroPoint = 0
2042 }, { // begin4
2043 .channelQuant = {},
2044 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2045 .dimensions = {4},
2046 .isIgnored = false,
2047 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2048 .numberOfConsumers = 1,
2049 .scale = 0.0f,
2050 .type = TestOperandType::TENSOR_INT32,
2051 .zeroPoint = 0
2052 }, { // size4
2053 .channelQuant = {},
2054 .data = TestBuffer::createFromVector<int32_t>({1, 1, 3, 1}),
2055 .dimensions = {4},
2056 .isIgnored = false,
2057 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2058 .numberOfConsumers = 1,
2059 .scale = 0.0f,
2060 .type = TestOperandType::TENSOR_INT32,
2061 .zeroPoint = 0
2062 }, { // output4
2063 .channelQuant = {},
2064 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3}),
2065 .dimensions = {1, 1, 3, 1},
2066 .isIgnored = false,
2067 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2068 .numberOfConsumers = 0,
2069 .scale = 0.0f,
2070 .type = TestOperandType::TENSOR_INT32,
2071 .zeroPoint = 0
2072 }},
2073 .operations = {{
2074 .inputs = {0, 1, 2},
2075 .outputs = {3},
2076 .type = TestOperationType::SLICE
2077 }},
2078 .outputIndexes = {3}
2079 },
2080 .minSupportedVersion = TestHalVersion::V1_2,
2081 .referenced = {}
2082 };
2083 return model;
2084 }
2085
2086 const auto dummy_test_model_5 = TestModelManager::get().add("slice_5", get_test_model_5());
2087
2088 } // namespace generated_tests::slice
2089
2090 namespace generated_tests::slice {
2091
get_test_model_relaxed_5()2092 const TestModel& get_test_model_relaxed_5() {
2093 static TestModel model = {
2094 .expectFailure = false,
2095 .expectedMultinomialDistributionTolerance = 0,
2096 .isRelaxed = true,
2097 .main = {
2098 .inputIndexes = {0, 1, 2},
2099 .operands = {{ // input4
2100 .channelQuant = {},
2101 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2102 .dimensions = {3, 2, 3, 1},
2103 .isIgnored = false,
2104 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2105 .numberOfConsumers = 1,
2106 .scale = 0.0f,
2107 .type = TestOperandType::TENSOR_INT32,
2108 .zeroPoint = 0
2109 }, { // begin4
2110 .channelQuant = {},
2111 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2112 .dimensions = {4},
2113 .isIgnored = false,
2114 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2115 .numberOfConsumers = 1,
2116 .scale = 0.0f,
2117 .type = TestOperandType::TENSOR_INT32,
2118 .zeroPoint = 0
2119 }, { // size4
2120 .channelQuant = {},
2121 .data = TestBuffer::createFromVector<int32_t>({1, 1, 3, 1}),
2122 .dimensions = {4},
2123 .isIgnored = false,
2124 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2125 .numberOfConsumers = 1,
2126 .scale = 0.0f,
2127 .type = TestOperandType::TENSOR_INT32,
2128 .zeroPoint = 0
2129 }, { // output4
2130 .channelQuant = {},
2131 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3}),
2132 .dimensions = {1, 1, 3, 1},
2133 .isIgnored = false,
2134 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2135 .numberOfConsumers = 0,
2136 .scale = 0.0f,
2137 .type = TestOperandType::TENSOR_INT32,
2138 .zeroPoint = 0
2139 }},
2140 .operations = {{
2141 .inputs = {0, 1, 2},
2142 .outputs = {3},
2143 .type = TestOperationType::SLICE
2144 }},
2145 .outputIndexes = {3}
2146 },
2147 .minSupportedVersion = TestHalVersion::UNKNOWN,
2148 .referenced = {}
2149 };
2150 return model;
2151 }
2152
2153 const auto dummy_test_model_relaxed_5 = TestModelManager::get().add("slice_relaxed_5", get_test_model_relaxed_5());
2154
2155 } // namespace generated_tests::slice
2156
2157 namespace generated_tests::slice {
2158
get_test_model_float16_5()2159 const TestModel& get_test_model_float16_5() {
2160 static TestModel model = {
2161 .expectFailure = false,
2162 .expectedMultinomialDistributionTolerance = 0,
2163 .isRelaxed = false,
2164 .main = {
2165 .inputIndexes = {0, 1, 2},
2166 .operands = {{ // input4
2167 .channelQuant = {},
2168 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2169 .dimensions = {3, 2, 3, 1},
2170 .isIgnored = false,
2171 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2172 .numberOfConsumers = 1,
2173 .scale = 0.0f,
2174 .type = TestOperandType::TENSOR_INT32,
2175 .zeroPoint = 0
2176 }, { // begin4
2177 .channelQuant = {},
2178 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2179 .dimensions = {4},
2180 .isIgnored = false,
2181 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2182 .numberOfConsumers = 1,
2183 .scale = 0.0f,
2184 .type = TestOperandType::TENSOR_INT32,
2185 .zeroPoint = 0
2186 }, { // size4
2187 .channelQuant = {},
2188 .data = TestBuffer::createFromVector<int32_t>({1, 1, 3, 1}),
2189 .dimensions = {4},
2190 .isIgnored = false,
2191 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2192 .numberOfConsumers = 1,
2193 .scale = 0.0f,
2194 .type = TestOperandType::TENSOR_INT32,
2195 .zeroPoint = 0
2196 }, { // output4
2197 .channelQuant = {},
2198 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3}),
2199 .dimensions = {1, 1, 3, 1},
2200 .isIgnored = false,
2201 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2202 .numberOfConsumers = 0,
2203 .scale = 0.0f,
2204 .type = TestOperandType::TENSOR_INT32,
2205 .zeroPoint = 0
2206 }},
2207 .operations = {{
2208 .inputs = {0, 1, 2},
2209 .outputs = {3},
2210 .type = TestOperationType::SLICE
2211 }},
2212 .outputIndexes = {3}
2213 },
2214 .minSupportedVersion = TestHalVersion::V1_2,
2215 .referenced = {}
2216 };
2217 return model;
2218 }
2219
2220 const auto dummy_test_model_float16_5 = TestModelManager::get().add("slice_float16_5", get_test_model_float16_5());
2221
2222 } // namespace generated_tests::slice
2223
2224 namespace generated_tests::slice {
2225
get_test_model_6()2226 const TestModel& get_test_model_6() {
2227 static TestModel model = {
2228 .expectFailure = false,
2229 .expectedMultinomialDistributionTolerance = 0,
2230 .isRelaxed = false,
2231 .main = {
2232 .inputIndexes = {0, 1, 2},
2233 .operands = {{ // input5
2234 .channelQuant = {},
2235 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2236 .dimensions = {3, 2, 3, 1},
2237 .isIgnored = false,
2238 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2239 .numberOfConsumers = 1,
2240 .scale = 0.0f,
2241 .type = TestOperandType::TENSOR_INT32,
2242 .zeroPoint = 0
2243 }, { // begin5
2244 .channelQuant = {},
2245 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2246 .dimensions = {4},
2247 .isIgnored = false,
2248 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2249 .numberOfConsumers = 1,
2250 .scale = 0.0f,
2251 .type = TestOperandType::TENSOR_INT32,
2252 .zeroPoint = 0
2253 }, { // size5
2254 .channelQuant = {},
2255 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2256 .dimensions = {4},
2257 .isIgnored = false,
2258 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2259 .numberOfConsumers = 1,
2260 .scale = 0.0f,
2261 .type = TestOperandType::TENSOR_INT32,
2262 .zeroPoint = 0
2263 }, { // output5
2264 .channelQuant = {},
2265 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
2266 .dimensions = {2, 1, 3, 1},
2267 .isIgnored = false,
2268 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2269 .numberOfConsumers = 0,
2270 .scale = 0.0f,
2271 .type = TestOperandType::TENSOR_INT32,
2272 .zeroPoint = 0
2273 }},
2274 .operations = {{
2275 .inputs = {0, 1, 2},
2276 .outputs = {3},
2277 .type = TestOperationType::SLICE
2278 }},
2279 .outputIndexes = {3}
2280 },
2281 .minSupportedVersion = TestHalVersion::V1_2,
2282 .referenced = {}
2283 };
2284 return model;
2285 }
2286
2287 const auto dummy_test_model_6 = TestModelManager::get().add("slice_6", get_test_model_6());
2288
2289 } // namespace generated_tests::slice
2290
2291 namespace generated_tests::slice {
2292
get_test_model_relaxed_6()2293 const TestModel& get_test_model_relaxed_6() {
2294 static TestModel model = {
2295 .expectFailure = false,
2296 .expectedMultinomialDistributionTolerance = 0,
2297 .isRelaxed = true,
2298 .main = {
2299 .inputIndexes = {0, 1, 2},
2300 .operands = {{ // input5
2301 .channelQuant = {},
2302 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2303 .dimensions = {3, 2, 3, 1},
2304 .isIgnored = false,
2305 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2306 .numberOfConsumers = 1,
2307 .scale = 0.0f,
2308 .type = TestOperandType::TENSOR_INT32,
2309 .zeroPoint = 0
2310 }, { // begin5
2311 .channelQuant = {},
2312 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2313 .dimensions = {4},
2314 .isIgnored = false,
2315 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2316 .numberOfConsumers = 1,
2317 .scale = 0.0f,
2318 .type = TestOperandType::TENSOR_INT32,
2319 .zeroPoint = 0
2320 }, { // size5
2321 .channelQuant = {},
2322 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2323 .dimensions = {4},
2324 .isIgnored = false,
2325 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2326 .numberOfConsumers = 1,
2327 .scale = 0.0f,
2328 .type = TestOperandType::TENSOR_INT32,
2329 .zeroPoint = 0
2330 }, { // output5
2331 .channelQuant = {},
2332 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
2333 .dimensions = {2, 1, 3, 1},
2334 .isIgnored = false,
2335 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2336 .numberOfConsumers = 0,
2337 .scale = 0.0f,
2338 .type = TestOperandType::TENSOR_INT32,
2339 .zeroPoint = 0
2340 }},
2341 .operations = {{
2342 .inputs = {0, 1, 2},
2343 .outputs = {3},
2344 .type = TestOperationType::SLICE
2345 }},
2346 .outputIndexes = {3}
2347 },
2348 .minSupportedVersion = TestHalVersion::UNKNOWN,
2349 .referenced = {}
2350 };
2351 return model;
2352 }
2353
2354 const auto dummy_test_model_relaxed_6 = TestModelManager::get().add("slice_relaxed_6", get_test_model_relaxed_6());
2355
2356 } // namespace generated_tests::slice
2357
2358 namespace generated_tests::slice {
2359
get_test_model_float16_6()2360 const TestModel& get_test_model_float16_6() {
2361 static TestModel model = {
2362 .expectFailure = false,
2363 .expectedMultinomialDistributionTolerance = 0,
2364 .isRelaxed = false,
2365 .main = {
2366 .inputIndexes = {0, 1, 2},
2367 .operands = {{ // input5
2368 .channelQuant = {},
2369 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2370 .dimensions = {3, 2, 3, 1},
2371 .isIgnored = false,
2372 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2373 .numberOfConsumers = 1,
2374 .scale = 0.0f,
2375 .type = TestOperandType::TENSOR_INT32,
2376 .zeroPoint = 0
2377 }, { // begin5
2378 .channelQuant = {},
2379 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2380 .dimensions = {4},
2381 .isIgnored = false,
2382 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2383 .numberOfConsumers = 1,
2384 .scale = 0.0f,
2385 .type = TestOperandType::TENSOR_INT32,
2386 .zeroPoint = 0
2387 }, { // size5
2388 .channelQuant = {},
2389 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2390 .dimensions = {4},
2391 .isIgnored = false,
2392 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2393 .numberOfConsumers = 1,
2394 .scale = 0.0f,
2395 .type = TestOperandType::TENSOR_INT32,
2396 .zeroPoint = 0
2397 }, { // output5
2398 .channelQuant = {},
2399 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
2400 .dimensions = {2, 1, 3, 1},
2401 .isIgnored = false,
2402 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2403 .numberOfConsumers = 0,
2404 .scale = 0.0f,
2405 .type = TestOperandType::TENSOR_INT32,
2406 .zeroPoint = 0
2407 }},
2408 .operations = {{
2409 .inputs = {0, 1, 2},
2410 .outputs = {3},
2411 .type = TestOperationType::SLICE
2412 }},
2413 .outputIndexes = {3}
2414 },
2415 .minSupportedVersion = TestHalVersion::V1_2,
2416 .referenced = {}
2417 };
2418 return model;
2419 }
2420
2421 const auto dummy_test_model_float16_6 = TestModelManager::get().add("slice_float16_6", get_test_model_float16_6());
2422
2423 } // namespace generated_tests::slice
2424
2425 namespace generated_tests::slice {
2426
get_test_model_7()2427 const TestModel& get_test_model_7() {
2428 static TestModel model = {
2429 .expectFailure = false,
2430 .expectedMultinomialDistributionTolerance = 0,
2431 .isRelaxed = false,
2432 .main = {
2433 .inputIndexes = {0, 1, 2},
2434 .operands = {{ // input6
2435 .channelQuant = {},
2436 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2437 .dimensions = {3, 2, 3, 1},
2438 .isIgnored = false,
2439 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2440 .numberOfConsumers = 1,
2441 .scale = 2.0f,
2442 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2443 .zeroPoint = 128
2444 }, { // begin6
2445 .channelQuant = {},
2446 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2447 .dimensions = {4},
2448 .isIgnored = false,
2449 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2450 .numberOfConsumers = 1,
2451 .scale = 0.0f,
2452 .type = TestOperandType::TENSOR_INT32,
2453 .zeroPoint = 0
2454 }, { // size6
2455 .channelQuant = {},
2456 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2457 .dimensions = {4},
2458 .isIgnored = false,
2459 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2460 .numberOfConsumers = 1,
2461 .scale = 0.0f,
2462 .type = TestOperandType::TENSOR_INT32,
2463 .zeroPoint = 0
2464 }, { // output6
2465 .channelQuant = {},
2466 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2467 .dimensions = {2, 1, 3, 1},
2468 .isIgnored = false,
2469 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2470 .numberOfConsumers = 0,
2471 .scale = 2.0f,
2472 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2473 .zeroPoint = 128
2474 }},
2475 .operations = {{
2476 .inputs = {0, 1, 2},
2477 .outputs = {3},
2478 .type = TestOperationType::SLICE
2479 }},
2480 .outputIndexes = {3}
2481 },
2482 .minSupportedVersion = TestHalVersion::V1_2,
2483 .referenced = {}
2484 };
2485 return model;
2486 }
2487
2488 const auto dummy_test_model_7 = TestModelManager::get().add("slice_7", get_test_model_7());
2489
2490 } // namespace generated_tests::slice
2491
2492 namespace generated_tests::slice {
2493
get_test_model_all_inputs_as_internal_5()2494 const TestModel& get_test_model_all_inputs_as_internal_5() {
2495 static TestModel model = {
2496 .expectFailure = false,
2497 .expectedMultinomialDistributionTolerance = 0,
2498 .isRelaxed = false,
2499 .main = {
2500 .inputIndexes = {1, 2, 4},
2501 .operands = {{ // input6
2502 .channelQuant = {},
2503 .data = TestBuffer::createFromVector<uint8_t>({}),
2504 .dimensions = {3, 2, 3, 1},
2505 .isIgnored = false,
2506 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2507 .numberOfConsumers = 1,
2508 .scale = 2.0f,
2509 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2510 .zeroPoint = 128
2511 }, { // begin6
2512 .channelQuant = {},
2513 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2514 .dimensions = {4},
2515 .isIgnored = false,
2516 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2517 .numberOfConsumers = 1,
2518 .scale = 0.0f,
2519 .type = TestOperandType::TENSOR_INT32,
2520 .zeroPoint = 0
2521 }, { // size6
2522 .channelQuant = {},
2523 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2524 .dimensions = {4},
2525 .isIgnored = false,
2526 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2527 .numberOfConsumers = 1,
2528 .scale = 0.0f,
2529 .type = TestOperandType::TENSOR_INT32,
2530 .zeroPoint = 0
2531 }, { // output6
2532 .channelQuant = {},
2533 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2534 .dimensions = {2, 1, 3, 1},
2535 .isIgnored = false,
2536 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2537 .numberOfConsumers = 0,
2538 .scale = 2.0f,
2539 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2540 .zeroPoint = 128
2541 }, { // input6_new
2542 .channelQuant = {},
2543 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2544 .dimensions = {3, 2, 3, 1},
2545 .isIgnored = false,
2546 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2547 .numberOfConsumers = 1,
2548 .scale = 2.0f,
2549 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2550 .zeroPoint = 128
2551 }, { // dummy12
2552 .channelQuant = {},
2553 .data = TestBuffer::createFromVector<uint8_t>({128}),
2554 .dimensions = {1},
2555 .isIgnored = false,
2556 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2557 .numberOfConsumers = 1,
2558 .scale = 2.0f,
2559 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2560 .zeroPoint = 128
2561 }, { // param27
2562 .channelQuant = {},
2563 .data = TestBuffer::createFromVector<int32_t>({0}),
2564 .dimensions = {},
2565 .isIgnored = false,
2566 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2567 .numberOfConsumers = 1,
2568 .scale = 0.0f,
2569 .type = TestOperandType::INT32,
2570 .zeroPoint = 0
2571 }},
2572 .operations = {{
2573 .inputs = {4, 5, 6},
2574 .outputs = {0},
2575 .type = TestOperationType::ADD
2576 }, {
2577 .inputs = {0, 1, 2},
2578 .outputs = {3},
2579 .type = TestOperationType::SLICE
2580 }},
2581 .outputIndexes = {3}
2582 },
2583 .minSupportedVersion = TestHalVersion::V1_2,
2584 .referenced = {}
2585 };
2586 return model;
2587 }
2588
2589 const auto dummy_test_model_all_inputs_as_internal_5 = TestModelManager::get().add("slice_all_inputs_as_internal_5", get_test_model_all_inputs_as_internal_5());
2590
2591 } // namespace generated_tests::slice
2592
2593 namespace generated_tests::slice {
2594
get_test_model_relaxed_7()2595 const TestModel& get_test_model_relaxed_7() {
2596 static TestModel model = {
2597 .expectFailure = false,
2598 .expectedMultinomialDistributionTolerance = 0,
2599 .isRelaxed = true,
2600 .main = {
2601 .inputIndexes = {0, 1, 2},
2602 .operands = {{ // input6
2603 .channelQuant = {},
2604 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2605 .dimensions = {3, 2, 3, 1},
2606 .isIgnored = false,
2607 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2608 .numberOfConsumers = 1,
2609 .scale = 2.0f,
2610 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2611 .zeroPoint = 128
2612 }, { // begin6
2613 .channelQuant = {},
2614 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2615 .dimensions = {4},
2616 .isIgnored = false,
2617 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2618 .numberOfConsumers = 1,
2619 .scale = 0.0f,
2620 .type = TestOperandType::TENSOR_INT32,
2621 .zeroPoint = 0
2622 }, { // size6
2623 .channelQuant = {},
2624 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2625 .dimensions = {4},
2626 .isIgnored = false,
2627 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2628 .numberOfConsumers = 1,
2629 .scale = 0.0f,
2630 .type = TestOperandType::TENSOR_INT32,
2631 .zeroPoint = 0
2632 }, { // output6
2633 .channelQuant = {},
2634 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2635 .dimensions = {2, 1, 3, 1},
2636 .isIgnored = false,
2637 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2638 .numberOfConsumers = 0,
2639 .scale = 2.0f,
2640 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2641 .zeroPoint = 128
2642 }},
2643 .operations = {{
2644 .inputs = {0, 1, 2},
2645 .outputs = {3},
2646 .type = TestOperationType::SLICE
2647 }},
2648 .outputIndexes = {3}
2649 },
2650 .minSupportedVersion = TestHalVersion::UNKNOWN,
2651 .referenced = {}
2652 };
2653 return model;
2654 }
2655
2656 const auto dummy_test_model_relaxed_7 = TestModelManager::get().add("slice_relaxed_7", get_test_model_relaxed_7());
2657
2658 } // namespace generated_tests::slice
2659
2660 namespace generated_tests::slice {
2661
get_test_model_relaxed_all_inputs_as_internal_5()2662 const TestModel& get_test_model_relaxed_all_inputs_as_internal_5() {
2663 static TestModel model = {
2664 .expectFailure = false,
2665 .expectedMultinomialDistributionTolerance = 0,
2666 .isRelaxed = true,
2667 .main = {
2668 .inputIndexes = {1, 2, 4},
2669 .operands = {{ // input6
2670 .channelQuant = {},
2671 .data = TestBuffer::createFromVector<uint8_t>({}),
2672 .dimensions = {3, 2, 3, 1},
2673 .isIgnored = false,
2674 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2675 .numberOfConsumers = 1,
2676 .scale = 2.0f,
2677 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2678 .zeroPoint = 128
2679 }, { // begin6
2680 .channelQuant = {},
2681 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2682 .dimensions = {4},
2683 .isIgnored = false,
2684 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2685 .numberOfConsumers = 1,
2686 .scale = 0.0f,
2687 .type = TestOperandType::TENSOR_INT32,
2688 .zeroPoint = 0
2689 }, { // size6
2690 .channelQuant = {},
2691 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2692 .dimensions = {4},
2693 .isIgnored = false,
2694 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2695 .numberOfConsumers = 1,
2696 .scale = 0.0f,
2697 .type = TestOperandType::TENSOR_INT32,
2698 .zeroPoint = 0
2699 }, { // output6
2700 .channelQuant = {},
2701 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2702 .dimensions = {2, 1, 3, 1},
2703 .isIgnored = false,
2704 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2705 .numberOfConsumers = 0,
2706 .scale = 2.0f,
2707 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2708 .zeroPoint = 128
2709 }, { // input6_new
2710 .channelQuant = {},
2711 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2712 .dimensions = {3, 2, 3, 1},
2713 .isIgnored = false,
2714 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2715 .numberOfConsumers = 1,
2716 .scale = 2.0f,
2717 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2718 .zeroPoint = 128
2719 }, { // dummy13
2720 .channelQuant = {},
2721 .data = TestBuffer::createFromVector<uint8_t>({128}),
2722 .dimensions = {1},
2723 .isIgnored = false,
2724 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2725 .numberOfConsumers = 1,
2726 .scale = 2.0f,
2727 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2728 .zeroPoint = 128
2729 }, { // param28
2730 .channelQuant = {},
2731 .data = TestBuffer::createFromVector<int32_t>({0}),
2732 .dimensions = {},
2733 .isIgnored = false,
2734 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2735 .numberOfConsumers = 1,
2736 .scale = 0.0f,
2737 .type = TestOperandType::INT32,
2738 .zeroPoint = 0
2739 }},
2740 .operations = {{
2741 .inputs = {4, 5, 6},
2742 .outputs = {0},
2743 .type = TestOperationType::ADD
2744 }, {
2745 .inputs = {0, 1, 2},
2746 .outputs = {3},
2747 .type = TestOperationType::SLICE
2748 }},
2749 .outputIndexes = {3}
2750 },
2751 .minSupportedVersion = TestHalVersion::UNKNOWN,
2752 .referenced = {}
2753 };
2754 return model;
2755 }
2756
2757 const auto dummy_test_model_relaxed_all_inputs_as_internal_5 = TestModelManager::get().add("slice_relaxed_all_inputs_as_internal_5", get_test_model_relaxed_all_inputs_as_internal_5());
2758
2759 } // namespace generated_tests::slice
2760
2761 namespace generated_tests::slice {
2762
get_test_model_float16_7()2763 const TestModel& get_test_model_float16_7() {
2764 static TestModel model = {
2765 .expectFailure = false,
2766 .expectedMultinomialDistributionTolerance = 0,
2767 .isRelaxed = false,
2768 .main = {
2769 .inputIndexes = {0, 1, 2},
2770 .operands = {{ // input6
2771 .channelQuant = {},
2772 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2773 .dimensions = {3, 2, 3, 1},
2774 .isIgnored = false,
2775 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2776 .numberOfConsumers = 1,
2777 .scale = 2.0f,
2778 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2779 .zeroPoint = 128
2780 }, { // begin6
2781 .channelQuant = {},
2782 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2783 .dimensions = {4},
2784 .isIgnored = false,
2785 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2786 .numberOfConsumers = 1,
2787 .scale = 0.0f,
2788 .type = TestOperandType::TENSOR_INT32,
2789 .zeroPoint = 0
2790 }, { // size6
2791 .channelQuant = {},
2792 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2793 .dimensions = {4},
2794 .isIgnored = false,
2795 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2796 .numberOfConsumers = 1,
2797 .scale = 0.0f,
2798 .type = TestOperandType::TENSOR_INT32,
2799 .zeroPoint = 0
2800 }, { // output6
2801 .channelQuant = {},
2802 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2803 .dimensions = {2, 1, 3, 1},
2804 .isIgnored = false,
2805 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2806 .numberOfConsumers = 0,
2807 .scale = 2.0f,
2808 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2809 .zeroPoint = 128
2810 }},
2811 .operations = {{
2812 .inputs = {0, 1, 2},
2813 .outputs = {3},
2814 .type = TestOperationType::SLICE
2815 }},
2816 .outputIndexes = {3}
2817 },
2818 .minSupportedVersion = TestHalVersion::V1_2,
2819 .referenced = {}
2820 };
2821 return model;
2822 }
2823
2824 const auto dummy_test_model_float16_7 = TestModelManager::get().add("slice_float16_7", get_test_model_float16_7());
2825
2826 } // namespace generated_tests::slice
2827
2828 namespace generated_tests::slice {
2829
get_test_model_float16_all_inputs_as_internal_5()2830 const TestModel& get_test_model_float16_all_inputs_as_internal_5() {
2831 static TestModel model = {
2832 .expectFailure = false,
2833 .expectedMultinomialDistributionTolerance = 0,
2834 .isRelaxed = false,
2835 .main = {
2836 .inputIndexes = {1, 2, 4},
2837 .operands = {{ // input6
2838 .channelQuant = {},
2839 .data = TestBuffer::createFromVector<uint8_t>({}),
2840 .dimensions = {3, 2, 3, 1},
2841 .isIgnored = false,
2842 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2843 .numberOfConsumers = 1,
2844 .scale = 2.0f,
2845 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2846 .zeroPoint = 128
2847 }, { // begin6
2848 .channelQuant = {},
2849 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2850 .dimensions = {4},
2851 .isIgnored = false,
2852 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2853 .numberOfConsumers = 1,
2854 .scale = 0.0f,
2855 .type = TestOperandType::TENSOR_INT32,
2856 .zeroPoint = 0
2857 }, { // size6
2858 .channelQuant = {},
2859 .data = TestBuffer::createFromVector<int32_t>({2, 1, 3, 1}),
2860 .dimensions = {4},
2861 .isIgnored = false,
2862 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2863 .numberOfConsumers = 1,
2864 .scale = 0.0f,
2865 .type = TestOperandType::TENSOR_INT32,
2866 .zeroPoint = 0
2867 }, { // output6
2868 .channelQuant = {},
2869 .data = TestBuffer::createFromVector<uint8_t>({3, 3, 3, 5, 5, 5}),
2870 .dimensions = {2, 1, 3, 1},
2871 .isIgnored = false,
2872 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2873 .numberOfConsumers = 0,
2874 .scale = 2.0f,
2875 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2876 .zeroPoint = 128
2877 }, { // input6_new
2878 .channelQuant = {},
2879 .data = TestBuffer::createFromVector<uint8_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2880 .dimensions = {3, 2, 3, 1},
2881 .isIgnored = false,
2882 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2883 .numberOfConsumers = 1,
2884 .scale = 2.0f,
2885 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2886 .zeroPoint = 128
2887 }, { // dummy14
2888 .channelQuant = {},
2889 .data = TestBuffer::createFromVector<uint8_t>({128}),
2890 .dimensions = {1},
2891 .isIgnored = false,
2892 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2893 .numberOfConsumers = 1,
2894 .scale = 2.0f,
2895 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
2896 .zeroPoint = 128
2897 }, { // param29
2898 .channelQuant = {},
2899 .data = TestBuffer::createFromVector<int32_t>({0}),
2900 .dimensions = {},
2901 .isIgnored = false,
2902 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2903 .numberOfConsumers = 1,
2904 .scale = 0.0f,
2905 .type = TestOperandType::INT32,
2906 .zeroPoint = 0
2907 }},
2908 .operations = {{
2909 .inputs = {4, 5, 6},
2910 .outputs = {0},
2911 .type = TestOperationType::ADD
2912 }, {
2913 .inputs = {0, 1, 2},
2914 .outputs = {3},
2915 .type = TestOperationType::SLICE
2916 }},
2917 .outputIndexes = {3}
2918 },
2919 .minSupportedVersion = TestHalVersion::V1_2,
2920 .referenced = {}
2921 };
2922 return model;
2923 }
2924
2925 const auto dummy_test_model_float16_all_inputs_as_internal_5 = TestModelManager::get().add("slice_float16_all_inputs_as_internal_5", get_test_model_float16_all_inputs_as_internal_5());
2926
2927 } // namespace generated_tests::slice
2928
2929 namespace generated_tests::slice {
2930
get_test_model_8()2931 const TestModel& get_test_model_8() {
2932 static TestModel model = {
2933 .expectFailure = false,
2934 .expectedMultinomialDistributionTolerance = 0,
2935 .isRelaxed = false,
2936 .main = {
2937 .inputIndexes = {0, 1, 2},
2938 .operands = {{ // input7
2939 .channelQuant = {},
2940 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
2941 .dimensions = {3, 2, 3, 1},
2942 .isIgnored = false,
2943 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2944 .numberOfConsumers = 1,
2945 .scale = 0.0f,
2946 .type = TestOperandType::TENSOR_INT32,
2947 .zeroPoint = 0
2948 }, { // begin7
2949 .channelQuant = {},
2950 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
2951 .dimensions = {4},
2952 .isIgnored = false,
2953 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2954 .numberOfConsumers = 1,
2955 .scale = 0.0f,
2956 .type = TestOperandType::TENSOR_INT32,
2957 .zeroPoint = 0
2958 }, { // size7
2959 .channelQuant = {},
2960 .data = TestBuffer::createFromVector<int32_t>({2, 1, -1, 1}),
2961 .dimensions = {4},
2962 .isIgnored = false,
2963 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2964 .numberOfConsumers = 1,
2965 .scale = 0.0f,
2966 .type = TestOperandType::TENSOR_INT32,
2967 .zeroPoint = 0
2968 }, { // output7
2969 .channelQuant = {},
2970 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
2971 .dimensions = {2, 1, 3, 1},
2972 .isIgnored = false,
2973 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2974 .numberOfConsumers = 0,
2975 .scale = 0.0f,
2976 .type = TestOperandType::TENSOR_INT32,
2977 .zeroPoint = 0
2978 }},
2979 .operations = {{
2980 .inputs = {0, 1, 2},
2981 .outputs = {3},
2982 .type = TestOperationType::SLICE
2983 }},
2984 .outputIndexes = {3}
2985 },
2986 .minSupportedVersion = TestHalVersion::V1_2,
2987 .referenced = {}
2988 };
2989 return model;
2990 }
2991
2992 const auto dummy_test_model_8 = TestModelManager::get().add("slice_8", get_test_model_8());
2993
2994 } // namespace generated_tests::slice
2995
2996 namespace generated_tests::slice {
2997
get_test_model_relaxed_8()2998 const TestModel& get_test_model_relaxed_8() {
2999 static TestModel model = {
3000 .expectFailure = false,
3001 .expectedMultinomialDistributionTolerance = 0,
3002 .isRelaxed = true,
3003 .main = {
3004 .inputIndexes = {0, 1, 2},
3005 .operands = {{ // input7
3006 .channelQuant = {},
3007 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
3008 .dimensions = {3, 2, 3, 1},
3009 .isIgnored = false,
3010 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3011 .numberOfConsumers = 1,
3012 .scale = 0.0f,
3013 .type = TestOperandType::TENSOR_INT32,
3014 .zeroPoint = 0
3015 }, { // begin7
3016 .channelQuant = {},
3017 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
3018 .dimensions = {4},
3019 .isIgnored = false,
3020 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3021 .numberOfConsumers = 1,
3022 .scale = 0.0f,
3023 .type = TestOperandType::TENSOR_INT32,
3024 .zeroPoint = 0
3025 }, { // size7
3026 .channelQuant = {},
3027 .data = TestBuffer::createFromVector<int32_t>({2, 1, -1, 1}),
3028 .dimensions = {4},
3029 .isIgnored = false,
3030 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3031 .numberOfConsumers = 1,
3032 .scale = 0.0f,
3033 .type = TestOperandType::TENSOR_INT32,
3034 .zeroPoint = 0
3035 }, { // output7
3036 .channelQuant = {},
3037 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
3038 .dimensions = {2, 1, 3, 1},
3039 .isIgnored = false,
3040 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3041 .numberOfConsumers = 0,
3042 .scale = 0.0f,
3043 .type = TestOperandType::TENSOR_INT32,
3044 .zeroPoint = 0
3045 }},
3046 .operations = {{
3047 .inputs = {0, 1, 2},
3048 .outputs = {3},
3049 .type = TestOperationType::SLICE
3050 }},
3051 .outputIndexes = {3}
3052 },
3053 .minSupportedVersion = TestHalVersion::UNKNOWN,
3054 .referenced = {}
3055 };
3056 return model;
3057 }
3058
3059 const auto dummy_test_model_relaxed_8 = TestModelManager::get().add("slice_relaxed_8", get_test_model_relaxed_8());
3060
3061 } // namespace generated_tests::slice
3062
3063 namespace generated_tests::slice {
3064
get_test_model_float16_8()3065 const TestModel& get_test_model_float16_8() {
3066 static TestModel model = {
3067 .expectFailure = false,
3068 .expectedMultinomialDistributionTolerance = 0,
3069 .isRelaxed = false,
3070 .main = {
3071 .inputIndexes = {0, 1, 2},
3072 .operands = {{ // input7
3073 .channelQuant = {},
3074 .data = TestBuffer::createFromVector<int32_t>({1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6}),
3075 .dimensions = {3, 2, 3, 1},
3076 .isIgnored = false,
3077 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3078 .numberOfConsumers = 1,
3079 .scale = 0.0f,
3080 .type = TestOperandType::TENSOR_INT32,
3081 .zeroPoint = 0
3082 }, { // begin7
3083 .channelQuant = {},
3084 .data = TestBuffer::createFromVector<int32_t>({1, 0, 0, 0}),
3085 .dimensions = {4},
3086 .isIgnored = false,
3087 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3088 .numberOfConsumers = 1,
3089 .scale = 0.0f,
3090 .type = TestOperandType::TENSOR_INT32,
3091 .zeroPoint = 0
3092 }, { // size7
3093 .channelQuant = {},
3094 .data = TestBuffer::createFromVector<int32_t>({2, 1, -1, 1}),
3095 .dimensions = {4},
3096 .isIgnored = false,
3097 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3098 .numberOfConsumers = 1,
3099 .scale = 0.0f,
3100 .type = TestOperandType::TENSOR_INT32,
3101 .zeroPoint = 0
3102 }, { // output7
3103 .channelQuant = {},
3104 .data = TestBuffer::createFromVector<int32_t>({3, 3, 3, 5, 5, 5}),
3105 .dimensions = {2, 1, 3, 1},
3106 .isIgnored = false,
3107 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3108 .numberOfConsumers = 0,
3109 .scale = 0.0f,
3110 .type = TestOperandType::TENSOR_INT32,
3111 .zeroPoint = 0
3112 }},
3113 .operations = {{
3114 .inputs = {0, 1, 2},
3115 .outputs = {3},
3116 .type = TestOperationType::SLICE
3117 }},
3118 .outputIndexes = {3}
3119 },
3120 .minSupportedVersion = TestHalVersion::V1_2,
3121 .referenced = {}
3122 };
3123 return model;
3124 }
3125
3126 const auto dummy_test_model_float16_8 = TestModelManager::get().add("slice_float16_8", get_test_model_float16_8());
3127
3128 } // namespace generated_tests::slice
3129
3130 namespace generated_tests::slice {
3131
get_test_model_zero_sized()3132 const TestModel& get_test_model_zero_sized() {
3133 static TestModel model = {
3134 .expectFailure = false,
3135 .expectedMultinomialDistributionTolerance = 0,
3136 .isRelaxed = false,
3137 .main = { // zero_sized
3138 .inputIndexes = {13},
3139 .operands = {{ // scores
3140 .channelQuant = {},
3141 .data = TestBuffer::createFromVector<float>({0.9f, 0.1f}),
3142 .dimensions = {1, 2},
3143 .isIgnored = false,
3144 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3145 .numberOfConsumers = 1,
3146 .scale = 0.0f,
3147 .type = TestOperandType::TENSOR_FLOAT32,
3148 .zeroPoint = 0
3149 }, { // roi
3150 .channelQuant = {},
3151 .data = TestBuffer::createFromVector<float>({1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f}),
3152 .dimensions = {1, 8},
3153 .isIgnored = false,
3154 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3155 .numberOfConsumers = 1,
3156 .scale = 0.0f,
3157 .type = TestOperandType::TENSOR_FLOAT32,
3158 .zeroPoint = 0
3159 }, { // param
3160 .channelQuant = {},
3161 .data = TestBuffer::createFromVector<int32_t>({0}),
3162 .dimensions = {1},
3163 .isIgnored = false,
3164 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3165 .numberOfConsumers = 1,
3166 .scale = 0.0f,
3167 .type = TestOperandType::TENSOR_INT32,
3168 .zeroPoint = 0
3169 }, { // param1
3170 .channelQuant = {},
3171 .data = TestBuffer::createFromVector<float>({0.3f}),
3172 .dimensions = {},
3173 .isIgnored = false,
3174 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3175 .numberOfConsumers = 1,
3176 .scale = 0.0f,
3177 .type = TestOperandType::FLOAT32,
3178 .zeroPoint = 0
3179 }, { // param2
3180 .channelQuant = {},
3181 .data = TestBuffer::createFromVector<int32_t>({-1}),
3182 .dimensions = {},
3183 .isIgnored = false,
3184 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3185 .numberOfConsumers = 1,
3186 .scale = 0.0f,
3187 .type = TestOperandType::INT32,
3188 .zeroPoint = 0
3189 }, { // param3
3190 .channelQuant = {},
3191 .data = TestBuffer::createFromVector<int32_t>({0}),
3192 .dimensions = {},
3193 .isIgnored = false,
3194 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3195 .numberOfConsumers = 1,
3196 .scale = 0.0f,
3197 .type = TestOperandType::INT32,
3198 .zeroPoint = 0
3199 }, { // param4
3200 .channelQuant = {},
3201 .data = TestBuffer::createFromVector<float>({0.4f}),
3202 .dimensions = {},
3203 .isIgnored = false,
3204 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3205 .numberOfConsumers = 1,
3206 .scale = 0.0f,
3207 .type = TestOperandType::FLOAT32,
3208 .zeroPoint = 0
3209 }, { // param5
3210 .channelQuant = {},
3211 .data = TestBuffer::createFromVector<float>({1.0f}),
3212 .dimensions = {},
3213 .isIgnored = false,
3214 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3215 .numberOfConsumers = 1,
3216 .scale = 0.0f,
3217 .type = TestOperandType::FLOAT32,
3218 .zeroPoint = 0
3219 }, { // param6
3220 .channelQuant = {},
3221 .data = TestBuffer::createFromVector<float>({0.3f}),
3222 .dimensions = {},
3223 .isIgnored = false,
3224 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3225 .numberOfConsumers = 1,
3226 .scale = 0.0f,
3227 .type = TestOperandType::FLOAT32,
3228 .zeroPoint = 0
3229 }, { // scoresOut
3230 .channelQuant = {},
3231 .data = TestBuffer::createFromVector<float>({}),
3232 .dimensions = {0},
3233 .isIgnored = false,
3234 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3235 .numberOfConsumers = 0,
3236 .scale = 0.0f,
3237 .type = TestOperandType::TENSOR_FLOAT32,
3238 .zeroPoint = 0
3239 }, { // roiOut
3240 .channelQuant = {},
3241 .data = TestBuffer::createFromVector<float>({}),
3242 .dimensions = {0, 4},
3243 .isIgnored = false,
3244 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3245 .numberOfConsumers = 1,
3246 .scale = 0.0f,
3247 .type = TestOperandType::TENSOR_FLOAT32,
3248 .zeroPoint = 0
3249 }, { // classesOut
3250 .channelQuant = {},
3251 .data = TestBuffer::createFromVector<int32_t>({}),
3252 .dimensions = {0},
3253 .isIgnored = false,
3254 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3255 .numberOfConsumers = 0,
3256 .scale = 0.0f,
3257 .type = TestOperandType::TENSOR_INT32,
3258 .zeroPoint = 0
3259 }, { // batchSplitOut
3260 .channelQuant = {},
3261 .data = TestBuffer::createFromVector<int32_t>({}),
3262 .dimensions = {0},
3263 .isIgnored = false,
3264 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3265 .numberOfConsumers = 1,
3266 .scale = 0.0f,
3267 .type = TestOperandType::TENSOR_INT32,
3268 .zeroPoint = 0
3269 }, { // in
3270 .channelQuant = {},
3271 .data = TestBuffer::createFromVector<float>({1.0f}),
3272 .dimensions = {1, 1, 1, 1},
3273 .isIgnored = false,
3274 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3275 .numberOfConsumers = 1,
3276 .scale = 0.0f,
3277 .type = TestOperandType::TENSOR_FLOAT32,
3278 .zeroPoint = 0
3279 }, { // param7
3280 .channelQuant = {},
3281 .data = TestBuffer::createFromVector<int32_t>({2}),
3282 .dimensions = {},
3283 .isIgnored = false,
3284 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3285 .numberOfConsumers = 1,
3286 .scale = 0.0f,
3287 .type = TestOperandType::INT32,
3288 .zeroPoint = 0
3289 }, { // param8
3290 .channelQuant = {},
3291 .data = TestBuffer::createFromVector<int32_t>({2}),
3292 .dimensions = {},
3293 .isIgnored = false,
3294 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3295 .numberOfConsumers = 1,
3296 .scale = 0.0f,
3297 .type = TestOperandType::INT32,
3298 .zeroPoint = 0
3299 }, { // param9
3300 .channelQuant = {},
3301 .data = TestBuffer::createFromVector<float>({2.0f}),
3302 .dimensions = {},
3303 .isIgnored = false,
3304 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3305 .numberOfConsumers = 1,
3306 .scale = 0.0f,
3307 .type = TestOperandType::FLOAT32,
3308 .zeroPoint = 0
3309 }, { // param10
3310 .channelQuant = {},
3311 .data = TestBuffer::createFromVector<float>({2.0f}),
3312 .dimensions = {},
3313 .isIgnored = false,
3314 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3315 .numberOfConsumers = 1,
3316 .scale = 0.0f,
3317 .type = TestOperandType::FLOAT32,
3318 .zeroPoint = 0
3319 }, { // param11
3320 .channelQuant = {},
3321 .data = TestBuffer::createFromVector<int32_t>({4}),
3322 .dimensions = {},
3323 .isIgnored = false,
3324 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3325 .numberOfConsumers = 1,
3326 .scale = 0.0f,
3327 .type = TestOperandType::INT32,
3328 .zeroPoint = 0
3329 }, { // param12
3330 .channelQuant = {},
3331 .data = TestBuffer::createFromVector<int32_t>({4}),
3332 .dimensions = {},
3333 .isIgnored = false,
3334 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3335 .numberOfConsumers = 1,
3336 .scale = 0.0f,
3337 .type = TestOperandType::INT32,
3338 .zeroPoint = 0
3339 }, { // layout
3340 .channelQuant = {},
3341 .data = TestBuffer::createFromVector<bool8>({false}),
3342 .dimensions = {},
3343 .isIgnored = false,
3344 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3345 .numberOfConsumers = 1,
3346 .scale = 0.0f,
3347 .type = TestOperandType::BOOL,
3348 .zeroPoint = 0
3349 }, { // featureMap
3350 .channelQuant = {},
3351 .data = TestBuffer::createFromVector<float>({}),
3352 .dimensions = {0, 2, 2, 1},
3353 .isIgnored = false,
3354 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3355 .numberOfConsumers = 1,
3356 .scale = 0.0f,
3357 .type = TestOperandType::TENSOR_FLOAT32,
3358 .zeroPoint = 0
3359 }, { // param13
3360 .channelQuant = {},
3361 .data = TestBuffer::createFromVector<int32_t>({0, 1, 1, 0}),
3362 .dimensions = {4},
3363 .isIgnored = false,
3364 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3365 .numberOfConsumers = 1,
3366 .scale = 0.0f,
3367 .type = TestOperandType::TENSOR_INT32,
3368 .zeroPoint = 0
3369 }, { // param14
3370 .channelQuant = {},
3371 .data = TestBuffer::createFromVector<int32_t>({-1, 1, -1, 1}),
3372 .dimensions = {4},
3373 .isIgnored = false,
3374 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3375 .numberOfConsumers = 1,
3376 .scale = 0.0f,
3377 .type = TestOperandType::TENSOR_INT32,
3378 .zeroPoint = 0
3379 }, { // out
3380 .channelQuant = {},
3381 .data = TestBuffer::createFromVector<float>({}),
3382 .dimensions = {0, 1, 1, 1},
3383 .isIgnored = false,
3384 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3385 .numberOfConsumers = 0,
3386 .scale = 0.0f,
3387 .type = TestOperandType::TENSOR_FLOAT32,
3388 .zeroPoint = 0
3389 }},
3390 .operations = {{
3391 .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8},
3392 .outputs = {9, 10, 11, 12},
3393 .type = TestOperationType::BOX_WITH_NMS_LIMIT
3394 }, {
3395 .inputs = {13, 10, 12, 14, 15, 16, 17, 18, 19, 20},
3396 .outputs = {21},
3397 .type = TestOperationType::ROI_ALIGN
3398 }, {
3399 .inputs = {21, 22, 23},
3400 .outputs = {24},
3401 .type = TestOperationType::SLICE
3402 }},
3403 .outputIndexes = {9, 11, 24}
3404 },
3405 .minSupportedVersion = TestHalVersion::V1_2,
3406 .referenced = {}
3407 };
3408 return model;
3409 }
3410
3411 const auto dummy_test_model_zero_sized = TestModelManager::get().add("slice_zero_sized", get_test_model_zero_sized());
3412
3413 } // namespace generated_tests::slice
3414
3415 namespace generated_tests::slice {
3416
get_test_model_zero_sized_relaxed()3417 const TestModel& get_test_model_zero_sized_relaxed() {
3418 static TestModel model = {
3419 .expectFailure = false,
3420 .expectedMultinomialDistributionTolerance = 0,
3421 .isRelaxed = true,
3422 .main = { // zero_sized
3423 .inputIndexes = {13},
3424 .operands = {{ // scores
3425 .channelQuant = {},
3426 .data = TestBuffer::createFromVector<float>({0.9f, 0.1f}),
3427 .dimensions = {1, 2},
3428 .isIgnored = false,
3429 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3430 .numberOfConsumers = 1,
3431 .scale = 0.0f,
3432 .type = TestOperandType::TENSOR_FLOAT32,
3433 .zeroPoint = 0
3434 }, { // roi
3435 .channelQuant = {},
3436 .data = TestBuffer::createFromVector<float>({1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f}),
3437 .dimensions = {1, 8},
3438 .isIgnored = false,
3439 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3440 .numberOfConsumers = 1,
3441 .scale = 0.0f,
3442 .type = TestOperandType::TENSOR_FLOAT32,
3443 .zeroPoint = 0
3444 }, { // param
3445 .channelQuant = {},
3446 .data = TestBuffer::createFromVector<int32_t>({0}),
3447 .dimensions = {1},
3448 .isIgnored = false,
3449 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3450 .numberOfConsumers = 1,
3451 .scale = 0.0f,
3452 .type = TestOperandType::TENSOR_INT32,
3453 .zeroPoint = 0
3454 }, { // param1
3455 .channelQuant = {},
3456 .data = TestBuffer::createFromVector<float>({0.3f}),
3457 .dimensions = {},
3458 .isIgnored = false,
3459 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3460 .numberOfConsumers = 1,
3461 .scale = 0.0f,
3462 .type = TestOperandType::FLOAT32,
3463 .zeroPoint = 0
3464 }, { // param2
3465 .channelQuant = {},
3466 .data = TestBuffer::createFromVector<int32_t>({-1}),
3467 .dimensions = {},
3468 .isIgnored = false,
3469 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3470 .numberOfConsumers = 1,
3471 .scale = 0.0f,
3472 .type = TestOperandType::INT32,
3473 .zeroPoint = 0
3474 }, { // param3
3475 .channelQuant = {},
3476 .data = TestBuffer::createFromVector<int32_t>({0}),
3477 .dimensions = {},
3478 .isIgnored = false,
3479 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3480 .numberOfConsumers = 1,
3481 .scale = 0.0f,
3482 .type = TestOperandType::INT32,
3483 .zeroPoint = 0
3484 }, { // param4
3485 .channelQuant = {},
3486 .data = TestBuffer::createFromVector<float>({0.4f}),
3487 .dimensions = {},
3488 .isIgnored = false,
3489 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3490 .numberOfConsumers = 1,
3491 .scale = 0.0f,
3492 .type = TestOperandType::FLOAT32,
3493 .zeroPoint = 0
3494 }, { // param5
3495 .channelQuant = {},
3496 .data = TestBuffer::createFromVector<float>({1.0f}),
3497 .dimensions = {},
3498 .isIgnored = false,
3499 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3500 .numberOfConsumers = 1,
3501 .scale = 0.0f,
3502 .type = TestOperandType::FLOAT32,
3503 .zeroPoint = 0
3504 }, { // param6
3505 .channelQuant = {},
3506 .data = TestBuffer::createFromVector<float>({0.3f}),
3507 .dimensions = {},
3508 .isIgnored = false,
3509 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3510 .numberOfConsumers = 1,
3511 .scale = 0.0f,
3512 .type = TestOperandType::FLOAT32,
3513 .zeroPoint = 0
3514 }, { // scoresOut
3515 .channelQuant = {},
3516 .data = TestBuffer::createFromVector<float>({}),
3517 .dimensions = {0},
3518 .isIgnored = false,
3519 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3520 .numberOfConsumers = 0,
3521 .scale = 0.0f,
3522 .type = TestOperandType::TENSOR_FLOAT32,
3523 .zeroPoint = 0
3524 }, { // roiOut
3525 .channelQuant = {},
3526 .data = TestBuffer::createFromVector<float>({}),
3527 .dimensions = {0, 4},
3528 .isIgnored = false,
3529 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3530 .numberOfConsumers = 1,
3531 .scale = 0.0f,
3532 .type = TestOperandType::TENSOR_FLOAT32,
3533 .zeroPoint = 0
3534 }, { // classesOut
3535 .channelQuant = {},
3536 .data = TestBuffer::createFromVector<int32_t>({}),
3537 .dimensions = {0},
3538 .isIgnored = false,
3539 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3540 .numberOfConsumers = 0,
3541 .scale = 0.0f,
3542 .type = TestOperandType::TENSOR_INT32,
3543 .zeroPoint = 0
3544 }, { // batchSplitOut
3545 .channelQuant = {},
3546 .data = TestBuffer::createFromVector<int32_t>({}),
3547 .dimensions = {0},
3548 .isIgnored = false,
3549 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3550 .numberOfConsumers = 1,
3551 .scale = 0.0f,
3552 .type = TestOperandType::TENSOR_INT32,
3553 .zeroPoint = 0
3554 }, { // in
3555 .channelQuant = {},
3556 .data = TestBuffer::createFromVector<float>({1.0f}),
3557 .dimensions = {1, 1, 1, 1},
3558 .isIgnored = false,
3559 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3560 .numberOfConsumers = 1,
3561 .scale = 0.0f,
3562 .type = TestOperandType::TENSOR_FLOAT32,
3563 .zeroPoint = 0
3564 }, { // param7
3565 .channelQuant = {},
3566 .data = TestBuffer::createFromVector<int32_t>({2}),
3567 .dimensions = {},
3568 .isIgnored = false,
3569 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3570 .numberOfConsumers = 1,
3571 .scale = 0.0f,
3572 .type = TestOperandType::INT32,
3573 .zeroPoint = 0
3574 }, { // param8
3575 .channelQuant = {},
3576 .data = TestBuffer::createFromVector<int32_t>({2}),
3577 .dimensions = {},
3578 .isIgnored = false,
3579 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3580 .numberOfConsumers = 1,
3581 .scale = 0.0f,
3582 .type = TestOperandType::INT32,
3583 .zeroPoint = 0
3584 }, { // param9
3585 .channelQuant = {},
3586 .data = TestBuffer::createFromVector<float>({2.0f}),
3587 .dimensions = {},
3588 .isIgnored = false,
3589 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3590 .numberOfConsumers = 1,
3591 .scale = 0.0f,
3592 .type = TestOperandType::FLOAT32,
3593 .zeroPoint = 0
3594 }, { // param10
3595 .channelQuant = {},
3596 .data = TestBuffer::createFromVector<float>({2.0f}),
3597 .dimensions = {},
3598 .isIgnored = false,
3599 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3600 .numberOfConsumers = 1,
3601 .scale = 0.0f,
3602 .type = TestOperandType::FLOAT32,
3603 .zeroPoint = 0
3604 }, { // param11
3605 .channelQuant = {},
3606 .data = TestBuffer::createFromVector<int32_t>({4}),
3607 .dimensions = {},
3608 .isIgnored = false,
3609 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3610 .numberOfConsumers = 1,
3611 .scale = 0.0f,
3612 .type = TestOperandType::INT32,
3613 .zeroPoint = 0
3614 }, { // param12
3615 .channelQuant = {},
3616 .data = TestBuffer::createFromVector<int32_t>({4}),
3617 .dimensions = {},
3618 .isIgnored = false,
3619 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3620 .numberOfConsumers = 1,
3621 .scale = 0.0f,
3622 .type = TestOperandType::INT32,
3623 .zeroPoint = 0
3624 }, { // layout
3625 .channelQuant = {},
3626 .data = TestBuffer::createFromVector<bool8>({false}),
3627 .dimensions = {},
3628 .isIgnored = false,
3629 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3630 .numberOfConsumers = 1,
3631 .scale = 0.0f,
3632 .type = TestOperandType::BOOL,
3633 .zeroPoint = 0
3634 }, { // featureMap
3635 .channelQuant = {},
3636 .data = TestBuffer::createFromVector<float>({}),
3637 .dimensions = {0, 2, 2, 1},
3638 .isIgnored = false,
3639 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3640 .numberOfConsumers = 1,
3641 .scale = 0.0f,
3642 .type = TestOperandType::TENSOR_FLOAT32,
3643 .zeroPoint = 0
3644 }, { // param13
3645 .channelQuant = {},
3646 .data = TestBuffer::createFromVector<int32_t>({0, 1, 1, 0}),
3647 .dimensions = {4},
3648 .isIgnored = false,
3649 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3650 .numberOfConsumers = 1,
3651 .scale = 0.0f,
3652 .type = TestOperandType::TENSOR_INT32,
3653 .zeroPoint = 0
3654 }, { // param14
3655 .channelQuant = {},
3656 .data = TestBuffer::createFromVector<int32_t>({-1, 1, -1, 1}),
3657 .dimensions = {4},
3658 .isIgnored = false,
3659 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3660 .numberOfConsumers = 1,
3661 .scale = 0.0f,
3662 .type = TestOperandType::TENSOR_INT32,
3663 .zeroPoint = 0
3664 }, { // out
3665 .channelQuant = {},
3666 .data = TestBuffer::createFromVector<float>({}),
3667 .dimensions = {0, 1, 1, 1},
3668 .isIgnored = false,
3669 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3670 .numberOfConsumers = 0,
3671 .scale = 0.0f,
3672 .type = TestOperandType::TENSOR_FLOAT32,
3673 .zeroPoint = 0
3674 }},
3675 .operations = {{
3676 .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8},
3677 .outputs = {9, 10, 11, 12},
3678 .type = TestOperationType::BOX_WITH_NMS_LIMIT
3679 }, {
3680 .inputs = {13, 10, 12, 14, 15, 16, 17, 18, 19, 20},
3681 .outputs = {21},
3682 .type = TestOperationType::ROI_ALIGN
3683 }, {
3684 .inputs = {21, 22, 23},
3685 .outputs = {24},
3686 .type = TestOperationType::SLICE
3687 }},
3688 .outputIndexes = {9, 11, 24}
3689 },
3690 .minSupportedVersion = TestHalVersion::UNKNOWN,
3691 .referenced = {}
3692 };
3693 return model;
3694 }
3695
3696 const auto dummy_test_model_zero_sized_relaxed = TestModelManager::get().add("slice_zero_sized_relaxed", get_test_model_zero_sized_relaxed());
3697
3698 } // namespace generated_tests::slice
3699
3700 namespace generated_tests::slice {
3701
get_test_model_zero_sized_quant8()3702 const TestModel& get_test_model_zero_sized_quant8() {
3703 static TestModel model = {
3704 .expectFailure = false,
3705 .expectedMultinomialDistributionTolerance = 0,
3706 .isRelaxed = false,
3707 .main = { // zero_sized
3708 .inputIndexes = {13},
3709 .operands = {{ // scores
3710 .channelQuant = {},
3711 .data = TestBuffer::createFromVector<uint8_t>({137, 129}),
3712 .dimensions = {1, 2},
3713 .isIgnored = false,
3714 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3715 .numberOfConsumers = 1,
3716 .scale = 0.1f,
3717 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3718 .zeroPoint = 128
3719 }, { // roi
3720 .channelQuant = {},
3721 .data = TestBuffer::createFromVector<uint16_t>({8, 8, 80, 80, 0, 0, 80, 80}),
3722 .dimensions = {1, 8},
3723 .isIgnored = false,
3724 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3725 .numberOfConsumers = 1,
3726 .scale = 0.125f,
3727 .type = TestOperandType::TENSOR_QUANT16_ASYMM,
3728 .zeroPoint = 0
3729 }, { // param
3730 .channelQuant = {},
3731 .data = TestBuffer::createFromVector<int32_t>({0}),
3732 .dimensions = {1},
3733 .isIgnored = false,
3734 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3735 .numberOfConsumers = 1,
3736 .scale = 0.0f,
3737 .type = TestOperandType::TENSOR_INT32,
3738 .zeroPoint = 0
3739 }, { // param1
3740 .channelQuant = {},
3741 .data = TestBuffer::createFromVector<float>({0.3f}),
3742 .dimensions = {},
3743 .isIgnored = false,
3744 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3745 .numberOfConsumers = 1,
3746 .scale = 0.0f,
3747 .type = TestOperandType::FLOAT32,
3748 .zeroPoint = 0
3749 }, { // param2
3750 .channelQuant = {},
3751 .data = TestBuffer::createFromVector<int32_t>({-1}),
3752 .dimensions = {},
3753 .isIgnored = false,
3754 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3755 .numberOfConsumers = 1,
3756 .scale = 0.0f,
3757 .type = TestOperandType::INT32,
3758 .zeroPoint = 0
3759 }, { // param3
3760 .channelQuant = {},
3761 .data = TestBuffer::createFromVector<int32_t>({0}),
3762 .dimensions = {},
3763 .isIgnored = false,
3764 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3765 .numberOfConsumers = 1,
3766 .scale = 0.0f,
3767 .type = TestOperandType::INT32,
3768 .zeroPoint = 0
3769 }, { // param4
3770 .channelQuant = {},
3771 .data = TestBuffer::createFromVector<float>({0.4f}),
3772 .dimensions = {},
3773 .isIgnored = false,
3774 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3775 .numberOfConsumers = 1,
3776 .scale = 0.0f,
3777 .type = TestOperandType::FLOAT32,
3778 .zeroPoint = 0
3779 }, { // param5
3780 .channelQuant = {},
3781 .data = TestBuffer::createFromVector<float>({1.0f}),
3782 .dimensions = {},
3783 .isIgnored = false,
3784 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3785 .numberOfConsumers = 1,
3786 .scale = 0.0f,
3787 .type = TestOperandType::FLOAT32,
3788 .zeroPoint = 0
3789 }, { // param6
3790 .channelQuant = {},
3791 .data = TestBuffer::createFromVector<float>({0.3f}),
3792 .dimensions = {},
3793 .isIgnored = false,
3794 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3795 .numberOfConsumers = 1,
3796 .scale = 0.0f,
3797 .type = TestOperandType::FLOAT32,
3798 .zeroPoint = 0
3799 }, { // scoresOut
3800 .channelQuant = {},
3801 .data = TestBuffer::createFromVector<uint8_t>({}),
3802 .dimensions = {0},
3803 .isIgnored = false,
3804 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3805 .numberOfConsumers = 0,
3806 .scale = 0.1f,
3807 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3808 .zeroPoint = 128
3809 }, { // roiOut
3810 .channelQuant = {},
3811 .data = TestBuffer::createFromVector<uint16_t>({}),
3812 .dimensions = {0, 4},
3813 .isIgnored = false,
3814 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3815 .numberOfConsumers = 1,
3816 .scale = 0.125f,
3817 .type = TestOperandType::TENSOR_QUANT16_ASYMM,
3818 .zeroPoint = 0
3819 }, { // classesOut
3820 .channelQuant = {},
3821 .data = TestBuffer::createFromVector<int32_t>({}),
3822 .dimensions = {0},
3823 .isIgnored = false,
3824 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3825 .numberOfConsumers = 0,
3826 .scale = 0.0f,
3827 .type = TestOperandType::TENSOR_INT32,
3828 .zeroPoint = 0
3829 }, { // batchSplitOut
3830 .channelQuant = {},
3831 .data = TestBuffer::createFromVector<int32_t>({}),
3832 .dimensions = {0},
3833 .isIgnored = false,
3834 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3835 .numberOfConsumers = 1,
3836 .scale = 0.0f,
3837 .type = TestOperandType::TENSOR_INT32,
3838 .zeroPoint = 0
3839 }, { // in
3840 .channelQuant = {},
3841 .data = TestBuffer::createFromVector<uint8_t>({138}),
3842 .dimensions = {1, 1, 1, 1},
3843 .isIgnored = false,
3844 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
3845 .numberOfConsumers = 1,
3846 .scale = 0.1f,
3847 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3848 .zeroPoint = 128
3849 }, { // param7
3850 .channelQuant = {},
3851 .data = TestBuffer::createFromVector<int32_t>({2}),
3852 .dimensions = {},
3853 .isIgnored = false,
3854 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3855 .numberOfConsumers = 1,
3856 .scale = 0.0f,
3857 .type = TestOperandType::INT32,
3858 .zeroPoint = 0
3859 }, { // param8
3860 .channelQuant = {},
3861 .data = TestBuffer::createFromVector<int32_t>({2}),
3862 .dimensions = {},
3863 .isIgnored = false,
3864 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3865 .numberOfConsumers = 1,
3866 .scale = 0.0f,
3867 .type = TestOperandType::INT32,
3868 .zeroPoint = 0
3869 }, { // param9
3870 .channelQuant = {},
3871 .data = TestBuffer::createFromVector<float>({2.0f}),
3872 .dimensions = {},
3873 .isIgnored = false,
3874 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3875 .numberOfConsumers = 1,
3876 .scale = 0.0f,
3877 .type = TestOperandType::FLOAT32,
3878 .zeroPoint = 0
3879 }, { // param10
3880 .channelQuant = {},
3881 .data = TestBuffer::createFromVector<float>({2.0f}),
3882 .dimensions = {},
3883 .isIgnored = false,
3884 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3885 .numberOfConsumers = 1,
3886 .scale = 0.0f,
3887 .type = TestOperandType::FLOAT32,
3888 .zeroPoint = 0
3889 }, { // param11
3890 .channelQuant = {},
3891 .data = TestBuffer::createFromVector<int32_t>({4}),
3892 .dimensions = {},
3893 .isIgnored = false,
3894 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3895 .numberOfConsumers = 1,
3896 .scale = 0.0f,
3897 .type = TestOperandType::INT32,
3898 .zeroPoint = 0
3899 }, { // param12
3900 .channelQuant = {},
3901 .data = TestBuffer::createFromVector<int32_t>({4}),
3902 .dimensions = {},
3903 .isIgnored = false,
3904 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3905 .numberOfConsumers = 1,
3906 .scale = 0.0f,
3907 .type = TestOperandType::INT32,
3908 .zeroPoint = 0
3909 }, { // layout
3910 .channelQuant = {},
3911 .data = TestBuffer::createFromVector<bool8>({false}),
3912 .dimensions = {},
3913 .isIgnored = false,
3914 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3915 .numberOfConsumers = 1,
3916 .scale = 0.0f,
3917 .type = TestOperandType::BOOL,
3918 .zeroPoint = 0
3919 }, { // featureMap
3920 .channelQuant = {},
3921 .data = TestBuffer::createFromVector<uint8_t>({}),
3922 .dimensions = {0, 2, 2, 1},
3923 .isIgnored = false,
3924 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
3925 .numberOfConsumers = 1,
3926 .scale = 0.1f,
3927 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3928 .zeroPoint = 128
3929 }, { // param13
3930 .channelQuant = {},
3931 .data = TestBuffer::createFromVector<int32_t>({0, 1, 1, 0}),
3932 .dimensions = {4},
3933 .isIgnored = false,
3934 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3935 .numberOfConsumers = 1,
3936 .scale = 0.0f,
3937 .type = TestOperandType::TENSOR_INT32,
3938 .zeroPoint = 0
3939 }, { // param14
3940 .channelQuant = {},
3941 .data = TestBuffer::createFromVector<int32_t>({-1, 1, -1, 1}),
3942 .dimensions = {4},
3943 .isIgnored = false,
3944 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
3945 .numberOfConsumers = 1,
3946 .scale = 0.0f,
3947 .type = TestOperandType::TENSOR_INT32,
3948 .zeroPoint = 0
3949 }, { // out
3950 .channelQuant = {},
3951 .data = TestBuffer::createFromVector<uint8_t>({}),
3952 .dimensions = {0, 1, 1, 1},
3953 .isIgnored = false,
3954 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
3955 .numberOfConsumers = 0,
3956 .scale = 0.1f,
3957 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
3958 .zeroPoint = 128
3959 }},
3960 .operations = {{
3961 .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8},
3962 .outputs = {9, 10, 11, 12},
3963 .type = TestOperationType::BOX_WITH_NMS_LIMIT
3964 }, {
3965 .inputs = {13, 10, 12, 14, 15, 16, 17, 18, 19, 20},
3966 .outputs = {21},
3967 .type = TestOperationType::ROI_ALIGN
3968 }, {
3969 .inputs = {21, 22, 23},
3970 .outputs = {24},
3971 .type = TestOperationType::SLICE
3972 }},
3973 .outputIndexes = {9, 11, 24}
3974 },
3975 .minSupportedVersion = TestHalVersion::V1_2,
3976 .referenced = {}
3977 };
3978 return model;
3979 }
3980
3981 const auto dummy_test_model_zero_sized_quant8 = TestModelManager::get().add("slice_zero_sized_quant8", get_test_model_zero_sized_quant8());
3982
3983 } // namespace generated_tests::slice
3984
3985 namespace generated_tests::slice {
3986
get_test_model_zero_sized_float16()3987 const TestModel& get_test_model_zero_sized_float16() {
3988 static TestModel model = {
3989 .expectFailure = false,
3990 .expectedMultinomialDistributionTolerance = 0,
3991 .isRelaxed = false,
3992 .main = { // zero_sized
3993 .inputIndexes = {13},
3994 .operands = {{ // scores
3995 .channelQuant = {},
3996 .data = TestBuffer::createFromVector<_Float16>({0.8999999761581421f, 0.10000000149011612f}),
3997 .dimensions = {1, 2},
3998 .isIgnored = false,
3999 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4000 .numberOfConsumers = 1,
4001 .scale = 0.0f,
4002 .type = TestOperandType::TENSOR_FLOAT16,
4003 .zeroPoint = 0
4004 }, { // roi
4005 .channelQuant = {},
4006 .data = TestBuffer::createFromVector<_Float16>({1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f}),
4007 .dimensions = {1, 8},
4008 .isIgnored = false,
4009 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4010 .numberOfConsumers = 1,
4011 .scale = 0.0f,
4012 .type = TestOperandType::TENSOR_FLOAT16,
4013 .zeroPoint = 0
4014 }, { // param
4015 .channelQuant = {},
4016 .data = TestBuffer::createFromVector<int32_t>({0}),
4017 .dimensions = {1},
4018 .isIgnored = false,
4019 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4020 .numberOfConsumers = 1,
4021 .scale = 0.0f,
4022 .type = TestOperandType::TENSOR_INT32,
4023 .zeroPoint = 0
4024 }, { // param1
4025 .channelQuant = {},
4026 .data = TestBuffer::createFromVector<_Float16>({0.30000001192092896f}),
4027 .dimensions = {},
4028 .isIgnored = false,
4029 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4030 .numberOfConsumers = 1,
4031 .scale = 0.0f,
4032 .type = TestOperandType::FLOAT16,
4033 .zeroPoint = 0
4034 }, { // param2
4035 .channelQuant = {},
4036 .data = TestBuffer::createFromVector<int32_t>({-1}),
4037 .dimensions = {},
4038 .isIgnored = false,
4039 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4040 .numberOfConsumers = 1,
4041 .scale = 0.0f,
4042 .type = TestOperandType::INT32,
4043 .zeroPoint = 0
4044 }, { // param3
4045 .channelQuant = {},
4046 .data = TestBuffer::createFromVector<int32_t>({0}),
4047 .dimensions = {},
4048 .isIgnored = false,
4049 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4050 .numberOfConsumers = 1,
4051 .scale = 0.0f,
4052 .type = TestOperandType::INT32,
4053 .zeroPoint = 0
4054 }, { // param4
4055 .channelQuant = {},
4056 .data = TestBuffer::createFromVector<_Float16>({0.4000000059604645f}),
4057 .dimensions = {},
4058 .isIgnored = false,
4059 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4060 .numberOfConsumers = 1,
4061 .scale = 0.0f,
4062 .type = TestOperandType::FLOAT16,
4063 .zeroPoint = 0
4064 }, { // param5
4065 .channelQuant = {},
4066 .data = TestBuffer::createFromVector<_Float16>({1.0f}),
4067 .dimensions = {},
4068 .isIgnored = false,
4069 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4070 .numberOfConsumers = 1,
4071 .scale = 0.0f,
4072 .type = TestOperandType::FLOAT16,
4073 .zeroPoint = 0
4074 }, { // param6
4075 .channelQuant = {},
4076 .data = TestBuffer::createFromVector<_Float16>({0.30000001192092896f}),
4077 .dimensions = {},
4078 .isIgnored = false,
4079 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4080 .numberOfConsumers = 1,
4081 .scale = 0.0f,
4082 .type = TestOperandType::FLOAT16,
4083 .zeroPoint = 0
4084 }, { // scoresOut
4085 .channelQuant = {},
4086 .data = TestBuffer::createFromVector<_Float16>({}),
4087 .dimensions = {0},
4088 .isIgnored = false,
4089 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4090 .numberOfConsumers = 0,
4091 .scale = 0.0f,
4092 .type = TestOperandType::TENSOR_FLOAT16,
4093 .zeroPoint = 0
4094 }, { // roiOut
4095 .channelQuant = {},
4096 .data = TestBuffer::createFromVector<_Float16>({}),
4097 .dimensions = {0, 4},
4098 .isIgnored = false,
4099 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4100 .numberOfConsumers = 1,
4101 .scale = 0.0f,
4102 .type = TestOperandType::TENSOR_FLOAT16,
4103 .zeroPoint = 0
4104 }, { // classesOut
4105 .channelQuant = {},
4106 .data = TestBuffer::createFromVector<int32_t>({}),
4107 .dimensions = {0},
4108 .isIgnored = false,
4109 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4110 .numberOfConsumers = 0,
4111 .scale = 0.0f,
4112 .type = TestOperandType::TENSOR_INT32,
4113 .zeroPoint = 0
4114 }, { // batchSplitOut
4115 .channelQuant = {},
4116 .data = TestBuffer::createFromVector<int32_t>({}),
4117 .dimensions = {0},
4118 .isIgnored = false,
4119 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4120 .numberOfConsumers = 1,
4121 .scale = 0.0f,
4122 .type = TestOperandType::TENSOR_INT32,
4123 .zeroPoint = 0
4124 }, { // in
4125 .channelQuant = {},
4126 .data = TestBuffer::createFromVector<_Float16>({1.0f}),
4127 .dimensions = {1, 1, 1, 1},
4128 .isIgnored = false,
4129 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
4130 .numberOfConsumers = 1,
4131 .scale = 0.0f,
4132 .type = TestOperandType::TENSOR_FLOAT16,
4133 .zeroPoint = 0
4134 }, { // param7
4135 .channelQuant = {},
4136 .data = TestBuffer::createFromVector<int32_t>({2}),
4137 .dimensions = {},
4138 .isIgnored = false,
4139 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4140 .numberOfConsumers = 1,
4141 .scale = 0.0f,
4142 .type = TestOperandType::INT32,
4143 .zeroPoint = 0
4144 }, { // param8
4145 .channelQuant = {},
4146 .data = TestBuffer::createFromVector<int32_t>({2}),
4147 .dimensions = {},
4148 .isIgnored = false,
4149 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4150 .numberOfConsumers = 1,
4151 .scale = 0.0f,
4152 .type = TestOperandType::INT32,
4153 .zeroPoint = 0
4154 }, { // param9
4155 .channelQuant = {},
4156 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
4157 .dimensions = {},
4158 .isIgnored = false,
4159 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4160 .numberOfConsumers = 1,
4161 .scale = 0.0f,
4162 .type = TestOperandType::FLOAT16,
4163 .zeroPoint = 0
4164 }, { // param10
4165 .channelQuant = {},
4166 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
4167 .dimensions = {},
4168 .isIgnored = false,
4169 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4170 .numberOfConsumers = 1,
4171 .scale = 0.0f,
4172 .type = TestOperandType::FLOAT16,
4173 .zeroPoint = 0
4174 }, { // param11
4175 .channelQuant = {},
4176 .data = TestBuffer::createFromVector<int32_t>({4}),
4177 .dimensions = {},
4178 .isIgnored = false,
4179 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4180 .numberOfConsumers = 1,
4181 .scale = 0.0f,
4182 .type = TestOperandType::INT32,
4183 .zeroPoint = 0
4184 }, { // param12
4185 .channelQuant = {},
4186 .data = TestBuffer::createFromVector<int32_t>({4}),
4187 .dimensions = {},
4188 .isIgnored = false,
4189 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4190 .numberOfConsumers = 1,
4191 .scale = 0.0f,
4192 .type = TestOperandType::INT32,
4193 .zeroPoint = 0
4194 }, { // layout
4195 .channelQuant = {},
4196 .data = TestBuffer::createFromVector<bool8>({false}),
4197 .dimensions = {},
4198 .isIgnored = false,
4199 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4200 .numberOfConsumers = 1,
4201 .scale = 0.0f,
4202 .type = TestOperandType::BOOL,
4203 .zeroPoint = 0
4204 }, { // featureMap
4205 .channelQuant = {},
4206 .data = TestBuffer::createFromVector<_Float16>({}),
4207 .dimensions = {0, 2, 2, 1},
4208 .isIgnored = false,
4209 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
4210 .numberOfConsumers = 1,
4211 .scale = 0.0f,
4212 .type = TestOperandType::TENSOR_FLOAT16,
4213 .zeroPoint = 0
4214 }, { // param13
4215 .channelQuant = {},
4216 .data = TestBuffer::createFromVector<int32_t>({0, 1, 1, 0}),
4217 .dimensions = {4},
4218 .isIgnored = false,
4219 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4220 .numberOfConsumers = 1,
4221 .scale = 0.0f,
4222 .type = TestOperandType::TENSOR_INT32,
4223 .zeroPoint = 0
4224 }, { // param14
4225 .channelQuant = {},
4226 .data = TestBuffer::createFromVector<int32_t>({-1, 1, -1, 1}),
4227 .dimensions = {4},
4228 .isIgnored = false,
4229 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
4230 .numberOfConsumers = 1,
4231 .scale = 0.0f,
4232 .type = TestOperandType::TENSOR_INT32,
4233 .zeroPoint = 0
4234 }, { // out
4235 .channelQuant = {},
4236 .data = TestBuffer::createFromVector<_Float16>({}),
4237 .dimensions = {0, 1, 1, 1},
4238 .isIgnored = false,
4239 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
4240 .numberOfConsumers = 0,
4241 .scale = 0.0f,
4242 .type = TestOperandType::TENSOR_FLOAT16,
4243 .zeroPoint = 0
4244 }},
4245 .operations = {{
4246 .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8},
4247 .outputs = {9, 10, 11, 12},
4248 .type = TestOperationType::BOX_WITH_NMS_LIMIT
4249 }, {
4250 .inputs = {13, 10, 12, 14, 15, 16, 17, 18, 19, 20},
4251 .outputs = {21},
4252 .type = TestOperationType::ROI_ALIGN
4253 }, {
4254 .inputs = {21, 22, 23},
4255 .outputs = {24},
4256 .type = TestOperationType::SLICE
4257 }},
4258 .outputIndexes = {9, 11, 24}
4259 },
4260 .minSupportedVersion = TestHalVersion::V1_2,
4261 .referenced = {}
4262 };
4263 return model;
4264 }
4265
4266 const auto dummy_test_model_zero_sized_float16 = TestModelManager::get().add("slice_zero_sized_float16", get_test_model_zero_sized_float16());
4267
4268 } // namespace generated_tests::slice
4269
4270