1 // Generated from elu.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper; // NOLINT(google-build-using-namespace)
6
7 namespace generated_tests::elu {
8
get_test_model_alpha_one()9 const TestModel& get_test_model_alpha_one() {
10 static TestModel model = {
11 .main = {
12 .operands = {{ // input0
13 .type = TestOperandType::TENSOR_FLOAT32,
14 .dimensions = {8},
15 .numberOfConsumers = 1,
16 .scale = 0.0f,
17 .zeroPoint = 0,
18 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
19 .channelQuant = {},
20 .isIgnored = false,
21 .data = TestBuffer::createFromVector<float>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.1f})
22 }, { // alpha
23 .type = TestOperandType::FLOAT32,
24 .dimensions = {},
25 .numberOfConsumers = 1,
26 .scale = 0.0f,
27 .zeroPoint = 0,
28 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
29 .channelQuant = {},
30 .isIgnored = false,
31 .data = TestBuffer::createFromVector<float>({1.0f})
32 }, { // output0
33 .type = TestOperandType::TENSOR_FLOAT32,
34 .dimensions = {8},
35 .numberOfConsumers = 0,
36 .scale = 0.0f,
37 .zeroPoint = 0,
38 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
39 .channelQuant = {},
40 .isIgnored = false,
41 .data = TestBuffer::createFromVector<float>({0.0f, -0.997521f, 2.0f, -0.981684f, 3.0f, -0.864665f, 10.0f, -0.0951626f})
42 }},
43 .operations = {{
44 .type = TestOperationType::ELU,
45 .inputs = {0, 1},
46 .outputs = {2}
47 }},
48 .inputIndexes = {0},
49 .outputIndexes = {2}
50 },
51 .referenced = {},
52 .isRelaxed = false,
53 .expectedMultinomialDistributionTolerance = 0,
54 .expectFailure = false,
55 .minSupportedVersion = TestHalVersion::V1_3
56 };
57 return model;
58 }
59
60 const auto dummy_test_model_alpha_one = TestModelManager::get().add("elu_alpha_one", get_test_model_alpha_one());
61
62 } // namespace generated_tests::elu
63
64 namespace generated_tests::elu {
65
get_test_model_alpha_one_all_inputs_as_internal()66 const TestModel& get_test_model_alpha_one_all_inputs_as_internal() {
67 static TestModel model = {
68 .main = {
69 .operands = {{ // input0
70 .type = TestOperandType::TENSOR_FLOAT32,
71 .dimensions = {8},
72 .numberOfConsumers = 1,
73 .scale = 0.0f,
74 .zeroPoint = 0,
75 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
76 .channelQuant = {},
77 .isIgnored = false,
78 .data = TestBuffer::createFromVector<float>({})
79 }, { // alpha
80 .type = TestOperandType::FLOAT32,
81 .dimensions = {},
82 .numberOfConsumers = 1,
83 .scale = 0.0f,
84 .zeroPoint = 0,
85 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
86 .channelQuant = {},
87 .isIgnored = false,
88 .data = TestBuffer::createFromVector<float>({1.0f})
89 }, { // output0
90 .type = TestOperandType::TENSOR_FLOAT32,
91 .dimensions = {8},
92 .numberOfConsumers = 0,
93 .scale = 0.0f,
94 .zeroPoint = 0,
95 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
96 .channelQuant = {},
97 .isIgnored = false,
98 .data = TestBuffer::createFromVector<float>({0.0f, -0.997521f, 2.0f, -0.981684f, 3.0f, -0.864665f, 10.0f, -0.0951626f})
99 }, { // input0_new
100 .type = TestOperandType::TENSOR_FLOAT32,
101 .dimensions = {8},
102 .numberOfConsumers = 1,
103 .scale = 0.0f,
104 .zeroPoint = 0,
105 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
106 .channelQuant = {},
107 .isIgnored = false,
108 .data = TestBuffer::createFromVector<float>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.1f})
109 }, { // placeholder
110 .type = TestOperandType::TENSOR_FLOAT32,
111 .dimensions = {1},
112 .numberOfConsumers = 1,
113 .scale = 0.0f,
114 .zeroPoint = 0,
115 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
116 .channelQuant = {},
117 .isIgnored = false,
118 .data = TestBuffer::createFromVector<float>({0.0f})
119 }, { // param
120 .type = TestOperandType::INT32,
121 .dimensions = {},
122 .numberOfConsumers = 1,
123 .scale = 0.0f,
124 .zeroPoint = 0,
125 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
126 .channelQuant = {},
127 .isIgnored = false,
128 .data = TestBuffer::createFromVector<int32_t>({0})
129 }},
130 .operations = {{
131 .type = TestOperationType::ADD,
132 .inputs = {3, 4, 5},
133 .outputs = {0}
134 }, {
135 .type = TestOperationType::ELU,
136 .inputs = {0, 1},
137 .outputs = {2}
138 }},
139 .inputIndexes = {3},
140 .outputIndexes = {2}
141 },
142 .referenced = {},
143 .isRelaxed = false,
144 .expectedMultinomialDistributionTolerance = 0,
145 .expectFailure = false,
146 .minSupportedVersion = TestHalVersion::V1_3
147 };
148 return model;
149 }
150
151 const auto dummy_test_model_alpha_one_all_inputs_as_internal = TestModelManager::get().add("elu_alpha_one_all_inputs_as_internal", get_test_model_alpha_one_all_inputs_as_internal());
152
153 } // namespace generated_tests::elu
154
155 namespace generated_tests::elu {
156
get_test_model_alpha_one_float16()157 const TestModel& get_test_model_alpha_one_float16() {
158 static TestModel model = {
159 .main = {
160 .operands = {{ // input0
161 .type = TestOperandType::TENSOR_FLOAT16,
162 .dimensions = {8},
163 .numberOfConsumers = 1,
164 .scale = 0.0f,
165 .zeroPoint = 0,
166 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
167 .channelQuant = {},
168 .isIgnored = false,
169 .data = TestBuffer::createFromVector<_Float16>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.10000000149011612f})
170 }, { // alpha
171 .type = TestOperandType::FLOAT16,
172 .dimensions = {},
173 .numberOfConsumers = 1,
174 .scale = 0.0f,
175 .zeroPoint = 0,
176 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
177 .channelQuant = {},
178 .isIgnored = false,
179 .data = TestBuffer::createFromVector<_Float16>({1.0f})
180 }, { // output0
181 .type = TestOperandType::TENSOR_FLOAT16,
182 .dimensions = {8},
183 .numberOfConsumers = 0,
184 .scale = 0.0f,
185 .zeroPoint = 0,
186 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
187 .channelQuant = {},
188 .isIgnored = false,
189 .data = TestBuffer::createFromVector<_Float16>({0.0f, -0.9975209832191467f, 2.0f, -0.9816840291023254f, 3.0f, -0.8646649718284607f, 10.0f, -0.09516260027885437f})
190 }},
191 .operations = {{
192 .type = TestOperationType::ELU,
193 .inputs = {0, 1},
194 .outputs = {2}
195 }},
196 .inputIndexes = {0},
197 .outputIndexes = {2}
198 },
199 .referenced = {},
200 .isRelaxed = false,
201 .expectedMultinomialDistributionTolerance = 0,
202 .expectFailure = false,
203 .minSupportedVersion = TestHalVersion::V1_3
204 };
205 return model;
206 }
207
208 const auto dummy_test_model_alpha_one_float16 = TestModelManager::get().add("elu_alpha_one_float16", get_test_model_alpha_one_float16());
209
210 } // namespace generated_tests::elu
211
212 namespace generated_tests::elu {
213
get_test_model_alpha_one_float16_all_inputs_as_internal()214 const TestModel& get_test_model_alpha_one_float16_all_inputs_as_internal() {
215 static TestModel model = {
216 .main = {
217 .operands = {{ // input0
218 .type = TestOperandType::TENSOR_FLOAT16,
219 .dimensions = {8},
220 .numberOfConsumers = 1,
221 .scale = 0.0f,
222 .zeroPoint = 0,
223 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
224 .channelQuant = {},
225 .isIgnored = false,
226 .data = TestBuffer::createFromVector<_Float16>({})
227 }, { // alpha
228 .type = TestOperandType::FLOAT16,
229 .dimensions = {},
230 .numberOfConsumers = 1,
231 .scale = 0.0f,
232 .zeroPoint = 0,
233 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
234 .channelQuant = {},
235 .isIgnored = false,
236 .data = TestBuffer::createFromVector<_Float16>({1.0f})
237 }, { // output0
238 .type = TestOperandType::TENSOR_FLOAT16,
239 .dimensions = {8},
240 .numberOfConsumers = 0,
241 .scale = 0.0f,
242 .zeroPoint = 0,
243 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
244 .channelQuant = {},
245 .isIgnored = false,
246 .data = TestBuffer::createFromVector<_Float16>({0.0f, -0.9975209832191467f, 2.0f, -0.9816840291023254f, 3.0f, -0.8646649718284607f, 10.0f, -0.09516260027885437f})
247 }, { // input0_new
248 .type = TestOperandType::TENSOR_FLOAT16,
249 .dimensions = {8},
250 .numberOfConsumers = 1,
251 .scale = 0.0f,
252 .zeroPoint = 0,
253 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
254 .channelQuant = {},
255 .isIgnored = false,
256 .data = TestBuffer::createFromVector<_Float16>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.10000000149011612f})
257 }, { // placeholder1
258 .type = TestOperandType::TENSOR_FLOAT16,
259 .dimensions = {1},
260 .numberOfConsumers = 1,
261 .scale = 0.0f,
262 .zeroPoint = 0,
263 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
264 .channelQuant = {},
265 .isIgnored = false,
266 .data = TestBuffer::createFromVector<_Float16>({0.0f})
267 }, { // param1
268 .type = TestOperandType::INT32,
269 .dimensions = {},
270 .numberOfConsumers = 1,
271 .scale = 0.0f,
272 .zeroPoint = 0,
273 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
274 .channelQuant = {},
275 .isIgnored = false,
276 .data = TestBuffer::createFromVector<int32_t>({0})
277 }},
278 .operations = {{
279 .type = TestOperationType::ADD,
280 .inputs = {3, 4, 5},
281 .outputs = {0}
282 }, {
283 .type = TestOperationType::ELU,
284 .inputs = {0, 1},
285 .outputs = {2}
286 }},
287 .inputIndexes = {3},
288 .outputIndexes = {2}
289 },
290 .referenced = {},
291 .isRelaxed = false,
292 .expectedMultinomialDistributionTolerance = 0,
293 .expectFailure = false,
294 .minSupportedVersion = TestHalVersion::V1_3
295 };
296 return model;
297 }
298
299 const auto dummy_test_model_alpha_one_float16_all_inputs_as_internal = TestModelManager::get().add("elu_alpha_one_float16_all_inputs_as_internal", get_test_model_alpha_one_float16_all_inputs_as_internal());
300
301 } // namespace generated_tests::elu
302
303 namespace generated_tests::elu {
304
get_test_model_alpha_one_relaxed()305 const TestModel& get_test_model_alpha_one_relaxed() {
306 static TestModel model = {
307 .main = {
308 .operands = {{ // input0
309 .type = TestOperandType::TENSOR_FLOAT32,
310 .dimensions = {8},
311 .numberOfConsumers = 1,
312 .scale = 0.0f,
313 .zeroPoint = 0,
314 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
315 .channelQuant = {},
316 .isIgnored = false,
317 .data = TestBuffer::createFromVector<float>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.1f})
318 }, { // alpha
319 .type = TestOperandType::FLOAT32,
320 .dimensions = {},
321 .numberOfConsumers = 1,
322 .scale = 0.0f,
323 .zeroPoint = 0,
324 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
325 .channelQuant = {},
326 .isIgnored = false,
327 .data = TestBuffer::createFromVector<float>({1.0f})
328 }, { // output0
329 .type = TestOperandType::TENSOR_FLOAT32,
330 .dimensions = {8},
331 .numberOfConsumers = 0,
332 .scale = 0.0f,
333 .zeroPoint = 0,
334 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
335 .channelQuant = {},
336 .isIgnored = false,
337 .data = TestBuffer::createFromVector<float>({0.0f, -0.997521f, 2.0f, -0.981684f, 3.0f, -0.864665f, 10.0f, -0.0951626f})
338 }},
339 .operations = {{
340 .type = TestOperationType::ELU,
341 .inputs = {0, 1},
342 .outputs = {2}
343 }},
344 .inputIndexes = {0},
345 .outputIndexes = {2}
346 },
347 .referenced = {},
348 .isRelaxed = true,
349 .expectedMultinomialDistributionTolerance = 0,
350 .expectFailure = false,
351 .minSupportedVersion = TestHalVersion::UNKNOWN
352 };
353 return model;
354 }
355
356 const auto dummy_test_model_alpha_one_relaxed = TestModelManager::get().add("elu_alpha_one_relaxed", get_test_model_alpha_one_relaxed());
357
358 } // namespace generated_tests::elu
359
360 namespace generated_tests::elu {
361
get_test_model_alpha_one_relaxed_all_inputs_as_internal()362 const TestModel& get_test_model_alpha_one_relaxed_all_inputs_as_internal() {
363 static TestModel model = {
364 .main = {
365 .operands = {{ // input0
366 .type = TestOperandType::TENSOR_FLOAT32,
367 .dimensions = {8},
368 .numberOfConsumers = 1,
369 .scale = 0.0f,
370 .zeroPoint = 0,
371 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
372 .channelQuant = {},
373 .isIgnored = false,
374 .data = TestBuffer::createFromVector<float>({})
375 }, { // alpha
376 .type = TestOperandType::FLOAT32,
377 .dimensions = {},
378 .numberOfConsumers = 1,
379 .scale = 0.0f,
380 .zeroPoint = 0,
381 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
382 .channelQuant = {},
383 .isIgnored = false,
384 .data = TestBuffer::createFromVector<float>({1.0f})
385 }, { // output0
386 .type = TestOperandType::TENSOR_FLOAT32,
387 .dimensions = {8},
388 .numberOfConsumers = 0,
389 .scale = 0.0f,
390 .zeroPoint = 0,
391 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
392 .channelQuant = {},
393 .isIgnored = false,
394 .data = TestBuffer::createFromVector<float>({0.0f, -0.997521f, 2.0f, -0.981684f, 3.0f, -0.864665f, 10.0f, -0.0951626f})
395 }, { // input0_new
396 .type = TestOperandType::TENSOR_FLOAT32,
397 .dimensions = {8},
398 .numberOfConsumers = 1,
399 .scale = 0.0f,
400 .zeroPoint = 0,
401 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
402 .channelQuant = {},
403 .isIgnored = false,
404 .data = TestBuffer::createFromVector<float>({0.0f, -6.0f, 2.0f, -4.0f, 3.0f, -2.0f, 10.0f, -0.1f})
405 }, { // placeholder2
406 .type = TestOperandType::TENSOR_FLOAT32,
407 .dimensions = {1},
408 .numberOfConsumers = 1,
409 .scale = 0.0f,
410 .zeroPoint = 0,
411 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
412 .channelQuant = {},
413 .isIgnored = false,
414 .data = TestBuffer::createFromVector<float>({0.0f})
415 }, { // param2
416 .type = TestOperandType::INT32,
417 .dimensions = {},
418 .numberOfConsumers = 1,
419 .scale = 0.0f,
420 .zeroPoint = 0,
421 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
422 .channelQuant = {},
423 .isIgnored = false,
424 .data = TestBuffer::createFromVector<int32_t>({0})
425 }},
426 .operations = {{
427 .type = TestOperationType::ADD,
428 .inputs = {3, 4, 5},
429 .outputs = {0}
430 }, {
431 .type = TestOperationType::ELU,
432 .inputs = {0, 1},
433 .outputs = {2}
434 }},
435 .inputIndexes = {3},
436 .outputIndexes = {2}
437 },
438 .referenced = {},
439 .isRelaxed = true,
440 .expectedMultinomialDistributionTolerance = 0,
441 .expectFailure = false,
442 .minSupportedVersion = TestHalVersion::UNKNOWN
443 };
444 return model;
445 }
446
447 const auto dummy_test_model_alpha_one_relaxed_all_inputs_as_internal = TestModelManager::get().add("elu_alpha_one_relaxed_all_inputs_as_internal", get_test_model_alpha_one_relaxed_all_inputs_as_internal());
448
449 } // namespace generated_tests::elu
450
451 namespace generated_tests::elu {
452
get_test_model_alpha01()453 const TestModel& get_test_model_alpha01() {
454 static TestModel model = {
455 .main = {
456 .operands = {{ // input01
457 .type = TestOperandType::TENSOR_FLOAT32,
458 .dimensions = {2, 2},
459 .numberOfConsumers = 1,
460 .scale = 0.0f,
461 .zeroPoint = 0,
462 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
463 .channelQuant = {},
464 .isIgnored = false,
465 .data = TestBuffer::createFromVector<float>({-0.2f, -0.1f, 0.0f, 0.1f})
466 }, { // alpha1
467 .type = TestOperandType::FLOAT32,
468 .dimensions = {},
469 .numberOfConsumers = 1,
470 .scale = 0.0f,
471 .zeroPoint = 0,
472 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
473 .channelQuant = {},
474 .isIgnored = false,
475 .data = TestBuffer::createFromVector<float>({0.1f})
476 }, { // output01
477 .type = TestOperandType::TENSOR_FLOAT32,
478 .dimensions = {2, 2},
479 .numberOfConsumers = 0,
480 .scale = 0.0f,
481 .zeroPoint = 0,
482 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
483 .channelQuant = {},
484 .isIgnored = false,
485 .data = TestBuffer::createFromVector<float>({-0.018127f, -0.009516f, 0.0f, 0.1f})
486 }},
487 .operations = {{
488 .type = TestOperationType::ELU,
489 .inputs = {0, 1},
490 .outputs = {2}
491 }},
492 .inputIndexes = {0},
493 .outputIndexes = {2}
494 },
495 .referenced = {},
496 .isRelaxed = false,
497 .expectedMultinomialDistributionTolerance = 0,
498 .expectFailure = false,
499 .minSupportedVersion = TestHalVersion::V1_3
500 };
501 return model;
502 }
503
504 const auto dummy_test_model_alpha01 = TestModelManager::get().add("elu_alpha01", get_test_model_alpha01());
505
506 } // namespace generated_tests::elu
507
508 namespace generated_tests::elu {
509
get_test_model_alpha01_all_inputs_as_internal()510 const TestModel& get_test_model_alpha01_all_inputs_as_internal() {
511 static TestModel model = {
512 .main = {
513 .operands = {{ // input01
514 .type = TestOperandType::TENSOR_FLOAT32,
515 .dimensions = {2, 2},
516 .numberOfConsumers = 1,
517 .scale = 0.0f,
518 .zeroPoint = 0,
519 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
520 .channelQuant = {},
521 .isIgnored = false,
522 .data = TestBuffer::createFromVector<float>({})
523 }, { // alpha1
524 .type = TestOperandType::FLOAT32,
525 .dimensions = {},
526 .numberOfConsumers = 1,
527 .scale = 0.0f,
528 .zeroPoint = 0,
529 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
530 .channelQuant = {},
531 .isIgnored = false,
532 .data = TestBuffer::createFromVector<float>({0.1f})
533 }, { // output01
534 .type = TestOperandType::TENSOR_FLOAT32,
535 .dimensions = {2, 2},
536 .numberOfConsumers = 0,
537 .scale = 0.0f,
538 .zeroPoint = 0,
539 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
540 .channelQuant = {},
541 .isIgnored = false,
542 .data = TestBuffer::createFromVector<float>({-0.018127f, -0.009516f, 0.0f, 0.1f})
543 }, { // input01_new
544 .type = TestOperandType::TENSOR_FLOAT32,
545 .dimensions = {2, 2},
546 .numberOfConsumers = 1,
547 .scale = 0.0f,
548 .zeroPoint = 0,
549 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
550 .channelQuant = {},
551 .isIgnored = false,
552 .data = TestBuffer::createFromVector<float>({-0.2f, -0.1f, 0.0f, 0.1f})
553 }, { // placeholder3
554 .type = TestOperandType::TENSOR_FLOAT32,
555 .dimensions = {1},
556 .numberOfConsumers = 1,
557 .scale = 0.0f,
558 .zeroPoint = 0,
559 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
560 .channelQuant = {},
561 .isIgnored = false,
562 .data = TestBuffer::createFromVector<float>({0.0f})
563 }, { // param3
564 .type = TestOperandType::INT32,
565 .dimensions = {},
566 .numberOfConsumers = 1,
567 .scale = 0.0f,
568 .zeroPoint = 0,
569 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
570 .channelQuant = {},
571 .isIgnored = false,
572 .data = TestBuffer::createFromVector<int32_t>({0})
573 }},
574 .operations = {{
575 .type = TestOperationType::ADD,
576 .inputs = {3, 4, 5},
577 .outputs = {0}
578 }, {
579 .type = TestOperationType::ELU,
580 .inputs = {0, 1},
581 .outputs = {2}
582 }},
583 .inputIndexes = {3},
584 .outputIndexes = {2}
585 },
586 .referenced = {},
587 .isRelaxed = false,
588 .expectedMultinomialDistributionTolerance = 0,
589 .expectFailure = false,
590 .minSupportedVersion = TestHalVersion::V1_3
591 };
592 return model;
593 }
594
595 const auto dummy_test_model_alpha01_all_inputs_as_internal = TestModelManager::get().add("elu_alpha01_all_inputs_as_internal", get_test_model_alpha01_all_inputs_as_internal());
596
597 } // namespace generated_tests::elu
598
599 namespace generated_tests::elu {
600
get_test_model_alpha01_float16()601 const TestModel& get_test_model_alpha01_float16() {
602 static TestModel model = {
603 .main = {
604 .operands = {{ // input01
605 .type = TestOperandType::TENSOR_FLOAT16,
606 .dimensions = {2, 2},
607 .numberOfConsumers = 1,
608 .scale = 0.0f,
609 .zeroPoint = 0,
610 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
611 .channelQuant = {},
612 .isIgnored = false,
613 .data = TestBuffer::createFromVector<_Float16>({-0.20000000298023224f, -0.10000000149011612f, 0.0f, 0.10000000149011612f})
614 }, { // alpha1
615 .type = TestOperandType::FLOAT16,
616 .dimensions = {},
617 .numberOfConsumers = 1,
618 .scale = 0.0f,
619 .zeroPoint = 0,
620 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
621 .channelQuant = {},
622 .isIgnored = false,
623 .data = TestBuffer::createFromVector<_Float16>({0.10000000149011612f})
624 }, { // output01
625 .type = TestOperandType::TENSOR_FLOAT16,
626 .dimensions = {2, 2},
627 .numberOfConsumers = 0,
628 .scale = 0.0f,
629 .zeroPoint = 0,
630 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
631 .channelQuant = {},
632 .isIgnored = false,
633 .data = TestBuffer::createFromVector<_Float16>({-0.018126999959349632f, -0.00951599981635809f, 0.0f, 0.10000000149011612f})
634 }},
635 .operations = {{
636 .type = TestOperationType::ELU,
637 .inputs = {0, 1},
638 .outputs = {2}
639 }},
640 .inputIndexes = {0},
641 .outputIndexes = {2}
642 },
643 .referenced = {},
644 .isRelaxed = false,
645 .expectedMultinomialDistributionTolerance = 0,
646 .expectFailure = false,
647 .minSupportedVersion = TestHalVersion::V1_3
648 };
649 return model;
650 }
651
652 const auto dummy_test_model_alpha01_float16 = TestModelManager::get().add("elu_alpha01_float16", get_test_model_alpha01_float16());
653
654 } // namespace generated_tests::elu
655
656 namespace generated_tests::elu {
657
get_test_model_alpha01_float16_all_inputs_as_internal()658 const TestModel& get_test_model_alpha01_float16_all_inputs_as_internal() {
659 static TestModel model = {
660 .main = {
661 .operands = {{ // input01
662 .type = TestOperandType::TENSOR_FLOAT16,
663 .dimensions = {2, 2},
664 .numberOfConsumers = 1,
665 .scale = 0.0f,
666 .zeroPoint = 0,
667 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
668 .channelQuant = {},
669 .isIgnored = false,
670 .data = TestBuffer::createFromVector<_Float16>({})
671 }, { // alpha1
672 .type = TestOperandType::FLOAT16,
673 .dimensions = {},
674 .numberOfConsumers = 1,
675 .scale = 0.0f,
676 .zeroPoint = 0,
677 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
678 .channelQuant = {},
679 .isIgnored = false,
680 .data = TestBuffer::createFromVector<_Float16>({0.10000000149011612f})
681 }, { // output01
682 .type = TestOperandType::TENSOR_FLOAT16,
683 .dimensions = {2, 2},
684 .numberOfConsumers = 0,
685 .scale = 0.0f,
686 .zeroPoint = 0,
687 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
688 .channelQuant = {},
689 .isIgnored = false,
690 .data = TestBuffer::createFromVector<_Float16>({-0.018126999959349632f, -0.00951599981635809f, 0.0f, 0.10000000149011612f})
691 }, { // input01_new
692 .type = TestOperandType::TENSOR_FLOAT16,
693 .dimensions = {2, 2},
694 .numberOfConsumers = 1,
695 .scale = 0.0f,
696 .zeroPoint = 0,
697 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
698 .channelQuant = {},
699 .isIgnored = false,
700 .data = TestBuffer::createFromVector<_Float16>({-0.20000000298023224f, -0.10000000149011612f, 0.0f, 0.10000000149011612f})
701 }, { // placeholder4
702 .type = TestOperandType::TENSOR_FLOAT16,
703 .dimensions = {1},
704 .numberOfConsumers = 1,
705 .scale = 0.0f,
706 .zeroPoint = 0,
707 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
708 .channelQuant = {},
709 .isIgnored = false,
710 .data = TestBuffer::createFromVector<_Float16>({0.0f})
711 }, { // param4
712 .type = TestOperandType::INT32,
713 .dimensions = {},
714 .numberOfConsumers = 1,
715 .scale = 0.0f,
716 .zeroPoint = 0,
717 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
718 .channelQuant = {},
719 .isIgnored = false,
720 .data = TestBuffer::createFromVector<int32_t>({0})
721 }},
722 .operations = {{
723 .type = TestOperationType::ADD,
724 .inputs = {3, 4, 5},
725 .outputs = {0}
726 }, {
727 .type = TestOperationType::ELU,
728 .inputs = {0, 1},
729 .outputs = {2}
730 }},
731 .inputIndexes = {3},
732 .outputIndexes = {2}
733 },
734 .referenced = {},
735 .isRelaxed = false,
736 .expectedMultinomialDistributionTolerance = 0,
737 .expectFailure = false,
738 .minSupportedVersion = TestHalVersion::V1_3
739 };
740 return model;
741 }
742
743 const auto dummy_test_model_alpha01_float16_all_inputs_as_internal = TestModelManager::get().add("elu_alpha01_float16_all_inputs_as_internal", get_test_model_alpha01_float16_all_inputs_as_internal());
744
745 } // namespace generated_tests::elu
746
747 namespace generated_tests::elu {
748
get_test_model_alpha01_relaxed()749 const TestModel& get_test_model_alpha01_relaxed() {
750 static TestModel model = {
751 .main = {
752 .operands = {{ // input01
753 .type = TestOperandType::TENSOR_FLOAT32,
754 .dimensions = {2, 2},
755 .numberOfConsumers = 1,
756 .scale = 0.0f,
757 .zeroPoint = 0,
758 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
759 .channelQuant = {},
760 .isIgnored = false,
761 .data = TestBuffer::createFromVector<float>({-0.2f, -0.1f, 0.0f, 0.1f})
762 }, { // alpha1
763 .type = TestOperandType::FLOAT32,
764 .dimensions = {},
765 .numberOfConsumers = 1,
766 .scale = 0.0f,
767 .zeroPoint = 0,
768 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
769 .channelQuant = {},
770 .isIgnored = false,
771 .data = TestBuffer::createFromVector<float>({0.1f})
772 }, { // output01
773 .type = TestOperandType::TENSOR_FLOAT32,
774 .dimensions = {2, 2},
775 .numberOfConsumers = 0,
776 .scale = 0.0f,
777 .zeroPoint = 0,
778 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
779 .channelQuant = {},
780 .isIgnored = false,
781 .data = TestBuffer::createFromVector<float>({-0.018127f, -0.009516f, 0.0f, 0.1f})
782 }},
783 .operations = {{
784 .type = TestOperationType::ELU,
785 .inputs = {0, 1},
786 .outputs = {2}
787 }},
788 .inputIndexes = {0},
789 .outputIndexes = {2}
790 },
791 .referenced = {},
792 .isRelaxed = true,
793 .expectedMultinomialDistributionTolerance = 0,
794 .expectFailure = false,
795 .minSupportedVersion = TestHalVersion::UNKNOWN
796 };
797 return model;
798 }
799
800 const auto dummy_test_model_alpha01_relaxed = TestModelManager::get().add("elu_alpha01_relaxed", get_test_model_alpha01_relaxed());
801
802 } // namespace generated_tests::elu
803
804 namespace generated_tests::elu {
805
get_test_model_alpha01_relaxed_all_inputs_as_internal()806 const TestModel& get_test_model_alpha01_relaxed_all_inputs_as_internal() {
807 static TestModel model = {
808 .main = {
809 .operands = {{ // input01
810 .type = TestOperandType::TENSOR_FLOAT32,
811 .dimensions = {2, 2},
812 .numberOfConsumers = 1,
813 .scale = 0.0f,
814 .zeroPoint = 0,
815 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
816 .channelQuant = {},
817 .isIgnored = false,
818 .data = TestBuffer::createFromVector<float>({})
819 }, { // alpha1
820 .type = TestOperandType::FLOAT32,
821 .dimensions = {},
822 .numberOfConsumers = 1,
823 .scale = 0.0f,
824 .zeroPoint = 0,
825 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
826 .channelQuant = {},
827 .isIgnored = false,
828 .data = TestBuffer::createFromVector<float>({0.1f})
829 }, { // output01
830 .type = TestOperandType::TENSOR_FLOAT32,
831 .dimensions = {2, 2},
832 .numberOfConsumers = 0,
833 .scale = 0.0f,
834 .zeroPoint = 0,
835 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
836 .channelQuant = {},
837 .isIgnored = false,
838 .data = TestBuffer::createFromVector<float>({-0.018127f, -0.009516f, 0.0f, 0.1f})
839 }, { // input01_new
840 .type = TestOperandType::TENSOR_FLOAT32,
841 .dimensions = {2, 2},
842 .numberOfConsumers = 1,
843 .scale = 0.0f,
844 .zeroPoint = 0,
845 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
846 .channelQuant = {},
847 .isIgnored = false,
848 .data = TestBuffer::createFromVector<float>({-0.2f, -0.1f, 0.0f, 0.1f})
849 }, { // placeholder5
850 .type = TestOperandType::TENSOR_FLOAT32,
851 .dimensions = {1},
852 .numberOfConsumers = 1,
853 .scale = 0.0f,
854 .zeroPoint = 0,
855 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
856 .channelQuant = {},
857 .isIgnored = false,
858 .data = TestBuffer::createFromVector<float>({0.0f})
859 }, { // param5
860 .type = TestOperandType::INT32,
861 .dimensions = {},
862 .numberOfConsumers = 1,
863 .scale = 0.0f,
864 .zeroPoint = 0,
865 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
866 .channelQuant = {},
867 .isIgnored = false,
868 .data = TestBuffer::createFromVector<int32_t>({0})
869 }},
870 .operations = {{
871 .type = TestOperationType::ADD,
872 .inputs = {3, 4, 5},
873 .outputs = {0}
874 }, {
875 .type = TestOperationType::ELU,
876 .inputs = {0, 1},
877 .outputs = {2}
878 }},
879 .inputIndexes = {3},
880 .outputIndexes = {2}
881 },
882 .referenced = {},
883 .isRelaxed = true,
884 .expectedMultinomialDistributionTolerance = 0,
885 .expectFailure = false,
886 .minSupportedVersion = TestHalVersion::UNKNOWN
887 };
888 return model;
889 }
890
891 const auto dummy_test_model_alpha01_relaxed_all_inputs_as_internal = TestModelManager::get().add("elu_alpha01_relaxed_all_inputs_as_internal", get_test_model_alpha01_relaxed_all_inputs_as_internal());
892
893 } // namespace generated_tests::elu
894
895 namespace generated_tests::elu {
896
get_test_model_alpha10()897 const TestModel& get_test_model_alpha10() {
898 static TestModel model = {
899 .main = {
900 .operands = {{ // input02
901 .type = TestOperandType::TENSOR_FLOAT32,
902 .dimensions = {2, 1, 1, 1, 2},
903 .numberOfConsumers = 1,
904 .scale = 0.0f,
905 .zeroPoint = 0,
906 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
907 .channelQuant = {},
908 .isIgnored = false,
909 .data = TestBuffer::createFromVector<float>({-10.0f, -5.0f, 0.0f, 5.0f})
910 }, { // alpha2
911 .type = TestOperandType::FLOAT32,
912 .dimensions = {},
913 .numberOfConsumers = 1,
914 .scale = 0.0f,
915 .zeroPoint = 0,
916 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
917 .channelQuant = {},
918 .isIgnored = false,
919 .data = TestBuffer::createFromVector<float>({10.0f})
920 }, { // output02
921 .type = TestOperandType::TENSOR_FLOAT32,
922 .dimensions = {2, 1, 1, 1, 2},
923 .numberOfConsumers = 0,
924 .scale = 0.0f,
925 .zeroPoint = 0,
926 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
927 .channelQuant = {},
928 .isIgnored = false,
929 .data = TestBuffer::createFromVector<float>({-9.999546f, -9.93262f, 0.0f, 5.0f})
930 }},
931 .operations = {{
932 .type = TestOperationType::ELU,
933 .inputs = {0, 1},
934 .outputs = {2}
935 }},
936 .inputIndexes = {0},
937 .outputIndexes = {2}
938 },
939 .referenced = {},
940 .isRelaxed = false,
941 .expectedMultinomialDistributionTolerance = 0,
942 .expectFailure = false,
943 .minSupportedVersion = TestHalVersion::V1_3
944 };
945 return model;
946 }
947
948 const auto dummy_test_model_alpha10 = TestModelManager::get().add("elu_alpha10", get_test_model_alpha10());
949
950 } // namespace generated_tests::elu
951
952 namespace generated_tests::elu {
953
get_test_model_alpha10_float16()954 const TestModel& get_test_model_alpha10_float16() {
955 static TestModel model = {
956 .main = {
957 .operands = {{ // input02
958 .type = TestOperandType::TENSOR_FLOAT16,
959 .dimensions = {2, 1, 1, 1, 2},
960 .numberOfConsumers = 1,
961 .scale = 0.0f,
962 .zeroPoint = 0,
963 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
964 .channelQuant = {},
965 .isIgnored = false,
966 .data = TestBuffer::createFromVector<_Float16>({-10.0f, -5.0f, 0.0f, 5.0f})
967 }, { // alpha2
968 .type = TestOperandType::FLOAT16,
969 .dimensions = {},
970 .numberOfConsumers = 1,
971 .scale = 0.0f,
972 .zeroPoint = 0,
973 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
974 .channelQuant = {},
975 .isIgnored = false,
976 .data = TestBuffer::createFromVector<_Float16>({10.0f})
977 }, { // output02
978 .type = TestOperandType::TENSOR_FLOAT16,
979 .dimensions = {2, 1, 1, 1, 2},
980 .numberOfConsumers = 0,
981 .scale = 0.0f,
982 .zeroPoint = 0,
983 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
984 .channelQuant = {},
985 .isIgnored = false,
986 .data = TestBuffer::createFromVector<_Float16>({-9.99954605102539f, -9.93262004852295f, 0.0f, 5.0f})
987 }},
988 .operations = {{
989 .type = TestOperationType::ELU,
990 .inputs = {0, 1},
991 .outputs = {2}
992 }},
993 .inputIndexes = {0},
994 .outputIndexes = {2}
995 },
996 .referenced = {},
997 .isRelaxed = false,
998 .expectedMultinomialDistributionTolerance = 0,
999 .expectFailure = false,
1000 .minSupportedVersion = TestHalVersion::V1_3
1001 };
1002 return model;
1003 }
1004
1005 const auto dummy_test_model_alpha10_float16 = TestModelManager::get().add("elu_alpha10_float16", get_test_model_alpha10_float16());
1006
1007 } // namespace generated_tests::elu
1008
1009 namespace generated_tests::elu {
1010
get_test_model_alpha10_relaxed()1011 const TestModel& get_test_model_alpha10_relaxed() {
1012 static TestModel model = {
1013 .main = {
1014 .operands = {{ // input02
1015 .type = TestOperandType::TENSOR_FLOAT32,
1016 .dimensions = {2, 1, 1, 1, 2},
1017 .numberOfConsumers = 1,
1018 .scale = 0.0f,
1019 .zeroPoint = 0,
1020 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1021 .channelQuant = {},
1022 .isIgnored = false,
1023 .data = TestBuffer::createFromVector<float>({-10.0f, -5.0f, 0.0f, 5.0f})
1024 }, { // alpha2
1025 .type = TestOperandType::FLOAT32,
1026 .dimensions = {},
1027 .numberOfConsumers = 1,
1028 .scale = 0.0f,
1029 .zeroPoint = 0,
1030 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1031 .channelQuant = {},
1032 .isIgnored = false,
1033 .data = TestBuffer::createFromVector<float>({10.0f})
1034 }, { // output02
1035 .type = TestOperandType::TENSOR_FLOAT32,
1036 .dimensions = {2, 1, 1, 1, 2},
1037 .numberOfConsumers = 0,
1038 .scale = 0.0f,
1039 .zeroPoint = 0,
1040 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1041 .channelQuant = {},
1042 .isIgnored = false,
1043 .data = TestBuffer::createFromVector<float>({-9.999546f, -9.93262f, 0.0f, 5.0f})
1044 }},
1045 .operations = {{
1046 .type = TestOperationType::ELU,
1047 .inputs = {0, 1},
1048 .outputs = {2}
1049 }},
1050 .inputIndexes = {0},
1051 .outputIndexes = {2}
1052 },
1053 .referenced = {},
1054 .isRelaxed = true,
1055 .expectedMultinomialDistributionTolerance = 0,
1056 .expectFailure = false,
1057 .minSupportedVersion = TestHalVersion::UNKNOWN
1058 };
1059 return model;
1060 }
1061
1062 const auto dummy_test_model_alpha10_relaxed = TestModelManager::get().add("elu_alpha10_relaxed", get_test_model_alpha10_relaxed());
1063
1064 } // namespace generated_tests::elu
1065
1066