1 // Generated from pow.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;
6
7 namespace generated_tests::pow {
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},
16 .operands = {{ // base
17 .channelQuant = {},
18 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
19 .dimensions = {2, 1},
20 .isIgnored = false,
21 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
22 .numberOfConsumers = 1,
23 .scale = 0.0f,
24 .type = TestOperandType::TENSOR_FLOAT32,
25 .zeroPoint = 0
26 }, { // exponent
27 .channelQuant = {},
28 .data = TestBuffer::createFromVector<float>({2.0f}),
29 .dimensions = {1},
30 .isIgnored = false,
31 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
32 .numberOfConsumers = 1,
33 .scale = 0.0f,
34 .type = TestOperandType::TENSOR_FLOAT32,
35 .zeroPoint = 0
36 }, { // output
37 .channelQuant = {},
38 .data = TestBuffer::createFromVector<float>({4.0f, 9.0f}),
39 .dimensions = {2, 1},
40 .isIgnored = false,
41 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
42 .numberOfConsumers = 0,
43 .scale = 0.0f,
44 .type = TestOperandType::TENSOR_FLOAT32,
45 .zeroPoint = 0
46 }},
47 .operations = {{
48 .inputs = {0, 1},
49 .outputs = {2},
50 .type = TestOperationType::POW
51 }},
52 .outputIndexes = {2}
53 },
54 .minSupportedVersion = TestHalVersion::V1_2,
55 .referenced = {}
56 };
57 return model;
58 }
59
60 const auto dummy_test_model = TestModelManager::get().add("pow", get_test_model());
61
62 } // namespace generated_tests::pow
63
64 namespace generated_tests::pow {
65
get_test_model_all_inputs_as_internal()66 const TestModel& get_test_model_all_inputs_as_internal() {
67 static TestModel model = {
68 .expectFailure = false,
69 .expectedMultinomialDistributionTolerance = 0,
70 .isRelaxed = false,
71 .main = {
72 .inputIndexes = {3, 6},
73 .operands = {{ // base
74 .channelQuant = {},
75 .data = TestBuffer::createFromVector<float>({}),
76 .dimensions = {2, 1},
77 .isIgnored = false,
78 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
79 .numberOfConsumers = 1,
80 .scale = 0.0f,
81 .type = TestOperandType::TENSOR_FLOAT32,
82 .zeroPoint = 0
83 }, { // exponent
84 .channelQuant = {},
85 .data = TestBuffer::createFromVector<float>({}),
86 .dimensions = {1},
87 .isIgnored = false,
88 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
89 .numberOfConsumers = 1,
90 .scale = 0.0f,
91 .type = TestOperandType::TENSOR_FLOAT32,
92 .zeroPoint = 0
93 }, { // output
94 .channelQuant = {},
95 .data = TestBuffer::createFromVector<float>({4.0f, 9.0f}),
96 .dimensions = {2, 1},
97 .isIgnored = false,
98 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
99 .numberOfConsumers = 0,
100 .scale = 0.0f,
101 .type = TestOperandType::TENSOR_FLOAT32,
102 .zeroPoint = 0
103 }, { // base_new
104 .channelQuant = {},
105 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
106 .dimensions = {2, 1},
107 .isIgnored = false,
108 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
109 .numberOfConsumers = 1,
110 .scale = 0.0f,
111 .type = TestOperandType::TENSOR_FLOAT32,
112 .zeroPoint = 0
113 }, { // dummy
114 .channelQuant = {},
115 .data = TestBuffer::createFromVector<float>({0.0f}),
116 .dimensions = {1},
117 .isIgnored = false,
118 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
119 .numberOfConsumers = 1,
120 .scale = 0.0f,
121 .type = TestOperandType::TENSOR_FLOAT32,
122 .zeroPoint = 0
123 }, { // param
124 .channelQuant = {},
125 .data = TestBuffer::createFromVector<int32_t>({0}),
126 .dimensions = {},
127 .isIgnored = false,
128 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
129 .numberOfConsumers = 1,
130 .scale = 0.0f,
131 .type = TestOperandType::INT32,
132 .zeroPoint = 0
133 }, { // exponent_new
134 .channelQuant = {},
135 .data = TestBuffer::createFromVector<float>({2.0f}),
136 .dimensions = {1},
137 .isIgnored = false,
138 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
139 .numberOfConsumers = 1,
140 .scale = 0.0f,
141 .type = TestOperandType::TENSOR_FLOAT32,
142 .zeroPoint = 0
143 }, { // dummy1
144 .channelQuant = {},
145 .data = TestBuffer::createFromVector<float>({0.0f}),
146 .dimensions = {1},
147 .isIgnored = false,
148 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
149 .numberOfConsumers = 1,
150 .scale = 0.0f,
151 .type = TestOperandType::TENSOR_FLOAT32,
152 .zeroPoint = 0
153 }, { // param1
154 .channelQuant = {},
155 .data = TestBuffer::createFromVector<int32_t>({0}),
156 .dimensions = {},
157 .isIgnored = false,
158 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
159 .numberOfConsumers = 1,
160 .scale = 0.0f,
161 .type = TestOperandType::INT32,
162 .zeroPoint = 0
163 }},
164 .operations = {{
165 .inputs = {3, 4, 5},
166 .outputs = {0},
167 .type = TestOperationType::ADD
168 }, {
169 .inputs = {6, 7, 8},
170 .outputs = {1},
171 .type = TestOperationType::ADD
172 }, {
173 .inputs = {0, 1},
174 .outputs = {2},
175 .type = TestOperationType::POW
176 }},
177 .outputIndexes = {2}
178 },
179 .minSupportedVersion = TestHalVersion::V1_2,
180 .referenced = {}
181 };
182 return model;
183 }
184
185 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("pow_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
186
187 } // namespace generated_tests::pow
188
189 namespace generated_tests::pow {
190
get_test_model_relaxed()191 const TestModel& get_test_model_relaxed() {
192 static TestModel model = {
193 .expectFailure = false,
194 .expectedMultinomialDistributionTolerance = 0,
195 .isRelaxed = true,
196 .main = {
197 .inputIndexes = {0, 1},
198 .operands = {{ // base
199 .channelQuant = {},
200 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
201 .dimensions = {2, 1},
202 .isIgnored = false,
203 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
204 .numberOfConsumers = 1,
205 .scale = 0.0f,
206 .type = TestOperandType::TENSOR_FLOAT32,
207 .zeroPoint = 0
208 }, { // exponent
209 .channelQuant = {},
210 .data = TestBuffer::createFromVector<float>({2.0f}),
211 .dimensions = {1},
212 .isIgnored = false,
213 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
214 .numberOfConsumers = 1,
215 .scale = 0.0f,
216 .type = TestOperandType::TENSOR_FLOAT32,
217 .zeroPoint = 0
218 }, { // output
219 .channelQuant = {},
220 .data = TestBuffer::createFromVector<float>({4.0f, 9.0f}),
221 .dimensions = {2, 1},
222 .isIgnored = false,
223 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
224 .numberOfConsumers = 0,
225 .scale = 0.0f,
226 .type = TestOperandType::TENSOR_FLOAT32,
227 .zeroPoint = 0
228 }},
229 .operations = {{
230 .inputs = {0, 1},
231 .outputs = {2},
232 .type = TestOperationType::POW
233 }},
234 .outputIndexes = {2}
235 },
236 .minSupportedVersion = TestHalVersion::UNKNOWN,
237 .referenced = {}
238 };
239 return model;
240 }
241
242 const auto dummy_test_model_relaxed = TestModelManager::get().add("pow_relaxed", get_test_model_relaxed());
243
244 } // namespace generated_tests::pow
245
246 namespace generated_tests::pow {
247
get_test_model_relaxed_all_inputs_as_internal()248 const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
249 static TestModel model = {
250 .expectFailure = false,
251 .expectedMultinomialDistributionTolerance = 0,
252 .isRelaxed = true,
253 .main = {
254 .inputIndexes = {3, 6},
255 .operands = {{ // base
256 .channelQuant = {},
257 .data = TestBuffer::createFromVector<float>({}),
258 .dimensions = {2, 1},
259 .isIgnored = false,
260 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
261 .numberOfConsumers = 1,
262 .scale = 0.0f,
263 .type = TestOperandType::TENSOR_FLOAT32,
264 .zeroPoint = 0
265 }, { // exponent
266 .channelQuant = {},
267 .data = TestBuffer::createFromVector<float>({}),
268 .dimensions = {1},
269 .isIgnored = false,
270 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
271 .numberOfConsumers = 1,
272 .scale = 0.0f,
273 .type = TestOperandType::TENSOR_FLOAT32,
274 .zeroPoint = 0
275 }, { // output
276 .channelQuant = {},
277 .data = TestBuffer::createFromVector<float>({4.0f, 9.0f}),
278 .dimensions = {2, 1},
279 .isIgnored = false,
280 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
281 .numberOfConsumers = 0,
282 .scale = 0.0f,
283 .type = TestOperandType::TENSOR_FLOAT32,
284 .zeroPoint = 0
285 }, { // base_new
286 .channelQuant = {},
287 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
288 .dimensions = {2, 1},
289 .isIgnored = false,
290 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
291 .numberOfConsumers = 1,
292 .scale = 0.0f,
293 .type = TestOperandType::TENSOR_FLOAT32,
294 .zeroPoint = 0
295 }, { // dummy2
296 .channelQuant = {},
297 .data = TestBuffer::createFromVector<float>({0.0f}),
298 .dimensions = {1},
299 .isIgnored = false,
300 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
301 .numberOfConsumers = 1,
302 .scale = 0.0f,
303 .type = TestOperandType::TENSOR_FLOAT32,
304 .zeroPoint = 0
305 }, { // param2
306 .channelQuant = {},
307 .data = TestBuffer::createFromVector<int32_t>({0}),
308 .dimensions = {},
309 .isIgnored = false,
310 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
311 .numberOfConsumers = 1,
312 .scale = 0.0f,
313 .type = TestOperandType::INT32,
314 .zeroPoint = 0
315 }, { // exponent_new
316 .channelQuant = {},
317 .data = TestBuffer::createFromVector<float>({2.0f}),
318 .dimensions = {1},
319 .isIgnored = false,
320 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
321 .numberOfConsumers = 1,
322 .scale = 0.0f,
323 .type = TestOperandType::TENSOR_FLOAT32,
324 .zeroPoint = 0
325 }, { // dummy3
326 .channelQuant = {},
327 .data = TestBuffer::createFromVector<float>({0.0f}),
328 .dimensions = {1},
329 .isIgnored = false,
330 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
331 .numberOfConsumers = 1,
332 .scale = 0.0f,
333 .type = TestOperandType::TENSOR_FLOAT32,
334 .zeroPoint = 0
335 }, { // param3
336 .channelQuant = {},
337 .data = TestBuffer::createFromVector<int32_t>({0}),
338 .dimensions = {},
339 .isIgnored = false,
340 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
341 .numberOfConsumers = 1,
342 .scale = 0.0f,
343 .type = TestOperandType::INT32,
344 .zeroPoint = 0
345 }},
346 .operations = {{
347 .inputs = {3, 4, 5},
348 .outputs = {0},
349 .type = TestOperationType::ADD
350 }, {
351 .inputs = {6, 7, 8},
352 .outputs = {1},
353 .type = TestOperationType::ADD
354 }, {
355 .inputs = {0, 1},
356 .outputs = {2},
357 .type = TestOperationType::POW
358 }},
359 .outputIndexes = {2}
360 },
361 .minSupportedVersion = TestHalVersion::UNKNOWN,
362 .referenced = {}
363 };
364 return model;
365 }
366
367 const auto dummy_test_model_relaxed_all_inputs_as_internal = TestModelManager::get().add("pow_relaxed_all_inputs_as_internal", get_test_model_relaxed_all_inputs_as_internal());
368
369 } // namespace generated_tests::pow
370
371 namespace generated_tests::pow {
372
get_test_model_float16()373 const TestModel& get_test_model_float16() {
374 static TestModel model = {
375 .expectFailure = false,
376 .expectedMultinomialDistributionTolerance = 0,
377 .isRelaxed = false,
378 .main = {
379 .inputIndexes = {0, 1},
380 .operands = {{ // base
381 .channelQuant = {},
382 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
383 .dimensions = {2, 1},
384 .isIgnored = false,
385 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
386 .numberOfConsumers = 1,
387 .scale = 0.0f,
388 .type = TestOperandType::TENSOR_FLOAT16,
389 .zeroPoint = 0
390 }, { // exponent
391 .channelQuant = {},
392 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
393 .dimensions = {1},
394 .isIgnored = false,
395 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
396 .numberOfConsumers = 1,
397 .scale = 0.0f,
398 .type = TestOperandType::TENSOR_FLOAT16,
399 .zeroPoint = 0
400 }, { // output
401 .channelQuant = {},
402 .data = TestBuffer::createFromVector<_Float16>({4.0f, 9.0f}),
403 .dimensions = {2, 1},
404 .isIgnored = false,
405 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
406 .numberOfConsumers = 0,
407 .scale = 0.0f,
408 .type = TestOperandType::TENSOR_FLOAT16,
409 .zeroPoint = 0
410 }},
411 .operations = {{
412 .inputs = {0, 1},
413 .outputs = {2},
414 .type = TestOperationType::POW
415 }},
416 .outputIndexes = {2}
417 },
418 .minSupportedVersion = TestHalVersion::V1_2,
419 .referenced = {}
420 };
421 return model;
422 }
423
424 const auto dummy_test_model_float16 = TestModelManager::get().add("pow_float16", get_test_model_float16());
425
426 } // namespace generated_tests::pow
427
428 namespace generated_tests::pow {
429
get_test_model_float16_all_inputs_as_internal()430 const TestModel& get_test_model_float16_all_inputs_as_internal() {
431 static TestModel model = {
432 .expectFailure = false,
433 .expectedMultinomialDistributionTolerance = 0,
434 .isRelaxed = false,
435 .main = {
436 .inputIndexes = {3, 6},
437 .operands = {{ // base
438 .channelQuant = {},
439 .data = TestBuffer::createFromVector<_Float16>({}),
440 .dimensions = {2, 1},
441 .isIgnored = false,
442 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
443 .numberOfConsumers = 1,
444 .scale = 0.0f,
445 .type = TestOperandType::TENSOR_FLOAT16,
446 .zeroPoint = 0
447 }, { // exponent
448 .channelQuant = {},
449 .data = TestBuffer::createFromVector<_Float16>({}),
450 .dimensions = {1},
451 .isIgnored = false,
452 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
453 .numberOfConsumers = 1,
454 .scale = 0.0f,
455 .type = TestOperandType::TENSOR_FLOAT16,
456 .zeroPoint = 0
457 }, { // output
458 .channelQuant = {},
459 .data = TestBuffer::createFromVector<_Float16>({4.0f, 9.0f}),
460 .dimensions = {2, 1},
461 .isIgnored = false,
462 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
463 .numberOfConsumers = 0,
464 .scale = 0.0f,
465 .type = TestOperandType::TENSOR_FLOAT16,
466 .zeroPoint = 0
467 }, { // base_new
468 .channelQuant = {},
469 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
470 .dimensions = {2, 1},
471 .isIgnored = false,
472 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
473 .numberOfConsumers = 1,
474 .scale = 0.0f,
475 .type = TestOperandType::TENSOR_FLOAT16,
476 .zeroPoint = 0
477 }, { // dummy4
478 .channelQuant = {},
479 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
480 .dimensions = {1},
481 .isIgnored = false,
482 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
483 .numberOfConsumers = 1,
484 .scale = 0.0f,
485 .type = TestOperandType::TENSOR_FLOAT16,
486 .zeroPoint = 0
487 }, { // param4
488 .channelQuant = {},
489 .data = TestBuffer::createFromVector<int32_t>({0}),
490 .dimensions = {},
491 .isIgnored = false,
492 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
493 .numberOfConsumers = 1,
494 .scale = 0.0f,
495 .type = TestOperandType::INT32,
496 .zeroPoint = 0
497 }, { // exponent_new
498 .channelQuant = {},
499 .data = TestBuffer::createFromVector<_Float16>({2.0f}),
500 .dimensions = {1},
501 .isIgnored = false,
502 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
503 .numberOfConsumers = 1,
504 .scale = 0.0f,
505 .type = TestOperandType::TENSOR_FLOAT16,
506 .zeroPoint = 0
507 }, { // dummy5
508 .channelQuant = {},
509 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
510 .dimensions = {1},
511 .isIgnored = false,
512 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
513 .numberOfConsumers = 1,
514 .scale = 0.0f,
515 .type = TestOperandType::TENSOR_FLOAT16,
516 .zeroPoint = 0
517 }, { // param5
518 .channelQuant = {},
519 .data = TestBuffer::createFromVector<int32_t>({0}),
520 .dimensions = {},
521 .isIgnored = false,
522 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
523 .numberOfConsumers = 1,
524 .scale = 0.0f,
525 .type = TestOperandType::INT32,
526 .zeroPoint = 0
527 }},
528 .operations = {{
529 .inputs = {3, 4, 5},
530 .outputs = {0},
531 .type = TestOperationType::ADD
532 }, {
533 .inputs = {6, 7, 8},
534 .outputs = {1},
535 .type = TestOperationType::ADD
536 }, {
537 .inputs = {0, 1},
538 .outputs = {2},
539 .type = TestOperationType::POW
540 }},
541 .outputIndexes = {2}
542 },
543 .minSupportedVersion = TestHalVersion::V1_2,
544 .referenced = {}
545 };
546 return model;
547 }
548
549 const auto dummy_test_model_float16_all_inputs_as_internal = TestModelManager::get().add("pow_float16_all_inputs_as_internal", get_test_model_float16_all_inputs_as_internal());
550
551 } // namespace generated_tests::pow
552
553 namespace generated_tests::pow {
554
get_test_model_2()555 const TestModel& get_test_model_2() {
556 static TestModel model = {
557 .expectFailure = false,
558 .expectedMultinomialDistributionTolerance = 0,
559 .isRelaxed = false,
560 .main = {
561 .inputIndexes = {0, 1},
562 .operands = {{ // base
563 .channelQuant = {},
564 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
565 .dimensions = {2, 1},
566 .isIgnored = false,
567 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
568 .numberOfConsumers = 1,
569 .scale = 0.0f,
570 .type = TestOperandType::TENSOR_FLOAT32,
571 .zeroPoint = 0
572 }, { // exponent1
573 .channelQuant = {},
574 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
575 .dimensions = {1, 2},
576 .isIgnored = false,
577 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
578 .numberOfConsumers = 1,
579 .scale = 0.0f,
580 .type = TestOperandType::TENSOR_FLOAT32,
581 .zeroPoint = 0
582 }, { // output1
583 .channelQuant = {},
584 .data = TestBuffer::createFromVector<float>({4.0f, 8.0f, 9.0f, 27.0f}),
585 .dimensions = {2, 2},
586 .isIgnored = false,
587 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
588 .numberOfConsumers = 0,
589 .scale = 0.0f,
590 .type = TestOperandType::TENSOR_FLOAT32,
591 .zeroPoint = 0
592 }},
593 .operations = {{
594 .inputs = {0, 1},
595 .outputs = {2},
596 .type = TestOperationType::POW
597 }},
598 .outputIndexes = {2}
599 },
600 .minSupportedVersion = TestHalVersion::V1_2,
601 .referenced = {}
602 };
603 return model;
604 }
605
606 const auto dummy_test_model_2 = TestModelManager::get().add("pow_2", get_test_model_2());
607
608 } // namespace generated_tests::pow
609
610 namespace generated_tests::pow {
611
get_test_model_all_inputs_as_internal_2()612 const TestModel& get_test_model_all_inputs_as_internal_2() {
613 static TestModel model = {
614 .expectFailure = false,
615 .expectedMultinomialDistributionTolerance = 0,
616 .isRelaxed = false,
617 .main = {
618 .inputIndexes = {3, 6},
619 .operands = {{ // base
620 .channelQuant = {},
621 .data = TestBuffer::createFromVector<float>({}),
622 .dimensions = {2, 1},
623 .isIgnored = false,
624 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
625 .numberOfConsumers = 1,
626 .scale = 0.0f,
627 .type = TestOperandType::TENSOR_FLOAT32,
628 .zeroPoint = 0
629 }, { // exponent1
630 .channelQuant = {},
631 .data = TestBuffer::createFromVector<float>({}),
632 .dimensions = {1, 2},
633 .isIgnored = false,
634 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
635 .numberOfConsumers = 1,
636 .scale = 0.0f,
637 .type = TestOperandType::TENSOR_FLOAT32,
638 .zeroPoint = 0
639 }, { // output1
640 .channelQuant = {},
641 .data = TestBuffer::createFromVector<float>({4.0f, 8.0f, 9.0f, 27.0f}),
642 .dimensions = {2, 2},
643 .isIgnored = false,
644 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
645 .numberOfConsumers = 0,
646 .scale = 0.0f,
647 .type = TestOperandType::TENSOR_FLOAT32,
648 .zeroPoint = 0
649 }, { // base_new
650 .channelQuant = {},
651 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
652 .dimensions = {2, 1},
653 .isIgnored = false,
654 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
655 .numberOfConsumers = 1,
656 .scale = 0.0f,
657 .type = TestOperandType::TENSOR_FLOAT32,
658 .zeroPoint = 0
659 }, { // dummy6
660 .channelQuant = {},
661 .data = TestBuffer::createFromVector<float>({0.0f}),
662 .dimensions = {1},
663 .isIgnored = false,
664 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
665 .numberOfConsumers = 1,
666 .scale = 0.0f,
667 .type = TestOperandType::TENSOR_FLOAT32,
668 .zeroPoint = 0
669 }, { // param6
670 .channelQuant = {},
671 .data = TestBuffer::createFromVector<int32_t>({0}),
672 .dimensions = {},
673 .isIgnored = false,
674 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
675 .numberOfConsumers = 1,
676 .scale = 0.0f,
677 .type = TestOperandType::INT32,
678 .zeroPoint = 0
679 }, { // exponent1_new
680 .channelQuant = {},
681 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
682 .dimensions = {1, 2},
683 .isIgnored = false,
684 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
685 .numberOfConsumers = 1,
686 .scale = 0.0f,
687 .type = TestOperandType::TENSOR_FLOAT32,
688 .zeroPoint = 0
689 }, { // dummy7
690 .channelQuant = {},
691 .data = TestBuffer::createFromVector<float>({0.0f}),
692 .dimensions = {1},
693 .isIgnored = false,
694 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
695 .numberOfConsumers = 1,
696 .scale = 0.0f,
697 .type = TestOperandType::TENSOR_FLOAT32,
698 .zeroPoint = 0
699 }, { // param7
700 .channelQuant = {},
701 .data = TestBuffer::createFromVector<int32_t>({0}),
702 .dimensions = {},
703 .isIgnored = false,
704 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
705 .numberOfConsumers = 1,
706 .scale = 0.0f,
707 .type = TestOperandType::INT32,
708 .zeroPoint = 0
709 }},
710 .operations = {{
711 .inputs = {3, 4, 5},
712 .outputs = {0},
713 .type = TestOperationType::ADD
714 }, {
715 .inputs = {6, 7, 8},
716 .outputs = {1},
717 .type = TestOperationType::ADD
718 }, {
719 .inputs = {0, 1},
720 .outputs = {2},
721 .type = TestOperationType::POW
722 }},
723 .outputIndexes = {2}
724 },
725 .minSupportedVersion = TestHalVersion::V1_2,
726 .referenced = {}
727 };
728 return model;
729 }
730
731 const auto dummy_test_model_all_inputs_as_internal_2 = TestModelManager::get().add("pow_all_inputs_as_internal_2", get_test_model_all_inputs_as_internal_2());
732
733 } // namespace generated_tests::pow
734
735 namespace generated_tests::pow {
736
get_test_model_relaxed_2()737 const TestModel& get_test_model_relaxed_2() {
738 static TestModel model = {
739 .expectFailure = false,
740 .expectedMultinomialDistributionTolerance = 0,
741 .isRelaxed = true,
742 .main = {
743 .inputIndexes = {0, 1},
744 .operands = {{ // base
745 .channelQuant = {},
746 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
747 .dimensions = {2, 1},
748 .isIgnored = false,
749 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
750 .numberOfConsumers = 1,
751 .scale = 0.0f,
752 .type = TestOperandType::TENSOR_FLOAT32,
753 .zeroPoint = 0
754 }, { // exponent1
755 .channelQuant = {},
756 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
757 .dimensions = {1, 2},
758 .isIgnored = false,
759 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
760 .numberOfConsumers = 1,
761 .scale = 0.0f,
762 .type = TestOperandType::TENSOR_FLOAT32,
763 .zeroPoint = 0
764 }, { // output1
765 .channelQuant = {},
766 .data = TestBuffer::createFromVector<float>({4.0f, 8.0f, 9.0f, 27.0f}),
767 .dimensions = {2, 2},
768 .isIgnored = false,
769 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
770 .numberOfConsumers = 0,
771 .scale = 0.0f,
772 .type = TestOperandType::TENSOR_FLOAT32,
773 .zeroPoint = 0
774 }},
775 .operations = {{
776 .inputs = {0, 1},
777 .outputs = {2},
778 .type = TestOperationType::POW
779 }},
780 .outputIndexes = {2}
781 },
782 .minSupportedVersion = TestHalVersion::UNKNOWN,
783 .referenced = {}
784 };
785 return model;
786 }
787
788 const auto dummy_test_model_relaxed_2 = TestModelManager::get().add("pow_relaxed_2", get_test_model_relaxed_2());
789
790 } // namespace generated_tests::pow
791
792 namespace generated_tests::pow {
793
get_test_model_relaxed_all_inputs_as_internal_2()794 const TestModel& get_test_model_relaxed_all_inputs_as_internal_2() {
795 static TestModel model = {
796 .expectFailure = false,
797 .expectedMultinomialDistributionTolerance = 0,
798 .isRelaxed = true,
799 .main = {
800 .inputIndexes = {3, 6},
801 .operands = {{ // base
802 .channelQuant = {},
803 .data = TestBuffer::createFromVector<float>({}),
804 .dimensions = {2, 1},
805 .isIgnored = false,
806 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
807 .numberOfConsumers = 1,
808 .scale = 0.0f,
809 .type = TestOperandType::TENSOR_FLOAT32,
810 .zeroPoint = 0
811 }, { // exponent1
812 .channelQuant = {},
813 .data = TestBuffer::createFromVector<float>({}),
814 .dimensions = {1, 2},
815 .isIgnored = false,
816 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
817 .numberOfConsumers = 1,
818 .scale = 0.0f,
819 .type = TestOperandType::TENSOR_FLOAT32,
820 .zeroPoint = 0
821 }, { // output1
822 .channelQuant = {},
823 .data = TestBuffer::createFromVector<float>({4.0f, 8.0f, 9.0f, 27.0f}),
824 .dimensions = {2, 2},
825 .isIgnored = false,
826 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
827 .numberOfConsumers = 0,
828 .scale = 0.0f,
829 .type = TestOperandType::TENSOR_FLOAT32,
830 .zeroPoint = 0
831 }, { // base_new
832 .channelQuant = {},
833 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
834 .dimensions = {2, 1},
835 .isIgnored = false,
836 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
837 .numberOfConsumers = 1,
838 .scale = 0.0f,
839 .type = TestOperandType::TENSOR_FLOAT32,
840 .zeroPoint = 0
841 }, { // dummy8
842 .channelQuant = {},
843 .data = TestBuffer::createFromVector<float>({0.0f}),
844 .dimensions = {1},
845 .isIgnored = false,
846 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
847 .numberOfConsumers = 1,
848 .scale = 0.0f,
849 .type = TestOperandType::TENSOR_FLOAT32,
850 .zeroPoint = 0
851 }, { // param8
852 .channelQuant = {},
853 .data = TestBuffer::createFromVector<int32_t>({0}),
854 .dimensions = {},
855 .isIgnored = false,
856 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
857 .numberOfConsumers = 1,
858 .scale = 0.0f,
859 .type = TestOperandType::INT32,
860 .zeroPoint = 0
861 }, { // exponent1_new
862 .channelQuant = {},
863 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
864 .dimensions = {1, 2},
865 .isIgnored = false,
866 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
867 .numberOfConsumers = 1,
868 .scale = 0.0f,
869 .type = TestOperandType::TENSOR_FLOAT32,
870 .zeroPoint = 0
871 }, { // dummy9
872 .channelQuant = {},
873 .data = TestBuffer::createFromVector<float>({0.0f}),
874 .dimensions = {1},
875 .isIgnored = false,
876 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
877 .numberOfConsumers = 1,
878 .scale = 0.0f,
879 .type = TestOperandType::TENSOR_FLOAT32,
880 .zeroPoint = 0
881 }, { // param9
882 .channelQuant = {},
883 .data = TestBuffer::createFromVector<int32_t>({0}),
884 .dimensions = {},
885 .isIgnored = false,
886 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
887 .numberOfConsumers = 1,
888 .scale = 0.0f,
889 .type = TestOperandType::INT32,
890 .zeroPoint = 0
891 }},
892 .operations = {{
893 .inputs = {3, 4, 5},
894 .outputs = {0},
895 .type = TestOperationType::ADD
896 }, {
897 .inputs = {6, 7, 8},
898 .outputs = {1},
899 .type = TestOperationType::ADD
900 }, {
901 .inputs = {0, 1},
902 .outputs = {2},
903 .type = TestOperationType::POW
904 }},
905 .outputIndexes = {2}
906 },
907 .minSupportedVersion = TestHalVersion::UNKNOWN,
908 .referenced = {}
909 };
910 return model;
911 }
912
913 const auto dummy_test_model_relaxed_all_inputs_as_internal_2 = TestModelManager::get().add("pow_relaxed_all_inputs_as_internal_2", get_test_model_relaxed_all_inputs_as_internal_2());
914
915 } // namespace generated_tests::pow
916
917 namespace generated_tests::pow {
918
get_test_model_float16_2()919 const TestModel& get_test_model_float16_2() {
920 static TestModel model = {
921 .expectFailure = false,
922 .expectedMultinomialDistributionTolerance = 0,
923 .isRelaxed = false,
924 .main = {
925 .inputIndexes = {0, 1},
926 .operands = {{ // base
927 .channelQuant = {},
928 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
929 .dimensions = {2, 1},
930 .isIgnored = false,
931 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
932 .numberOfConsumers = 1,
933 .scale = 0.0f,
934 .type = TestOperandType::TENSOR_FLOAT16,
935 .zeroPoint = 0
936 }, { // exponent1
937 .channelQuant = {},
938 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
939 .dimensions = {1, 2},
940 .isIgnored = false,
941 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
942 .numberOfConsumers = 1,
943 .scale = 0.0f,
944 .type = TestOperandType::TENSOR_FLOAT16,
945 .zeroPoint = 0
946 }, { // output1
947 .channelQuant = {},
948 .data = TestBuffer::createFromVector<_Float16>({4.0f, 8.0f, 9.0f, 27.0f}),
949 .dimensions = {2, 2},
950 .isIgnored = false,
951 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
952 .numberOfConsumers = 0,
953 .scale = 0.0f,
954 .type = TestOperandType::TENSOR_FLOAT16,
955 .zeroPoint = 0
956 }},
957 .operations = {{
958 .inputs = {0, 1},
959 .outputs = {2},
960 .type = TestOperationType::POW
961 }},
962 .outputIndexes = {2}
963 },
964 .minSupportedVersion = TestHalVersion::V1_2,
965 .referenced = {}
966 };
967 return model;
968 }
969
970 const auto dummy_test_model_float16_2 = TestModelManager::get().add("pow_float16_2", get_test_model_float16_2());
971
972 } // namespace generated_tests::pow
973
974 namespace generated_tests::pow {
975
get_test_model_float16_all_inputs_as_internal_2()976 const TestModel& get_test_model_float16_all_inputs_as_internal_2() {
977 static TestModel model = {
978 .expectFailure = false,
979 .expectedMultinomialDistributionTolerance = 0,
980 .isRelaxed = false,
981 .main = {
982 .inputIndexes = {3, 6},
983 .operands = {{ // base
984 .channelQuant = {},
985 .data = TestBuffer::createFromVector<_Float16>({}),
986 .dimensions = {2, 1},
987 .isIgnored = false,
988 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
989 .numberOfConsumers = 1,
990 .scale = 0.0f,
991 .type = TestOperandType::TENSOR_FLOAT16,
992 .zeroPoint = 0
993 }, { // exponent1
994 .channelQuant = {},
995 .data = TestBuffer::createFromVector<_Float16>({}),
996 .dimensions = {1, 2},
997 .isIgnored = false,
998 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
999 .numberOfConsumers = 1,
1000 .scale = 0.0f,
1001 .type = TestOperandType::TENSOR_FLOAT16,
1002 .zeroPoint = 0
1003 }, { // output1
1004 .channelQuant = {},
1005 .data = TestBuffer::createFromVector<_Float16>({4.0f, 8.0f, 9.0f, 27.0f}),
1006 .dimensions = {2, 2},
1007 .isIgnored = false,
1008 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1009 .numberOfConsumers = 0,
1010 .scale = 0.0f,
1011 .type = TestOperandType::TENSOR_FLOAT16,
1012 .zeroPoint = 0
1013 }, { // base_new
1014 .channelQuant = {},
1015 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
1016 .dimensions = {2, 1},
1017 .isIgnored = false,
1018 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1019 .numberOfConsumers = 1,
1020 .scale = 0.0f,
1021 .type = TestOperandType::TENSOR_FLOAT16,
1022 .zeroPoint = 0
1023 }, { // dummy10
1024 .channelQuant = {},
1025 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1026 .dimensions = {1},
1027 .isIgnored = false,
1028 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1029 .numberOfConsumers = 1,
1030 .scale = 0.0f,
1031 .type = TestOperandType::TENSOR_FLOAT16,
1032 .zeroPoint = 0
1033 }, { // param10
1034 .channelQuant = {},
1035 .data = TestBuffer::createFromVector<int32_t>({0}),
1036 .dimensions = {},
1037 .isIgnored = false,
1038 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1039 .numberOfConsumers = 1,
1040 .scale = 0.0f,
1041 .type = TestOperandType::INT32,
1042 .zeroPoint = 0
1043 }, { // exponent1_new
1044 .channelQuant = {},
1045 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
1046 .dimensions = {1, 2},
1047 .isIgnored = false,
1048 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1049 .numberOfConsumers = 1,
1050 .scale = 0.0f,
1051 .type = TestOperandType::TENSOR_FLOAT16,
1052 .zeroPoint = 0
1053 }, { // dummy11
1054 .channelQuant = {},
1055 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1056 .dimensions = {1},
1057 .isIgnored = false,
1058 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1059 .numberOfConsumers = 1,
1060 .scale = 0.0f,
1061 .type = TestOperandType::TENSOR_FLOAT16,
1062 .zeroPoint = 0
1063 }, { // param11
1064 .channelQuant = {},
1065 .data = TestBuffer::createFromVector<int32_t>({0}),
1066 .dimensions = {},
1067 .isIgnored = false,
1068 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1069 .numberOfConsumers = 1,
1070 .scale = 0.0f,
1071 .type = TestOperandType::INT32,
1072 .zeroPoint = 0
1073 }},
1074 .operations = {{
1075 .inputs = {3, 4, 5},
1076 .outputs = {0},
1077 .type = TestOperationType::ADD
1078 }, {
1079 .inputs = {6, 7, 8},
1080 .outputs = {1},
1081 .type = TestOperationType::ADD
1082 }, {
1083 .inputs = {0, 1},
1084 .outputs = {2},
1085 .type = TestOperationType::POW
1086 }},
1087 .outputIndexes = {2}
1088 },
1089 .minSupportedVersion = TestHalVersion::V1_2,
1090 .referenced = {}
1091 };
1092 return model;
1093 }
1094
1095 const auto dummy_test_model_float16_all_inputs_as_internal_2 = TestModelManager::get().add("pow_float16_all_inputs_as_internal_2", get_test_model_float16_all_inputs_as_internal_2());
1096
1097 } // namespace generated_tests::pow
1098
1099 namespace generated_tests::pow {
1100
get_test_model_3()1101 const TestModel& get_test_model_3() {
1102 static TestModel model = {
1103 .expectFailure = false,
1104 .expectedMultinomialDistributionTolerance = 0,
1105 .isRelaxed = false,
1106 .main = {
1107 .inputIndexes = {0, 1},
1108 .operands = {{ // base
1109 .channelQuant = {},
1110 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
1111 .dimensions = {2, 1},
1112 .isIgnored = false,
1113 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1114 .numberOfConsumers = 1,
1115 .scale = 0.0f,
1116 .type = TestOperandType::TENSOR_FLOAT32,
1117 .zeroPoint = 0
1118 }, { // exponent2
1119 .channelQuant = {},
1120 .data = TestBuffer::createFromVector<float>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1121 .dimensions = {3, 1, 2},
1122 .isIgnored = false,
1123 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1124 .numberOfConsumers = 1,
1125 .scale = 0.0f,
1126 .type = TestOperandType::TENSOR_FLOAT32,
1127 .zeroPoint = 0
1128 }, { // output2
1129 .channelQuant = {},
1130 .data = TestBuffer::createFromVector<float>({1.0f, 1.4142135623730951f, 1.0f, 1.7320508075688772f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1131 .dimensions = {3, 2, 2},
1132 .isIgnored = false,
1133 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1134 .numberOfConsumers = 0,
1135 .scale = 0.0f,
1136 .type = TestOperandType::TENSOR_FLOAT32,
1137 .zeroPoint = 0
1138 }},
1139 .operations = {{
1140 .inputs = {0, 1},
1141 .outputs = {2},
1142 .type = TestOperationType::POW
1143 }},
1144 .outputIndexes = {2}
1145 },
1146 .minSupportedVersion = TestHalVersion::V1_2,
1147 .referenced = {}
1148 };
1149 return model;
1150 }
1151
1152 const auto dummy_test_model_3 = TestModelManager::get().add("pow_3", get_test_model_3());
1153
1154 } // namespace generated_tests::pow
1155
1156 namespace generated_tests::pow {
1157
get_test_model_all_inputs_as_internal_3()1158 const TestModel& get_test_model_all_inputs_as_internal_3() {
1159 static TestModel model = {
1160 .expectFailure = false,
1161 .expectedMultinomialDistributionTolerance = 0,
1162 .isRelaxed = false,
1163 .main = {
1164 .inputIndexes = {3, 6},
1165 .operands = {{ // base
1166 .channelQuant = {},
1167 .data = TestBuffer::createFromVector<float>({}),
1168 .dimensions = {2, 1},
1169 .isIgnored = false,
1170 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1171 .numberOfConsumers = 1,
1172 .scale = 0.0f,
1173 .type = TestOperandType::TENSOR_FLOAT32,
1174 .zeroPoint = 0
1175 }, { // exponent2
1176 .channelQuant = {},
1177 .data = TestBuffer::createFromVector<float>({}),
1178 .dimensions = {3, 1, 2},
1179 .isIgnored = false,
1180 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1181 .numberOfConsumers = 1,
1182 .scale = 0.0f,
1183 .type = TestOperandType::TENSOR_FLOAT32,
1184 .zeroPoint = 0
1185 }, { // output2
1186 .channelQuant = {},
1187 .data = TestBuffer::createFromVector<float>({1.0f, 1.4142135623730951f, 1.0f, 1.7320508075688772f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1188 .dimensions = {3, 2, 2},
1189 .isIgnored = false,
1190 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1191 .numberOfConsumers = 0,
1192 .scale = 0.0f,
1193 .type = TestOperandType::TENSOR_FLOAT32,
1194 .zeroPoint = 0
1195 }, { // base_new
1196 .channelQuant = {},
1197 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
1198 .dimensions = {2, 1},
1199 .isIgnored = false,
1200 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1201 .numberOfConsumers = 1,
1202 .scale = 0.0f,
1203 .type = TestOperandType::TENSOR_FLOAT32,
1204 .zeroPoint = 0
1205 }, { // dummy12
1206 .channelQuant = {},
1207 .data = TestBuffer::createFromVector<float>({0.0f}),
1208 .dimensions = {1},
1209 .isIgnored = false,
1210 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1211 .numberOfConsumers = 1,
1212 .scale = 0.0f,
1213 .type = TestOperandType::TENSOR_FLOAT32,
1214 .zeroPoint = 0
1215 }, { // param12
1216 .channelQuant = {},
1217 .data = TestBuffer::createFromVector<int32_t>({0}),
1218 .dimensions = {},
1219 .isIgnored = false,
1220 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1221 .numberOfConsumers = 1,
1222 .scale = 0.0f,
1223 .type = TestOperandType::INT32,
1224 .zeroPoint = 0
1225 }, { // exponent2_new
1226 .channelQuant = {},
1227 .data = TestBuffer::createFromVector<float>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1228 .dimensions = {3, 1, 2},
1229 .isIgnored = false,
1230 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1231 .numberOfConsumers = 1,
1232 .scale = 0.0f,
1233 .type = TestOperandType::TENSOR_FLOAT32,
1234 .zeroPoint = 0
1235 }, { // dummy13
1236 .channelQuant = {},
1237 .data = TestBuffer::createFromVector<float>({0.0f}),
1238 .dimensions = {1},
1239 .isIgnored = false,
1240 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1241 .numberOfConsumers = 1,
1242 .scale = 0.0f,
1243 .type = TestOperandType::TENSOR_FLOAT32,
1244 .zeroPoint = 0
1245 }, { // param13
1246 .channelQuant = {},
1247 .data = TestBuffer::createFromVector<int32_t>({0}),
1248 .dimensions = {},
1249 .isIgnored = false,
1250 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1251 .numberOfConsumers = 1,
1252 .scale = 0.0f,
1253 .type = TestOperandType::INT32,
1254 .zeroPoint = 0
1255 }},
1256 .operations = {{
1257 .inputs = {3, 4, 5},
1258 .outputs = {0},
1259 .type = TestOperationType::ADD
1260 }, {
1261 .inputs = {6, 7, 8},
1262 .outputs = {1},
1263 .type = TestOperationType::ADD
1264 }, {
1265 .inputs = {0, 1},
1266 .outputs = {2},
1267 .type = TestOperationType::POW
1268 }},
1269 .outputIndexes = {2}
1270 },
1271 .minSupportedVersion = TestHalVersion::V1_2,
1272 .referenced = {}
1273 };
1274 return model;
1275 }
1276
1277 const auto dummy_test_model_all_inputs_as_internal_3 = TestModelManager::get().add("pow_all_inputs_as_internal_3", get_test_model_all_inputs_as_internal_3());
1278
1279 } // namespace generated_tests::pow
1280
1281 namespace generated_tests::pow {
1282
get_test_model_relaxed_3()1283 const TestModel& get_test_model_relaxed_3() {
1284 static TestModel model = {
1285 .expectFailure = false,
1286 .expectedMultinomialDistributionTolerance = 0,
1287 .isRelaxed = true,
1288 .main = {
1289 .inputIndexes = {0, 1},
1290 .operands = {{ // base
1291 .channelQuant = {},
1292 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
1293 .dimensions = {2, 1},
1294 .isIgnored = false,
1295 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1296 .numberOfConsumers = 1,
1297 .scale = 0.0f,
1298 .type = TestOperandType::TENSOR_FLOAT32,
1299 .zeroPoint = 0
1300 }, { // exponent2
1301 .channelQuant = {},
1302 .data = TestBuffer::createFromVector<float>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1303 .dimensions = {3, 1, 2},
1304 .isIgnored = false,
1305 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1306 .numberOfConsumers = 1,
1307 .scale = 0.0f,
1308 .type = TestOperandType::TENSOR_FLOAT32,
1309 .zeroPoint = 0
1310 }, { // output2
1311 .channelQuant = {},
1312 .data = TestBuffer::createFromVector<float>({1.0f, 1.4142135623730951f, 1.0f, 1.7320508075688772f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1313 .dimensions = {3, 2, 2},
1314 .isIgnored = false,
1315 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1316 .numberOfConsumers = 0,
1317 .scale = 0.0f,
1318 .type = TestOperandType::TENSOR_FLOAT32,
1319 .zeroPoint = 0
1320 }},
1321 .operations = {{
1322 .inputs = {0, 1},
1323 .outputs = {2},
1324 .type = TestOperationType::POW
1325 }},
1326 .outputIndexes = {2}
1327 },
1328 .minSupportedVersion = TestHalVersion::UNKNOWN,
1329 .referenced = {}
1330 };
1331 return model;
1332 }
1333
1334 const auto dummy_test_model_relaxed_3 = TestModelManager::get().add("pow_relaxed_3", get_test_model_relaxed_3());
1335
1336 } // namespace generated_tests::pow
1337
1338 namespace generated_tests::pow {
1339
get_test_model_relaxed_all_inputs_as_internal_3()1340 const TestModel& get_test_model_relaxed_all_inputs_as_internal_3() {
1341 static TestModel model = {
1342 .expectFailure = false,
1343 .expectedMultinomialDistributionTolerance = 0,
1344 .isRelaxed = true,
1345 .main = {
1346 .inputIndexes = {3, 6},
1347 .operands = {{ // base
1348 .channelQuant = {},
1349 .data = TestBuffer::createFromVector<float>({}),
1350 .dimensions = {2, 1},
1351 .isIgnored = false,
1352 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1353 .numberOfConsumers = 1,
1354 .scale = 0.0f,
1355 .type = TestOperandType::TENSOR_FLOAT32,
1356 .zeroPoint = 0
1357 }, { // exponent2
1358 .channelQuant = {},
1359 .data = TestBuffer::createFromVector<float>({}),
1360 .dimensions = {3, 1, 2},
1361 .isIgnored = false,
1362 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1363 .numberOfConsumers = 1,
1364 .scale = 0.0f,
1365 .type = TestOperandType::TENSOR_FLOAT32,
1366 .zeroPoint = 0
1367 }, { // output2
1368 .channelQuant = {},
1369 .data = TestBuffer::createFromVector<float>({1.0f, 1.4142135623730951f, 1.0f, 1.7320508075688772f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1370 .dimensions = {3, 2, 2},
1371 .isIgnored = false,
1372 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1373 .numberOfConsumers = 0,
1374 .scale = 0.0f,
1375 .type = TestOperandType::TENSOR_FLOAT32,
1376 .zeroPoint = 0
1377 }, { // base_new
1378 .channelQuant = {},
1379 .data = TestBuffer::createFromVector<float>({2.0f, 3.0f}),
1380 .dimensions = {2, 1},
1381 .isIgnored = false,
1382 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1383 .numberOfConsumers = 1,
1384 .scale = 0.0f,
1385 .type = TestOperandType::TENSOR_FLOAT32,
1386 .zeroPoint = 0
1387 }, { // dummy14
1388 .channelQuant = {},
1389 .data = TestBuffer::createFromVector<float>({0.0f}),
1390 .dimensions = {1},
1391 .isIgnored = false,
1392 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1393 .numberOfConsumers = 1,
1394 .scale = 0.0f,
1395 .type = TestOperandType::TENSOR_FLOAT32,
1396 .zeroPoint = 0
1397 }, { // param14
1398 .channelQuant = {},
1399 .data = TestBuffer::createFromVector<int32_t>({0}),
1400 .dimensions = {},
1401 .isIgnored = false,
1402 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1403 .numberOfConsumers = 1,
1404 .scale = 0.0f,
1405 .type = TestOperandType::INT32,
1406 .zeroPoint = 0
1407 }, { // exponent2_new
1408 .channelQuant = {},
1409 .data = TestBuffer::createFromVector<float>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1410 .dimensions = {3, 1, 2},
1411 .isIgnored = false,
1412 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1413 .numberOfConsumers = 1,
1414 .scale = 0.0f,
1415 .type = TestOperandType::TENSOR_FLOAT32,
1416 .zeroPoint = 0
1417 }, { // dummy15
1418 .channelQuant = {},
1419 .data = TestBuffer::createFromVector<float>({0.0f}),
1420 .dimensions = {1},
1421 .isIgnored = false,
1422 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1423 .numberOfConsumers = 1,
1424 .scale = 0.0f,
1425 .type = TestOperandType::TENSOR_FLOAT32,
1426 .zeroPoint = 0
1427 }, { // param15
1428 .channelQuant = {},
1429 .data = TestBuffer::createFromVector<int32_t>({0}),
1430 .dimensions = {},
1431 .isIgnored = false,
1432 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1433 .numberOfConsumers = 1,
1434 .scale = 0.0f,
1435 .type = TestOperandType::INT32,
1436 .zeroPoint = 0
1437 }},
1438 .operations = {{
1439 .inputs = {3, 4, 5},
1440 .outputs = {0},
1441 .type = TestOperationType::ADD
1442 }, {
1443 .inputs = {6, 7, 8},
1444 .outputs = {1},
1445 .type = TestOperationType::ADD
1446 }, {
1447 .inputs = {0, 1},
1448 .outputs = {2},
1449 .type = TestOperationType::POW
1450 }},
1451 .outputIndexes = {2}
1452 },
1453 .minSupportedVersion = TestHalVersion::UNKNOWN,
1454 .referenced = {}
1455 };
1456 return model;
1457 }
1458
1459 const auto dummy_test_model_relaxed_all_inputs_as_internal_3 = TestModelManager::get().add("pow_relaxed_all_inputs_as_internal_3", get_test_model_relaxed_all_inputs_as_internal_3());
1460
1461 } // namespace generated_tests::pow
1462
1463 namespace generated_tests::pow {
1464
get_test_model_float16_3()1465 const TestModel& get_test_model_float16_3() {
1466 static TestModel model = {
1467 .expectFailure = false,
1468 .expectedMultinomialDistributionTolerance = 0,
1469 .isRelaxed = false,
1470 .main = {
1471 .inputIndexes = {0, 1},
1472 .operands = {{ // base
1473 .channelQuant = {},
1474 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
1475 .dimensions = {2, 1},
1476 .isIgnored = false,
1477 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1478 .numberOfConsumers = 1,
1479 .scale = 0.0f,
1480 .type = TestOperandType::TENSOR_FLOAT16,
1481 .zeroPoint = 0
1482 }, { // exponent2
1483 .channelQuant = {},
1484 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1485 .dimensions = {3, 1, 2},
1486 .isIgnored = false,
1487 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1488 .numberOfConsumers = 1,
1489 .scale = 0.0f,
1490 .type = TestOperandType::TENSOR_FLOAT16,
1491 .zeroPoint = 0
1492 }, { // output2
1493 .channelQuant = {},
1494 .data = TestBuffer::createFromVector<_Float16>({1.0f, 1.4142135381698608f, 1.0f, 1.7320507764816284f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1495 .dimensions = {3, 2, 2},
1496 .isIgnored = false,
1497 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1498 .numberOfConsumers = 0,
1499 .scale = 0.0f,
1500 .type = TestOperandType::TENSOR_FLOAT16,
1501 .zeroPoint = 0
1502 }},
1503 .operations = {{
1504 .inputs = {0, 1},
1505 .outputs = {2},
1506 .type = TestOperationType::POW
1507 }},
1508 .outputIndexes = {2}
1509 },
1510 .minSupportedVersion = TestHalVersion::V1_2,
1511 .referenced = {}
1512 };
1513 return model;
1514 }
1515
1516 const auto dummy_test_model_float16_3 = TestModelManager::get().add("pow_float16_3", get_test_model_float16_3());
1517
1518 } // namespace generated_tests::pow
1519
1520 namespace generated_tests::pow {
1521
get_test_model_float16_all_inputs_as_internal_3()1522 const TestModel& get_test_model_float16_all_inputs_as_internal_3() {
1523 static TestModel model = {
1524 .expectFailure = false,
1525 .expectedMultinomialDistributionTolerance = 0,
1526 .isRelaxed = false,
1527 .main = {
1528 .inputIndexes = {3, 6},
1529 .operands = {{ // base
1530 .channelQuant = {},
1531 .data = TestBuffer::createFromVector<_Float16>({}),
1532 .dimensions = {2, 1},
1533 .isIgnored = false,
1534 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1535 .numberOfConsumers = 1,
1536 .scale = 0.0f,
1537 .type = TestOperandType::TENSOR_FLOAT16,
1538 .zeroPoint = 0
1539 }, { // exponent2
1540 .channelQuant = {},
1541 .data = TestBuffer::createFromVector<_Float16>({}),
1542 .dimensions = {3, 1, 2},
1543 .isIgnored = false,
1544 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1545 .numberOfConsumers = 1,
1546 .scale = 0.0f,
1547 .type = TestOperandType::TENSOR_FLOAT16,
1548 .zeroPoint = 0
1549 }, { // output2
1550 .channelQuant = {},
1551 .data = TestBuffer::createFromVector<_Float16>({1.0f, 1.4142135381698608f, 1.0f, 1.7320507764816284f, 2.0f, 4.0f, 3.0f, 9.0f, 8.0f, 16.0f, 27.0f, 81.0f}),
1552 .dimensions = {3, 2, 2},
1553 .isIgnored = false,
1554 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1555 .numberOfConsumers = 0,
1556 .scale = 0.0f,
1557 .type = TestOperandType::TENSOR_FLOAT16,
1558 .zeroPoint = 0
1559 }, { // base_new
1560 .channelQuant = {},
1561 .data = TestBuffer::createFromVector<_Float16>({2.0f, 3.0f}),
1562 .dimensions = {2, 1},
1563 .isIgnored = false,
1564 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1565 .numberOfConsumers = 1,
1566 .scale = 0.0f,
1567 .type = TestOperandType::TENSOR_FLOAT16,
1568 .zeroPoint = 0
1569 }, { // dummy16
1570 .channelQuant = {},
1571 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1572 .dimensions = {1},
1573 .isIgnored = false,
1574 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1575 .numberOfConsumers = 1,
1576 .scale = 0.0f,
1577 .type = TestOperandType::TENSOR_FLOAT16,
1578 .zeroPoint = 0
1579 }, { // param16
1580 .channelQuant = {},
1581 .data = TestBuffer::createFromVector<int32_t>({0}),
1582 .dimensions = {},
1583 .isIgnored = false,
1584 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1585 .numberOfConsumers = 1,
1586 .scale = 0.0f,
1587 .type = TestOperandType::INT32,
1588 .zeroPoint = 0
1589 }, { // exponent2_new
1590 .channelQuant = {},
1591 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.5f, 1.0f, 2.0f, 3.0f, 4.0f}),
1592 .dimensions = {3, 1, 2},
1593 .isIgnored = false,
1594 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1595 .numberOfConsumers = 1,
1596 .scale = 0.0f,
1597 .type = TestOperandType::TENSOR_FLOAT16,
1598 .zeroPoint = 0
1599 }, { // dummy17
1600 .channelQuant = {},
1601 .data = TestBuffer::createFromVector<_Float16>({0.0f}),
1602 .dimensions = {1},
1603 .isIgnored = false,
1604 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1605 .numberOfConsumers = 1,
1606 .scale = 0.0f,
1607 .type = TestOperandType::TENSOR_FLOAT16,
1608 .zeroPoint = 0
1609 }, { // param17
1610 .channelQuant = {},
1611 .data = TestBuffer::createFromVector<int32_t>({0}),
1612 .dimensions = {},
1613 .isIgnored = false,
1614 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1615 .numberOfConsumers = 1,
1616 .scale = 0.0f,
1617 .type = TestOperandType::INT32,
1618 .zeroPoint = 0
1619 }},
1620 .operations = {{
1621 .inputs = {3, 4, 5},
1622 .outputs = {0},
1623 .type = TestOperationType::ADD
1624 }, {
1625 .inputs = {6, 7, 8},
1626 .outputs = {1},
1627 .type = TestOperationType::ADD
1628 }, {
1629 .inputs = {0, 1},
1630 .outputs = {2},
1631 .type = TestOperationType::POW
1632 }},
1633 .outputIndexes = {2}
1634 },
1635 .minSupportedVersion = TestHalVersion::V1_2,
1636 .referenced = {}
1637 };
1638 return model;
1639 }
1640
1641 const auto dummy_test_model_float16_all_inputs_as_internal_3 = TestModelManager::get().add("pow_float16_all_inputs_as_internal_3", get_test_model_float16_all_inputs_as_internal_3());
1642
1643 } // namespace generated_tests::pow
1644
1645