1 // Generated from prelu.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::prelu {
8
get_test_model()9 const TestModel& get_test_model() {
10 static TestModel model = {
11 .main = {
12 .operands = {{ // input
13 .type = TestOperandType::TENSOR_FLOAT32,
14 .dimensions = {1, 2, 2, 3},
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, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
22 }, { // alpha
23 .type = TestOperandType::TENSOR_FLOAT32,
24 .dimensions = {1, 1, 3},
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>({0.0f, 1.0f, 2.0f})
32 }, { // output
33 .type = TestOperandType::TENSOR_FLOAT32,
34 .dimensions = {1, 2, 2, 3},
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.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
42 }},
43 .operations = {{
44 .type = TestOperationType::PRELU,
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_2
56 };
57 return model;
58 }
59
60 const auto dummy_test_model = TestModelManager::get().add("prelu", get_test_model());
61
62 } // namespace generated_tests::prelu
63
64 namespace generated_tests::prelu {
65
get_test_model_all_inputs_as_internal()66 const TestModel& get_test_model_all_inputs_as_internal() {
67 static TestModel model = {
68 .main = {
69 .operands = {{ // input
70 .type = TestOperandType::TENSOR_FLOAT32,
71 .dimensions = {1, 2, 2, 3},
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::TENSOR_FLOAT32,
81 .dimensions = {1, 1, 3},
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>({0.0f, 1.0f, 2.0f})
89 }, { // output
90 .type = TestOperandType::TENSOR_FLOAT32,
91 .dimensions = {1, 2, 2, 3},
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.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
99 }, { // input_new
100 .type = TestOperandType::TENSOR_FLOAT32,
101 .dimensions = {1, 2, 2, 3},
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, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
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::PRELU,
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_2
147 };
148 return model;
149 }
150
151 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("prelu_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
152
153 } // namespace generated_tests::prelu
154
155 namespace generated_tests::prelu {
156
get_test_model_all_tensors_as_inputs()157 const TestModel& get_test_model_all_tensors_as_inputs() {
158 static TestModel model = {
159 .main = {
160 .operands = {{ // input
161 .type = TestOperandType::TENSOR_FLOAT32,
162 .dimensions = {1, 2, 2, 3},
163 .numberOfConsumers = 1,
164 .scale = 0.0f,
165 .zeroPoint = 0,
166 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
167 .channelQuant = {},
168 .isIgnored = false,
169 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
170 }, { // alpha
171 .type = TestOperandType::TENSOR_FLOAT32,
172 .dimensions = {1, 1, 3},
173 .numberOfConsumers = 1,
174 .scale = 0.0f,
175 .zeroPoint = 0,
176 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
177 .channelQuant = {},
178 .isIgnored = false,
179 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
180 }, { // output
181 .type = TestOperandType::TENSOR_FLOAT32,
182 .dimensions = {1, 2, 2, 3},
183 .numberOfConsumers = 0,
184 .scale = 0.0f,
185 .zeroPoint = 0,
186 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
187 .channelQuant = {},
188 .isIgnored = false,
189 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
190 }},
191 .operations = {{
192 .type = TestOperationType::PRELU,
193 .inputs = {0, 1},
194 .outputs = {2}
195 }},
196 .inputIndexes = {0, 1},
197 .outputIndexes = {2}
198 },
199 .referenced = {},
200 .isRelaxed = false,
201 .expectedMultinomialDistributionTolerance = 0,
202 .expectFailure = false,
203 .minSupportedVersion = TestHalVersion::V1_2
204 };
205 return model;
206 }
207
208 const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("prelu_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs());
209
210 } // namespace generated_tests::prelu
211
212 namespace generated_tests::prelu {
213
get_test_model_all_tensors_as_inputs_all_inputs_as_internal()214 const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() {
215 static TestModel model = {
216 .main = {
217 .operands = {{ // input
218 .type = TestOperandType::TENSOR_FLOAT32,
219 .dimensions = {1, 2, 2, 3},
220 .numberOfConsumers = 1,
221 .scale = 0.0f,
222 .zeroPoint = 0,
223 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
224 .channelQuant = {},
225 .isIgnored = false,
226 .data = TestBuffer::createFromVector<float>({})
227 }, { // alpha
228 .type = TestOperandType::TENSOR_FLOAT32,
229 .dimensions = {1, 1, 3},
230 .numberOfConsumers = 1,
231 .scale = 0.0f,
232 .zeroPoint = 0,
233 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
234 .channelQuant = {},
235 .isIgnored = false,
236 .data = TestBuffer::createFromVector<float>({})
237 }, { // output
238 .type = TestOperandType::TENSOR_FLOAT32,
239 .dimensions = {1, 2, 2, 3},
240 .numberOfConsumers = 0,
241 .scale = 0.0f,
242 .zeroPoint = 0,
243 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
244 .channelQuant = {},
245 .isIgnored = false,
246 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
247 }, { // input_new
248 .type = TestOperandType::TENSOR_FLOAT32,
249 .dimensions = {1, 2, 2, 3},
250 .numberOfConsumers = 1,
251 .scale = 0.0f,
252 .zeroPoint = 0,
253 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
254 .channelQuant = {},
255 .isIgnored = false,
256 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
257 }, { // placeholder1
258 .type = TestOperandType::TENSOR_FLOAT32,
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<float>({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 }, { // alpha_new
278 .type = TestOperandType::TENSOR_FLOAT32,
279 .dimensions = {1, 1, 3},
280 .numberOfConsumers = 1,
281 .scale = 0.0f,
282 .zeroPoint = 0,
283 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
284 .channelQuant = {},
285 .isIgnored = false,
286 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
287 }, { // placeholder2
288 .type = TestOperandType::TENSOR_FLOAT32,
289 .dimensions = {1},
290 .numberOfConsumers = 1,
291 .scale = 0.0f,
292 .zeroPoint = 0,
293 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
294 .channelQuant = {},
295 .isIgnored = false,
296 .data = TestBuffer::createFromVector<float>({0.0f})
297 }, { // param2
298 .type = TestOperandType::INT32,
299 .dimensions = {},
300 .numberOfConsumers = 1,
301 .scale = 0.0f,
302 .zeroPoint = 0,
303 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
304 .channelQuant = {},
305 .isIgnored = false,
306 .data = TestBuffer::createFromVector<int32_t>({0})
307 }},
308 .operations = {{
309 .type = TestOperationType::ADD,
310 .inputs = {3, 4, 5},
311 .outputs = {0}
312 }, {
313 .type = TestOperationType::ADD,
314 .inputs = {6, 7, 8},
315 .outputs = {1}
316 }, {
317 .type = TestOperationType::PRELU,
318 .inputs = {0, 1},
319 .outputs = {2}
320 }},
321 .inputIndexes = {3, 6},
322 .outputIndexes = {2}
323 },
324 .referenced = {},
325 .isRelaxed = false,
326 .expectedMultinomialDistributionTolerance = 0,
327 .expectFailure = false,
328 .minSupportedVersion = TestHalVersion::V1_2
329 };
330 return model;
331 }
332
333 const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal());
334
335 } // namespace generated_tests::prelu
336
337 namespace generated_tests::prelu {
338
get_test_model_relaxed()339 const TestModel& get_test_model_relaxed() {
340 static TestModel model = {
341 .main = {
342 .operands = {{ // input
343 .type = TestOperandType::TENSOR_FLOAT32,
344 .dimensions = {1, 2, 2, 3},
345 .numberOfConsumers = 1,
346 .scale = 0.0f,
347 .zeroPoint = 0,
348 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
349 .channelQuant = {},
350 .isIgnored = false,
351 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
352 }, { // alpha
353 .type = TestOperandType::TENSOR_FLOAT32,
354 .dimensions = {1, 1, 3},
355 .numberOfConsumers = 1,
356 .scale = 0.0f,
357 .zeroPoint = 0,
358 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
359 .channelQuant = {},
360 .isIgnored = false,
361 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
362 }, { // output
363 .type = TestOperandType::TENSOR_FLOAT32,
364 .dimensions = {1, 2, 2, 3},
365 .numberOfConsumers = 0,
366 .scale = 0.0f,
367 .zeroPoint = 0,
368 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
369 .channelQuant = {},
370 .isIgnored = false,
371 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
372 }},
373 .operations = {{
374 .type = TestOperationType::PRELU,
375 .inputs = {0, 1},
376 .outputs = {2}
377 }},
378 .inputIndexes = {0},
379 .outputIndexes = {2}
380 },
381 .referenced = {},
382 .isRelaxed = true,
383 .expectedMultinomialDistributionTolerance = 0,
384 .expectFailure = false,
385 .minSupportedVersion = TestHalVersion::UNKNOWN
386 };
387 return model;
388 }
389
390 const auto dummy_test_model_relaxed = TestModelManager::get().add("prelu_relaxed", get_test_model_relaxed());
391
392 } // namespace generated_tests::prelu
393
394 namespace generated_tests::prelu {
395
get_test_model_relaxed_all_inputs_as_internal()396 const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
397 static TestModel model = {
398 .main = {
399 .operands = {{ // input
400 .type = TestOperandType::TENSOR_FLOAT32,
401 .dimensions = {1, 2, 2, 3},
402 .numberOfConsumers = 1,
403 .scale = 0.0f,
404 .zeroPoint = 0,
405 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
406 .channelQuant = {},
407 .isIgnored = false,
408 .data = TestBuffer::createFromVector<float>({})
409 }, { // alpha
410 .type = TestOperandType::TENSOR_FLOAT32,
411 .dimensions = {1, 1, 3},
412 .numberOfConsumers = 1,
413 .scale = 0.0f,
414 .zeroPoint = 0,
415 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
416 .channelQuant = {},
417 .isIgnored = false,
418 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
419 }, { // output
420 .type = TestOperandType::TENSOR_FLOAT32,
421 .dimensions = {1, 2, 2, 3},
422 .numberOfConsumers = 0,
423 .scale = 0.0f,
424 .zeroPoint = 0,
425 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
426 .channelQuant = {},
427 .isIgnored = false,
428 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
429 }, { // input_new
430 .type = TestOperandType::TENSOR_FLOAT32,
431 .dimensions = {1, 2, 2, 3},
432 .numberOfConsumers = 1,
433 .scale = 0.0f,
434 .zeroPoint = 0,
435 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
436 .channelQuant = {},
437 .isIgnored = false,
438 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
439 }, { // placeholder3
440 .type = TestOperandType::TENSOR_FLOAT32,
441 .dimensions = {1},
442 .numberOfConsumers = 1,
443 .scale = 0.0f,
444 .zeroPoint = 0,
445 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
446 .channelQuant = {},
447 .isIgnored = false,
448 .data = TestBuffer::createFromVector<float>({0.0f})
449 }, { // param3
450 .type = TestOperandType::INT32,
451 .dimensions = {},
452 .numberOfConsumers = 1,
453 .scale = 0.0f,
454 .zeroPoint = 0,
455 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
456 .channelQuant = {},
457 .isIgnored = false,
458 .data = TestBuffer::createFromVector<int32_t>({0})
459 }},
460 .operations = {{
461 .type = TestOperationType::ADD,
462 .inputs = {3, 4, 5},
463 .outputs = {0}
464 }, {
465 .type = TestOperationType::PRELU,
466 .inputs = {0, 1},
467 .outputs = {2}
468 }},
469 .inputIndexes = {3},
470 .outputIndexes = {2}
471 },
472 .referenced = {},
473 .isRelaxed = true,
474 .expectedMultinomialDistributionTolerance = 0,
475 .expectFailure = false,
476 .minSupportedVersion = TestHalVersion::UNKNOWN
477 };
478 return model;
479 }
480
481 const auto dummy_test_model_relaxed_all_inputs_as_internal = TestModelManager::get().add("prelu_relaxed_all_inputs_as_internal", get_test_model_relaxed_all_inputs_as_internal());
482
483 } // namespace generated_tests::prelu
484
485 namespace generated_tests::prelu {
486
get_test_model_relaxed_all_tensors_as_inputs()487 const TestModel& get_test_model_relaxed_all_tensors_as_inputs() {
488 static TestModel model = {
489 .main = {
490 .operands = {{ // input
491 .type = TestOperandType::TENSOR_FLOAT32,
492 .dimensions = {1, 2, 2, 3},
493 .numberOfConsumers = 1,
494 .scale = 0.0f,
495 .zeroPoint = 0,
496 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
497 .channelQuant = {},
498 .isIgnored = false,
499 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
500 }, { // alpha
501 .type = TestOperandType::TENSOR_FLOAT32,
502 .dimensions = {1, 1, 3},
503 .numberOfConsumers = 1,
504 .scale = 0.0f,
505 .zeroPoint = 0,
506 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
507 .channelQuant = {},
508 .isIgnored = false,
509 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
510 }, { // output
511 .type = TestOperandType::TENSOR_FLOAT32,
512 .dimensions = {1, 2, 2, 3},
513 .numberOfConsumers = 0,
514 .scale = 0.0f,
515 .zeroPoint = 0,
516 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
517 .channelQuant = {},
518 .isIgnored = false,
519 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
520 }},
521 .operations = {{
522 .type = TestOperationType::PRELU,
523 .inputs = {0, 1},
524 .outputs = {2}
525 }},
526 .inputIndexes = {0, 1},
527 .outputIndexes = {2}
528 },
529 .referenced = {},
530 .isRelaxed = true,
531 .expectedMultinomialDistributionTolerance = 0,
532 .expectFailure = false,
533 .minSupportedVersion = TestHalVersion::UNKNOWN
534 };
535 return model;
536 }
537
538 const auto dummy_test_model_relaxed_all_tensors_as_inputs = TestModelManager::get().add("prelu_relaxed_all_tensors_as_inputs", get_test_model_relaxed_all_tensors_as_inputs());
539
540 } // namespace generated_tests::prelu
541
542 namespace generated_tests::prelu {
543
get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal()544 const TestModel& get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal() {
545 static TestModel model = {
546 .main = {
547 .operands = {{ // input
548 .type = TestOperandType::TENSOR_FLOAT32,
549 .dimensions = {1, 2, 2, 3},
550 .numberOfConsumers = 1,
551 .scale = 0.0f,
552 .zeroPoint = 0,
553 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
554 .channelQuant = {},
555 .isIgnored = false,
556 .data = TestBuffer::createFromVector<float>({})
557 }, { // alpha
558 .type = TestOperandType::TENSOR_FLOAT32,
559 .dimensions = {1, 1, 3},
560 .numberOfConsumers = 1,
561 .scale = 0.0f,
562 .zeroPoint = 0,
563 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
564 .channelQuant = {},
565 .isIgnored = false,
566 .data = TestBuffer::createFromVector<float>({})
567 }, { // output
568 .type = TestOperandType::TENSOR_FLOAT32,
569 .dimensions = {1, 2, 2, 3},
570 .numberOfConsumers = 0,
571 .scale = 0.0f,
572 .zeroPoint = 0,
573 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
574 .channelQuant = {},
575 .isIgnored = false,
576 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
577 }, { // input_new
578 .type = TestOperandType::TENSOR_FLOAT32,
579 .dimensions = {1, 2, 2, 3},
580 .numberOfConsumers = 1,
581 .scale = 0.0f,
582 .zeroPoint = 0,
583 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
584 .channelQuant = {},
585 .isIgnored = false,
586 .data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
587 }, { // placeholder4
588 .type = TestOperandType::TENSOR_FLOAT32,
589 .dimensions = {1},
590 .numberOfConsumers = 1,
591 .scale = 0.0f,
592 .zeroPoint = 0,
593 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
594 .channelQuant = {},
595 .isIgnored = false,
596 .data = TestBuffer::createFromVector<float>({0.0f})
597 }, { // param4
598 .type = TestOperandType::INT32,
599 .dimensions = {},
600 .numberOfConsumers = 1,
601 .scale = 0.0f,
602 .zeroPoint = 0,
603 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
604 .channelQuant = {},
605 .isIgnored = false,
606 .data = TestBuffer::createFromVector<int32_t>({0})
607 }, { // alpha_new
608 .type = TestOperandType::TENSOR_FLOAT32,
609 .dimensions = {1, 1, 3},
610 .numberOfConsumers = 1,
611 .scale = 0.0f,
612 .zeroPoint = 0,
613 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
614 .channelQuant = {},
615 .isIgnored = false,
616 .data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f})
617 }, { // placeholder5
618 .type = TestOperandType::TENSOR_FLOAT32,
619 .dimensions = {1},
620 .numberOfConsumers = 1,
621 .scale = 0.0f,
622 .zeroPoint = 0,
623 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
624 .channelQuant = {},
625 .isIgnored = false,
626 .data = TestBuffer::createFromVector<float>({0.0f})
627 }, { // param5
628 .type = TestOperandType::INT32,
629 .dimensions = {},
630 .numberOfConsumers = 1,
631 .scale = 0.0f,
632 .zeroPoint = 0,
633 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
634 .channelQuant = {},
635 .isIgnored = false,
636 .data = TestBuffer::createFromVector<int32_t>({0})
637 }},
638 .operations = {{
639 .type = TestOperationType::ADD,
640 .inputs = {3, 4, 5},
641 .outputs = {0}
642 }, {
643 .type = TestOperationType::ADD,
644 .inputs = {6, 7, 8},
645 .outputs = {1}
646 }, {
647 .type = TestOperationType::PRELU,
648 .inputs = {0, 1},
649 .outputs = {2}
650 }},
651 .inputIndexes = {3, 6},
652 .outputIndexes = {2}
653 },
654 .referenced = {},
655 .isRelaxed = true,
656 .expectedMultinomialDistributionTolerance = 0,
657 .expectFailure = false,
658 .minSupportedVersion = TestHalVersion::UNKNOWN
659 };
660 return model;
661 }
662
663 const auto dummy_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_relaxed_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal());
664
665 } // namespace generated_tests::prelu
666
667 namespace generated_tests::prelu {
668
get_test_model_quant8()669 const TestModel& get_test_model_quant8() {
670 static TestModel model = {
671 .main = {
672 .operands = {{ // input
673 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
674 .dimensions = {1, 2, 2, 3},
675 .numberOfConsumers = 1,
676 .scale = 0.25f,
677 .zeroPoint = 128,
678 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
679 .channelQuant = {},
680 .isIgnored = false,
681 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
682 }, { // alpha
683 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
684 .dimensions = {1, 1, 3},
685 .numberOfConsumers = 1,
686 .scale = 0.25f,
687 .zeroPoint = 50,
688 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
689 .channelQuant = {},
690 .isIgnored = false,
691 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
692 }, { // output
693 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
694 .dimensions = {1, 2, 2, 3},
695 .numberOfConsumers = 0,
696 .scale = 0.5f,
697 .zeroPoint = 120,
698 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
699 .channelQuant = {},
700 .isIgnored = false,
701 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112})
702 }},
703 .operations = {{
704 .type = TestOperationType::PRELU,
705 .inputs = {0, 1},
706 .outputs = {2}
707 }},
708 .inputIndexes = {0},
709 .outputIndexes = {2}
710 },
711 .referenced = {},
712 .isRelaxed = false,
713 .expectedMultinomialDistributionTolerance = 0,
714 .expectFailure = false,
715 .minSupportedVersion = TestHalVersion::V1_2
716 };
717 return model;
718 }
719
720 const auto dummy_test_model_quant8 = TestModelManager::get().add("prelu_quant8", get_test_model_quant8());
721
722 } // namespace generated_tests::prelu
723
724 namespace generated_tests::prelu {
725
get_test_model_quant8_all_inputs_as_internal()726 const TestModel& get_test_model_quant8_all_inputs_as_internal() {
727 static TestModel model = {
728 .main = {
729 .operands = {{ // input
730 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
731 .dimensions = {1, 2, 2, 3},
732 .numberOfConsumers = 1,
733 .scale = 0.25f,
734 .zeroPoint = 128,
735 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
736 .channelQuant = {},
737 .isIgnored = false,
738 .data = TestBuffer::createFromVector<uint8_t>({})
739 }, { // alpha
740 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
741 .dimensions = {1, 1, 3},
742 .numberOfConsumers = 1,
743 .scale = 0.25f,
744 .zeroPoint = 50,
745 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
746 .channelQuant = {},
747 .isIgnored = false,
748 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
749 }, { // output
750 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
751 .dimensions = {1, 2, 2, 3},
752 .numberOfConsumers = 0,
753 .scale = 0.5f,
754 .zeroPoint = 120,
755 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
756 .channelQuant = {},
757 .isIgnored = false,
758 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112})
759 }, { // input_new
760 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
761 .dimensions = {1, 2, 2, 3},
762 .numberOfConsumers = 1,
763 .scale = 0.25f,
764 .zeroPoint = 128,
765 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
766 .channelQuant = {},
767 .isIgnored = false,
768 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
769 }, { // placeholder6
770 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
771 .dimensions = {1},
772 .numberOfConsumers = 1,
773 .scale = 0.25f,
774 .zeroPoint = 128,
775 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
776 .channelQuant = {},
777 .isIgnored = false,
778 .data = TestBuffer::createFromVector<uint8_t>({128})
779 }, { // param6
780 .type = TestOperandType::INT32,
781 .dimensions = {},
782 .numberOfConsumers = 1,
783 .scale = 0.0f,
784 .zeroPoint = 0,
785 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
786 .channelQuant = {},
787 .isIgnored = false,
788 .data = TestBuffer::createFromVector<int32_t>({0})
789 }},
790 .operations = {{
791 .type = TestOperationType::ADD,
792 .inputs = {3, 4, 5},
793 .outputs = {0}
794 }, {
795 .type = TestOperationType::PRELU,
796 .inputs = {0, 1},
797 .outputs = {2}
798 }},
799 .inputIndexes = {3},
800 .outputIndexes = {2}
801 },
802 .referenced = {},
803 .isRelaxed = false,
804 .expectedMultinomialDistributionTolerance = 0,
805 .expectFailure = false,
806 .minSupportedVersion = TestHalVersion::V1_2
807 };
808 return model;
809 }
810
811 const auto dummy_test_model_quant8_all_inputs_as_internal = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal", get_test_model_quant8_all_inputs_as_internal());
812
813 } // namespace generated_tests::prelu
814
815 namespace generated_tests::prelu {
816
get_test_model_quant8_all_tensors_as_inputs()817 const TestModel& get_test_model_quant8_all_tensors_as_inputs() {
818 static TestModel model = {
819 .main = {
820 .operands = {{ // input
821 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
822 .dimensions = {1, 2, 2, 3},
823 .numberOfConsumers = 1,
824 .scale = 0.25f,
825 .zeroPoint = 128,
826 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
827 .channelQuant = {},
828 .isIgnored = false,
829 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
830 }, { // alpha
831 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
832 .dimensions = {1, 1, 3},
833 .numberOfConsumers = 1,
834 .scale = 0.25f,
835 .zeroPoint = 50,
836 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
837 .channelQuant = {},
838 .isIgnored = false,
839 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
840 }, { // output
841 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
842 .dimensions = {1, 2, 2, 3},
843 .numberOfConsumers = 0,
844 .scale = 0.5f,
845 .zeroPoint = 120,
846 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
847 .channelQuant = {},
848 .isIgnored = false,
849 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112})
850 }},
851 .operations = {{
852 .type = TestOperationType::PRELU,
853 .inputs = {0, 1},
854 .outputs = {2}
855 }},
856 .inputIndexes = {0, 1},
857 .outputIndexes = {2}
858 },
859 .referenced = {},
860 .isRelaxed = false,
861 .expectedMultinomialDistributionTolerance = 0,
862 .expectFailure = false,
863 .minSupportedVersion = TestHalVersion::V1_2
864 };
865 return model;
866 }
867
868 const auto dummy_test_model_quant8_all_tensors_as_inputs = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs", get_test_model_quant8_all_tensors_as_inputs());
869
870 } // namespace generated_tests::prelu
871
872 namespace generated_tests::prelu {
873
get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal()874 const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal() {
875 static TestModel model = {
876 .main = {
877 .operands = {{ // input
878 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
879 .dimensions = {1, 2, 2, 3},
880 .numberOfConsumers = 1,
881 .scale = 0.25f,
882 .zeroPoint = 128,
883 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
884 .channelQuant = {},
885 .isIgnored = false,
886 .data = TestBuffer::createFromVector<uint8_t>({})
887 }, { // alpha
888 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
889 .dimensions = {1, 1, 3},
890 .numberOfConsumers = 1,
891 .scale = 0.25f,
892 .zeroPoint = 50,
893 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
894 .channelQuant = {},
895 .isIgnored = false,
896 .data = TestBuffer::createFromVector<uint8_t>({})
897 }, { // output
898 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
899 .dimensions = {1, 2, 2, 3},
900 .numberOfConsumers = 0,
901 .scale = 0.5f,
902 .zeroPoint = 120,
903 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
904 .channelQuant = {},
905 .isIgnored = false,
906 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112})
907 }, { // input_new
908 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
909 .dimensions = {1, 2, 2, 3},
910 .numberOfConsumers = 1,
911 .scale = 0.25f,
912 .zeroPoint = 128,
913 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
914 .channelQuant = {},
915 .isIgnored = false,
916 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
917 }, { // placeholder7
918 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
919 .dimensions = {1},
920 .numberOfConsumers = 1,
921 .scale = 0.25f,
922 .zeroPoint = 128,
923 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
924 .channelQuant = {},
925 .isIgnored = false,
926 .data = TestBuffer::createFromVector<uint8_t>({128})
927 }, { // param7
928 .type = TestOperandType::INT32,
929 .dimensions = {},
930 .numberOfConsumers = 1,
931 .scale = 0.0f,
932 .zeroPoint = 0,
933 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
934 .channelQuant = {},
935 .isIgnored = false,
936 .data = TestBuffer::createFromVector<int32_t>({0})
937 }, { // alpha_new
938 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
939 .dimensions = {1, 1, 3},
940 .numberOfConsumers = 1,
941 .scale = 0.25f,
942 .zeroPoint = 50,
943 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
944 .channelQuant = {},
945 .isIgnored = false,
946 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
947 }, { // placeholder8
948 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
949 .dimensions = {1},
950 .numberOfConsumers = 1,
951 .scale = 0.25f,
952 .zeroPoint = 50,
953 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
954 .channelQuant = {},
955 .isIgnored = false,
956 .data = TestBuffer::createFromVector<uint8_t>({50})
957 }, { // param8
958 .type = TestOperandType::INT32,
959 .dimensions = {},
960 .numberOfConsumers = 1,
961 .scale = 0.0f,
962 .zeroPoint = 0,
963 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
964 .channelQuant = {},
965 .isIgnored = false,
966 .data = TestBuffer::createFromVector<int32_t>({0})
967 }},
968 .operations = {{
969 .type = TestOperationType::ADD,
970 .inputs = {3, 4, 5},
971 .outputs = {0}
972 }, {
973 .type = TestOperationType::ADD,
974 .inputs = {6, 7, 8},
975 .outputs = {1}
976 }, {
977 .type = TestOperationType::PRELU,
978 .inputs = {0, 1},
979 .outputs = {2}
980 }},
981 .inputIndexes = {3, 6},
982 .outputIndexes = {2}
983 },
984 .referenced = {},
985 .isRelaxed = false,
986 .expectedMultinomialDistributionTolerance = 0,
987 .expectFailure = false,
988 .minSupportedVersion = TestHalVersion::V1_2
989 };
990 return model;
991 }
992
993 const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal());
994
995 } // namespace generated_tests::prelu
996
997 namespace generated_tests::prelu {
998
get_test_model_quant8_2()999 const TestModel& get_test_model_quant8_2() {
1000 static TestModel model = {
1001 .main = {
1002 .operands = {{ // input
1003 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1004 .dimensions = {1, 2, 2, 3},
1005 .numberOfConsumers = 1,
1006 .scale = 0.25f,
1007 .zeroPoint = 128,
1008 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1009 .channelQuant = {},
1010 .isIgnored = false,
1011 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1012 }, { // alpha
1013 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1014 .dimensions = {1, 1, 3},
1015 .numberOfConsumers = 1,
1016 .scale = 0.25f,
1017 .zeroPoint = 50,
1018 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1019 .channelQuant = {},
1020 .isIgnored = false,
1021 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
1022 }, { // output
1023 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1024 .dimensions = {1, 2, 2, 3},
1025 .numberOfConsumers = 0,
1026 .scale = 0.25f,
1027 .zeroPoint = 120,
1028 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1029 .channelQuant = {},
1030 .isIgnored = false,
1031 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104})
1032 }},
1033 .operations = {{
1034 .type = TestOperationType::PRELU,
1035 .inputs = {0, 1},
1036 .outputs = {2}
1037 }},
1038 .inputIndexes = {0},
1039 .outputIndexes = {2}
1040 },
1041 .referenced = {},
1042 .isRelaxed = false,
1043 .expectedMultinomialDistributionTolerance = 0,
1044 .expectFailure = false,
1045 .minSupportedVersion = TestHalVersion::V1_2
1046 };
1047 return model;
1048 }
1049
1050 const auto dummy_test_model_quant8_2 = TestModelManager::get().add("prelu_quant8_2", get_test_model_quant8_2());
1051
1052 } // namespace generated_tests::prelu
1053
1054 namespace generated_tests::prelu {
1055
get_test_model_quant8_all_inputs_as_internal_2()1056 const TestModel& get_test_model_quant8_all_inputs_as_internal_2() {
1057 static TestModel model = {
1058 .main = {
1059 .operands = {{ // input
1060 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1061 .dimensions = {1, 2, 2, 3},
1062 .numberOfConsumers = 1,
1063 .scale = 0.25f,
1064 .zeroPoint = 128,
1065 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1066 .channelQuant = {},
1067 .isIgnored = false,
1068 .data = TestBuffer::createFromVector<uint8_t>({})
1069 }, { // alpha
1070 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1071 .dimensions = {1, 1, 3},
1072 .numberOfConsumers = 1,
1073 .scale = 0.25f,
1074 .zeroPoint = 50,
1075 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1076 .channelQuant = {},
1077 .isIgnored = false,
1078 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
1079 }, { // output
1080 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1081 .dimensions = {1, 2, 2, 3},
1082 .numberOfConsumers = 0,
1083 .scale = 0.25f,
1084 .zeroPoint = 120,
1085 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1086 .channelQuant = {},
1087 .isIgnored = false,
1088 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104})
1089 }, { // input_new
1090 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1091 .dimensions = {1, 2, 2, 3},
1092 .numberOfConsumers = 1,
1093 .scale = 0.25f,
1094 .zeroPoint = 128,
1095 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1096 .channelQuant = {},
1097 .isIgnored = false,
1098 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1099 }, { // placeholder9
1100 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1101 .dimensions = {1},
1102 .numberOfConsumers = 1,
1103 .scale = 0.25f,
1104 .zeroPoint = 128,
1105 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1106 .channelQuant = {},
1107 .isIgnored = false,
1108 .data = TestBuffer::createFromVector<uint8_t>({128})
1109 }, { // param9
1110 .type = TestOperandType::INT32,
1111 .dimensions = {},
1112 .numberOfConsumers = 1,
1113 .scale = 0.0f,
1114 .zeroPoint = 0,
1115 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1116 .channelQuant = {},
1117 .isIgnored = false,
1118 .data = TestBuffer::createFromVector<int32_t>({0})
1119 }},
1120 .operations = {{
1121 .type = TestOperationType::ADD,
1122 .inputs = {3, 4, 5},
1123 .outputs = {0}
1124 }, {
1125 .type = TestOperationType::PRELU,
1126 .inputs = {0, 1},
1127 .outputs = {2}
1128 }},
1129 .inputIndexes = {3},
1130 .outputIndexes = {2}
1131 },
1132 .referenced = {},
1133 .isRelaxed = false,
1134 .expectedMultinomialDistributionTolerance = 0,
1135 .expectFailure = false,
1136 .minSupportedVersion = TestHalVersion::V1_2
1137 };
1138 return model;
1139 }
1140
1141 const auto dummy_test_model_quant8_all_inputs_as_internal_2 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_2", get_test_model_quant8_all_inputs_as_internal_2());
1142
1143 } // namespace generated_tests::prelu
1144
1145 namespace generated_tests::prelu {
1146
get_test_model_quant8_all_tensors_as_inputs_2()1147 const TestModel& get_test_model_quant8_all_tensors_as_inputs_2() {
1148 static TestModel model = {
1149 .main = {
1150 .operands = {{ // input
1151 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1152 .dimensions = {1, 2, 2, 3},
1153 .numberOfConsumers = 1,
1154 .scale = 0.25f,
1155 .zeroPoint = 128,
1156 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1157 .channelQuant = {},
1158 .isIgnored = false,
1159 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1160 }, { // alpha
1161 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1162 .dimensions = {1, 1, 3},
1163 .numberOfConsumers = 1,
1164 .scale = 0.25f,
1165 .zeroPoint = 50,
1166 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1167 .channelQuant = {},
1168 .isIgnored = false,
1169 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
1170 }, { // output
1171 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1172 .dimensions = {1, 2, 2, 3},
1173 .numberOfConsumers = 0,
1174 .scale = 0.25f,
1175 .zeroPoint = 120,
1176 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1177 .channelQuant = {},
1178 .isIgnored = false,
1179 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104})
1180 }},
1181 .operations = {{
1182 .type = TestOperationType::PRELU,
1183 .inputs = {0, 1},
1184 .outputs = {2}
1185 }},
1186 .inputIndexes = {0, 1},
1187 .outputIndexes = {2}
1188 },
1189 .referenced = {},
1190 .isRelaxed = false,
1191 .expectedMultinomialDistributionTolerance = 0,
1192 .expectFailure = false,
1193 .minSupportedVersion = TestHalVersion::V1_2
1194 };
1195 return model;
1196 }
1197
1198 const auto dummy_test_model_quant8_all_tensors_as_inputs_2 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_2", get_test_model_quant8_all_tensors_as_inputs_2());
1199
1200 } // namespace generated_tests::prelu
1201
1202 namespace generated_tests::prelu {
1203
get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2()1204 const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2() {
1205 static TestModel model = {
1206 .main = {
1207 .operands = {{ // input
1208 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1209 .dimensions = {1, 2, 2, 3},
1210 .numberOfConsumers = 1,
1211 .scale = 0.25f,
1212 .zeroPoint = 128,
1213 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1214 .channelQuant = {},
1215 .isIgnored = false,
1216 .data = TestBuffer::createFromVector<uint8_t>({})
1217 }, { // alpha
1218 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1219 .dimensions = {1, 1, 3},
1220 .numberOfConsumers = 1,
1221 .scale = 0.25f,
1222 .zeroPoint = 50,
1223 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1224 .channelQuant = {},
1225 .isIgnored = false,
1226 .data = TestBuffer::createFromVector<uint8_t>({})
1227 }, { // output
1228 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1229 .dimensions = {1, 2, 2, 3},
1230 .numberOfConsumers = 0,
1231 .scale = 0.25f,
1232 .zeroPoint = 120,
1233 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1234 .channelQuant = {},
1235 .isIgnored = false,
1236 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104})
1237 }, { // input_new
1238 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1239 .dimensions = {1, 2, 2, 3},
1240 .numberOfConsumers = 1,
1241 .scale = 0.25f,
1242 .zeroPoint = 128,
1243 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1244 .channelQuant = {},
1245 .isIgnored = false,
1246 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1247 }, { // placeholder10
1248 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1249 .dimensions = {1},
1250 .numberOfConsumers = 1,
1251 .scale = 0.25f,
1252 .zeroPoint = 128,
1253 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1254 .channelQuant = {},
1255 .isIgnored = false,
1256 .data = TestBuffer::createFromVector<uint8_t>({128})
1257 }, { // param10
1258 .type = TestOperandType::INT32,
1259 .dimensions = {},
1260 .numberOfConsumers = 1,
1261 .scale = 0.0f,
1262 .zeroPoint = 0,
1263 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1264 .channelQuant = {},
1265 .isIgnored = false,
1266 .data = TestBuffer::createFromVector<int32_t>({0})
1267 }, { // alpha_new
1268 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1269 .dimensions = {1, 1, 3},
1270 .numberOfConsumers = 1,
1271 .scale = 0.25f,
1272 .zeroPoint = 50,
1273 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1274 .channelQuant = {},
1275 .isIgnored = false,
1276 .data = TestBuffer::createFromVector<uint8_t>({50, 54, 58})
1277 }, { // placeholder11
1278 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1279 .dimensions = {1},
1280 .numberOfConsumers = 1,
1281 .scale = 0.25f,
1282 .zeroPoint = 50,
1283 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1284 .channelQuant = {},
1285 .isIgnored = false,
1286 .data = TestBuffer::createFromVector<uint8_t>({50})
1287 }, { // param11
1288 .type = TestOperandType::INT32,
1289 .dimensions = {},
1290 .numberOfConsumers = 1,
1291 .scale = 0.0f,
1292 .zeroPoint = 0,
1293 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1294 .channelQuant = {},
1295 .isIgnored = false,
1296 .data = TestBuffer::createFromVector<int32_t>({0})
1297 }},
1298 .operations = {{
1299 .type = TestOperationType::ADD,
1300 .inputs = {3, 4, 5},
1301 .outputs = {0}
1302 }, {
1303 .type = TestOperationType::ADD,
1304 .inputs = {6, 7, 8},
1305 .outputs = {1}
1306 }, {
1307 .type = TestOperationType::PRELU,
1308 .inputs = {0, 1},
1309 .outputs = {2}
1310 }},
1311 .inputIndexes = {3, 6},
1312 .outputIndexes = {2}
1313 },
1314 .referenced = {},
1315 .isRelaxed = false,
1316 .expectedMultinomialDistributionTolerance = 0,
1317 .expectFailure = false,
1318 .minSupportedVersion = TestHalVersion::V1_2
1319 };
1320 return model;
1321 }
1322
1323 const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2());
1324
1325 } // namespace generated_tests::prelu
1326
1327 namespace generated_tests::prelu {
1328
get_test_model_quant8_3()1329 const TestModel& get_test_model_quant8_3() {
1330 static TestModel model = {
1331 .main = {
1332 .operands = {{ // input
1333 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1334 .dimensions = {1, 2, 2, 3},
1335 .numberOfConsumers = 1,
1336 .scale = 0.25f,
1337 .zeroPoint = 128,
1338 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1339 .channelQuant = {},
1340 .isIgnored = false,
1341 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1342 }, { // alpha
1343 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1344 .dimensions = {1, 1, 3},
1345 .numberOfConsumers = 1,
1346 .scale = 0.5f,
1347 .zeroPoint = 50,
1348 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1349 .channelQuant = {},
1350 .isIgnored = false,
1351 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1352 }, { // output
1353 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1354 .dimensions = {1, 2, 2, 3},
1355 .numberOfConsumers = 0,
1356 .scale = 0.125f,
1357 .zeroPoint = 120,
1358 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1359 .channelQuant = {},
1360 .isIgnored = false,
1361 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88})
1362 }},
1363 .operations = {{
1364 .type = TestOperationType::PRELU,
1365 .inputs = {0, 1},
1366 .outputs = {2}
1367 }},
1368 .inputIndexes = {0},
1369 .outputIndexes = {2}
1370 },
1371 .referenced = {},
1372 .isRelaxed = false,
1373 .expectedMultinomialDistributionTolerance = 0,
1374 .expectFailure = false,
1375 .minSupportedVersion = TestHalVersion::V1_2
1376 };
1377 return model;
1378 }
1379
1380 const auto dummy_test_model_quant8_3 = TestModelManager::get().add("prelu_quant8_3", get_test_model_quant8_3());
1381
1382 } // namespace generated_tests::prelu
1383
1384 namespace generated_tests::prelu {
1385
get_test_model_quant8_all_inputs_as_internal_3()1386 const TestModel& get_test_model_quant8_all_inputs_as_internal_3() {
1387 static TestModel model = {
1388 .main = {
1389 .operands = {{ // input
1390 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1391 .dimensions = {1, 2, 2, 3},
1392 .numberOfConsumers = 1,
1393 .scale = 0.25f,
1394 .zeroPoint = 128,
1395 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1396 .channelQuant = {},
1397 .isIgnored = false,
1398 .data = TestBuffer::createFromVector<uint8_t>({})
1399 }, { // alpha
1400 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1401 .dimensions = {1, 1, 3},
1402 .numberOfConsumers = 1,
1403 .scale = 0.5f,
1404 .zeroPoint = 50,
1405 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1406 .channelQuant = {},
1407 .isIgnored = false,
1408 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1409 }, { // output
1410 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1411 .dimensions = {1, 2, 2, 3},
1412 .numberOfConsumers = 0,
1413 .scale = 0.125f,
1414 .zeroPoint = 120,
1415 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1416 .channelQuant = {},
1417 .isIgnored = false,
1418 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88})
1419 }, { // input_new
1420 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1421 .dimensions = {1, 2, 2, 3},
1422 .numberOfConsumers = 1,
1423 .scale = 0.25f,
1424 .zeroPoint = 128,
1425 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1426 .channelQuant = {},
1427 .isIgnored = false,
1428 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1429 }, { // placeholder12
1430 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1431 .dimensions = {1},
1432 .numberOfConsumers = 1,
1433 .scale = 0.25f,
1434 .zeroPoint = 128,
1435 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1436 .channelQuant = {},
1437 .isIgnored = false,
1438 .data = TestBuffer::createFromVector<uint8_t>({128})
1439 }, { // param12
1440 .type = TestOperandType::INT32,
1441 .dimensions = {},
1442 .numberOfConsumers = 1,
1443 .scale = 0.0f,
1444 .zeroPoint = 0,
1445 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1446 .channelQuant = {},
1447 .isIgnored = false,
1448 .data = TestBuffer::createFromVector<int32_t>({0})
1449 }},
1450 .operations = {{
1451 .type = TestOperationType::ADD,
1452 .inputs = {3, 4, 5},
1453 .outputs = {0}
1454 }, {
1455 .type = TestOperationType::PRELU,
1456 .inputs = {0, 1},
1457 .outputs = {2}
1458 }},
1459 .inputIndexes = {3},
1460 .outputIndexes = {2}
1461 },
1462 .referenced = {},
1463 .isRelaxed = false,
1464 .expectedMultinomialDistributionTolerance = 0,
1465 .expectFailure = false,
1466 .minSupportedVersion = TestHalVersion::V1_2
1467 };
1468 return model;
1469 }
1470
1471 const auto dummy_test_model_quant8_all_inputs_as_internal_3 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_3", get_test_model_quant8_all_inputs_as_internal_3());
1472
1473 } // namespace generated_tests::prelu
1474
1475 namespace generated_tests::prelu {
1476
get_test_model_quant8_all_tensors_as_inputs_3()1477 const TestModel& get_test_model_quant8_all_tensors_as_inputs_3() {
1478 static TestModel model = {
1479 .main = {
1480 .operands = {{ // input
1481 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1482 .dimensions = {1, 2, 2, 3},
1483 .numberOfConsumers = 1,
1484 .scale = 0.25f,
1485 .zeroPoint = 128,
1486 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1487 .channelQuant = {},
1488 .isIgnored = false,
1489 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1490 }, { // alpha
1491 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1492 .dimensions = {1, 1, 3},
1493 .numberOfConsumers = 1,
1494 .scale = 0.5f,
1495 .zeroPoint = 50,
1496 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1497 .channelQuant = {},
1498 .isIgnored = false,
1499 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1500 }, { // output
1501 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1502 .dimensions = {1, 2, 2, 3},
1503 .numberOfConsumers = 0,
1504 .scale = 0.125f,
1505 .zeroPoint = 120,
1506 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1507 .channelQuant = {},
1508 .isIgnored = false,
1509 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88})
1510 }},
1511 .operations = {{
1512 .type = TestOperationType::PRELU,
1513 .inputs = {0, 1},
1514 .outputs = {2}
1515 }},
1516 .inputIndexes = {0, 1},
1517 .outputIndexes = {2}
1518 },
1519 .referenced = {},
1520 .isRelaxed = false,
1521 .expectedMultinomialDistributionTolerance = 0,
1522 .expectFailure = false,
1523 .minSupportedVersion = TestHalVersion::V1_2
1524 };
1525 return model;
1526 }
1527
1528 const auto dummy_test_model_quant8_all_tensors_as_inputs_3 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_3", get_test_model_quant8_all_tensors_as_inputs_3());
1529
1530 } // namespace generated_tests::prelu
1531
1532 namespace generated_tests::prelu {
1533
get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3()1534 const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3() {
1535 static TestModel model = {
1536 .main = {
1537 .operands = {{ // input
1538 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1539 .dimensions = {1, 2, 2, 3},
1540 .numberOfConsumers = 1,
1541 .scale = 0.25f,
1542 .zeroPoint = 128,
1543 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1544 .channelQuant = {},
1545 .isIgnored = false,
1546 .data = TestBuffer::createFromVector<uint8_t>({})
1547 }, { // alpha
1548 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1549 .dimensions = {1, 1, 3},
1550 .numberOfConsumers = 1,
1551 .scale = 0.5f,
1552 .zeroPoint = 50,
1553 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1554 .channelQuant = {},
1555 .isIgnored = false,
1556 .data = TestBuffer::createFromVector<uint8_t>({})
1557 }, { // output
1558 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1559 .dimensions = {1, 2, 2, 3},
1560 .numberOfConsumers = 0,
1561 .scale = 0.125f,
1562 .zeroPoint = 120,
1563 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1564 .channelQuant = {},
1565 .isIgnored = false,
1566 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88})
1567 }, { // input_new
1568 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1569 .dimensions = {1, 2, 2, 3},
1570 .numberOfConsumers = 1,
1571 .scale = 0.25f,
1572 .zeroPoint = 128,
1573 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1574 .channelQuant = {},
1575 .isIgnored = false,
1576 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1577 }, { // placeholder13
1578 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1579 .dimensions = {1},
1580 .numberOfConsumers = 1,
1581 .scale = 0.25f,
1582 .zeroPoint = 128,
1583 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1584 .channelQuant = {},
1585 .isIgnored = false,
1586 .data = TestBuffer::createFromVector<uint8_t>({128})
1587 }, { // param13
1588 .type = TestOperandType::INT32,
1589 .dimensions = {},
1590 .numberOfConsumers = 1,
1591 .scale = 0.0f,
1592 .zeroPoint = 0,
1593 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1594 .channelQuant = {},
1595 .isIgnored = false,
1596 .data = TestBuffer::createFromVector<int32_t>({0})
1597 }, { // alpha_new
1598 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1599 .dimensions = {1, 1, 3},
1600 .numberOfConsumers = 1,
1601 .scale = 0.5f,
1602 .zeroPoint = 50,
1603 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1604 .channelQuant = {},
1605 .isIgnored = false,
1606 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1607 }, { // placeholder14
1608 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1609 .dimensions = {1},
1610 .numberOfConsumers = 1,
1611 .scale = 0.5f,
1612 .zeroPoint = 50,
1613 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1614 .channelQuant = {},
1615 .isIgnored = false,
1616 .data = TestBuffer::createFromVector<uint8_t>({50})
1617 }, { // param14
1618 .type = TestOperandType::INT32,
1619 .dimensions = {},
1620 .numberOfConsumers = 1,
1621 .scale = 0.0f,
1622 .zeroPoint = 0,
1623 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1624 .channelQuant = {},
1625 .isIgnored = false,
1626 .data = TestBuffer::createFromVector<int32_t>({0})
1627 }},
1628 .operations = {{
1629 .type = TestOperationType::ADD,
1630 .inputs = {3, 4, 5},
1631 .outputs = {0}
1632 }, {
1633 .type = TestOperationType::ADD,
1634 .inputs = {6, 7, 8},
1635 .outputs = {1}
1636 }, {
1637 .type = TestOperationType::PRELU,
1638 .inputs = {0, 1},
1639 .outputs = {2}
1640 }},
1641 .inputIndexes = {3, 6},
1642 .outputIndexes = {2}
1643 },
1644 .referenced = {},
1645 .isRelaxed = false,
1646 .expectedMultinomialDistributionTolerance = 0,
1647 .expectFailure = false,
1648 .minSupportedVersion = TestHalVersion::V1_2
1649 };
1650 return model;
1651 }
1652
1653 const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_3", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3());
1654
1655 } // namespace generated_tests::prelu
1656
1657 namespace generated_tests::prelu {
1658
get_test_model_quant8_4()1659 const TestModel& get_test_model_quant8_4() {
1660 static TestModel model = {
1661 .main = {
1662 .operands = {{ // input
1663 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1664 .dimensions = {1, 2, 2, 3},
1665 .numberOfConsumers = 1,
1666 .scale = 0.25f,
1667 .zeroPoint = 128,
1668 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1669 .channelQuant = {},
1670 .isIgnored = false,
1671 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1672 }, { // alpha
1673 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1674 .dimensions = {1, 1, 3},
1675 .numberOfConsumers = 1,
1676 .scale = 0.5f,
1677 .zeroPoint = 50,
1678 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1679 .channelQuant = {},
1680 .isIgnored = false,
1681 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1682 }, { // output
1683 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1684 .dimensions = {1, 2, 2, 3},
1685 .numberOfConsumers = 0,
1686 .scale = 0.1f,
1687 .zeroPoint = 120,
1688 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1689 .channelQuant = {},
1690 .isIgnored = false,
1691 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80})
1692 }},
1693 .operations = {{
1694 .type = TestOperationType::PRELU,
1695 .inputs = {0, 1},
1696 .outputs = {2}
1697 }},
1698 .inputIndexes = {0},
1699 .outputIndexes = {2}
1700 },
1701 .referenced = {},
1702 .isRelaxed = false,
1703 .expectedMultinomialDistributionTolerance = 0,
1704 .expectFailure = false,
1705 .minSupportedVersion = TestHalVersion::V1_2
1706 };
1707 return model;
1708 }
1709
1710 const auto dummy_test_model_quant8_4 = TestModelManager::get().add("prelu_quant8_4", get_test_model_quant8_4());
1711
1712 } // namespace generated_tests::prelu
1713
1714 namespace generated_tests::prelu {
1715
get_test_model_quant8_all_inputs_as_internal_4()1716 const TestModel& get_test_model_quant8_all_inputs_as_internal_4() {
1717 static TestModel model = {
1718 .main = {
1719 .operands = {{ // input
1720 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1721 .dimensions = {1, 2, 2, 3},
1722 .numberOfConsumers = 1,
1723 .scale = 0.25f,
1724 .zeroPoint = 128,
1725 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1726 .channelQuant = {},
1727 .isIgnored = false,
1728 .data = TestBuffer::createFromVector<uint8_t>({})
1729 }, { // alpha
1730 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1731 .dimensions = {1, 1, 3},
1732 .numberOfConsumers = 1,
1733 .scale = 0.5f,
1734 .zeroPoint = 50,
1735 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1736 .channelQuant = {},
1737 .isIgnored = false,
1738 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1739 }, { // output
1740 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1741 .dimensions = {1, 2, 2, 3},
1742 .numberOfConsumers = 0,
1743 .scale = 0.1f,
1744 .zeroPoint = 120,
1745 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1746 .channelQuant = {},
1747 .isIgnored = false,
1748 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80})
1749 }, { // input_new
1750 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1751 .dimensions = {1, 2, 2, 3},
1752 .numberOfConsumers = 1,
1753 .scale = 0.25f,
1754 .zeroPoint = 128,
1755 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1756 .channelQuant = {},
1757 .isIgnored = false,
1758 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1759 }, { // placeholder15
1760 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1761 .dimensions = {1},
1762 .numberOfConsumers = 1,
1763 .scale = 0.25f,
1764 .zeroPoint = 128,
1765 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1766 .channelQuant = {},
1767 .isIgnored = false,
1768 .data = TestBuffer::createFromVector<uint8_t>({128})
1769 }, { // param15
1770 .type = TestOperandType::INT32,
1771 .dimensions = {},
1772 .numberOfConsumers = 1,
1773 .scale = 0.0f,
1774 .zeroPoint = 0,
1775 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1776 .channelQuant = {},
1777 .isIgnored = false,
1778 .data = TestBuffer::createFromVector<int32_t>({0})
1779 }},
1780 .operations = {{
1781 .type = TestOperationType::ADD,
1782 .inputs = {3, 4, 5},
1783 .outputs = {0}
1784 }, {
1785 .type = TestOperationType::PRELU,
1786 .inputs = {0, 1},
1787 .outputs = {2}
1788 }},
1789 .inputIndexes = {3},
1790 .outputIndexes = {2}
1791 },
1792 .referenced = {},
1793 .isRelaxed = false,
1794 .expectedMultinomialDistributionTolerance = 0,
1795 .expectFailure = false,
1796 .minSupportedVersion = TestHalVersion::V1_2
1797 };
1798 return model;
1799 }
1800
1801 const auto dummy_test_model_quant8_all_inputs_as_internal_4 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_4", get_test_model_quant8_all_inputs_as_internal_4());
1802
1803 } // namespace generated_tests::prelu
1804
1805 namespace generated_tests::prelu {
1806
get_test_model_quant8_all_tensors_as_inputs_4()1807 const TestModel& get_test_model_quant8_all_tensors_as_inputs_4() {
1808 static TestModel model = {
1809 .main = {
1810 .operands = {{ // input
1811 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1812 .dimensions = {1, 2, 2, 3},
1813 .numberOfConsumers = 1,
1814 .scale = 0.25f,
1815 .zeroPoint = 128,
1816 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1817 .channelQuant = {},
1818 .isIgnored = false,
1819 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1820 }, { // alpha
1821 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1822 .dimensions = {1, 1, 3},
1823 .numberOfConsumers = 1,
1824 .scale = 0.5f,
1825 .zeroPoint = 50,
1826 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1827 .channelQuant = {},
1828 .isIgnored = false,
1829 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1830 }, { // output
1831 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1832 .dimensions = {1, 2, 2, 3},
1833 .numberOfConsumers = 0,
1834 .scale = 0.1f,
1835 .zeroPoint = 120,
1836 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1837 .channelQuant = {},
1838 .isIgnored = false,
1839 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80})
1840 }},
1841 .operations = {{
1842 .type = TestOperationType::PRELU,
1843 .inputs = {0, 1},
1844 .outputs = {2}
1845 }},
1846 .inputIndexes = {0, 1},
1847 .outputIndexes = {2}
1848 },
1849 .referenced = {},
1850 .isRelaxed = false,
1851 .expectedMultinomialDistributionTolerance = 0,
1852 .expectFailure = false,
1853 .minSupportedVersion = TestHalVersion::V1_2
1854 };
1855 return model;
1856 }
1857
1858 const auto dummy_test_model_quant8_all_tensors_as_inputs_4 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_4", get_test_model_quant8_all_tensors_as_inputs_4());
1859
1860 } // namespace generated_tests::prelu
1861
1862 namespace generated_tests::prelu {
1863
get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4()1864 const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4() {
1865 static TestModel model = {
1866 .main = {
1867 .operands = {{ // input
1868 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1869 .dimensions = {1, 2, 2, 3},
1870 .numberOfConsumers = 1,
1871 .scale = 0.25f,
1872 .zeroPoint = 128,
1873 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1874 .channelQuant = {},
1875 .isIgnored = false,
1876 .data = TestBuffer::createFromVector<uint8_t>({})
1877 }, { // alpha
1878 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1879 .dimensions = {1, 1, 3},
1880 .numberOfConsumers = 1,
1881 .scale = 0.5f,
1882 .zeroPoint = 50,
1883 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
1884 .channelQuant = {},
1885 .isIgnored = false,
1886 .data = TestBuffer::createFromVector<uint8_t>({})
1887 }, { // output
1888 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1889 .dimensions = {1, 2, 2, 3},
1890 .numberOfConsumers = 0,
1891 .scale = 0.1f,
1892 .zeroPoint = 120,
1893 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
1894 .channelQuant = {},
1895 .isIgnored = false,
1896 .data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80})
1897 }, { // input_new
1898 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1899 .dimensions = {1, 2, 2, 3},
1900 .numberOfConsumers = 1,
1901 .scale = 0.25f,
1902 .zeroPoint = 128,
1903 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1904 .channelQuant = {},
1905 .isIgnored = false,
1906 .data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120})
1907 }, { // placeholder16
1908 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1909 .dimensions = {1},
1910 .numberOfConsumers = 1,
1911 .scale = 0.25f,
1912 .zeroPoint = 128,
1913 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1914 .channelQuant = {},
1915 .isIgnored = false,
1916 .data = TestBuffer::createFromVector<uint8_t>({128})
1917 }, { // param16
1918 .type = TestOperandType::INT32,
1919 .dimensions = {},
1920 .numberOfConsumers = 1,
1921 .scale = 0.0f,
1922 .zeroPoint = 0,
1923 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1924 .channelQuant = {},
1925 .isIgnored = false,
1926 .data = TestBuffer::createFromVector<int32_t>({0})
1927 }, { // alpha_new
1928 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1929 .dimensions = {1, 1, 3},
1930 .numberOfConsumers = 1,
1931 .scale = 0.5f,
1932 .zeroPoint = 50,
1933 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1934 .channelQuant = {},
1935 .isIgnored = false,
1936 .data = TestBuffer::createFromVector<uint8_t>({50, 52, 54})
1937 }, { // placeholder17
1938 .type = TestOperandType::TENSOR_QUANT8_ASYMM,
1939 .dimensions = {1},
1940 .numberOfConsumers = 1,
1941 .scale = 0.5f,
1942 .zeroPoint = 50,
1943 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1944 .channelQuant = {},
1945 .isIgnored = false,
1946 .data = TestBuffer::createFromVector<uint8_t>({50})
1947 }, { // param17
1948 .type = TestOperandType::INT32,
1949 .dimensions = {},
1950 .numberOfConsumers = 1,
1951 .scale = 0.0f,
1952 .zeroPoint = 0,
1953 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
1954 .channelQuant = {},
1955 .isIgnored = false,
1956 .data = TestBuffer::createFromVector<int32_t>({0})
1957 }},
1958 .operations = {{
1959 .type = TestOperationType::ADD,
1960 .inputs = {3, 4, 5},
1961 .outputs = {0}
1962 }, {
1963 .type = TestOperationType::ADD,
1964 .inputs = {6, 7, 8},
1965 .outputs = {1}
1966 }, {
1967 .type = TestOperationType::PRELU,
1968 .inputs = {0, 1},
1969 .outputs = {2}
1970 }},
1971 .inputIndexes = {3, 6},
1972 .outputIndexes = {2}
1973 },
1974 .referenced = {},
1975 .isRelaxed = false,
1976 .expectedMultinomialDistributionTolerance = 0,
1977 .expectFailure = false,
1978 .minSupportedVersion = TestHalVersion::V1_2
1979 };
1980 return model;
1981 }
1982
1983 const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_4", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4());
1984
1985 } // namespace generated_tests::prelu
1986
1987 namespace generated_tests::prelu {
1988
get_test_model_float16()1989 const TestModel& get_test_model_float16() {
1990 static TestModel model = {
1991 .main = {
1992 .operands = {{ // input
1993 .type = TestOperandType::TENSOR_FLOAT16,
1994 .dimensions = {1, 2, 2, 3},
1995 .numberOfConsumers = 1,
1996 .scale = 0.0f,
1997 .zeroPoint = 0,
1998 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
1999 .channelQuant = {},
2000 .isIgnored = false,
2001 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
2002 }, { // alpha
2003 .type = TestOperandType::TENSOR_FLOAT16,
2004 .dimensions = {1, 1, 3},
2005 .numberOfConsumers = 1,
2006 .scale = 0.0f,
2007 .zeroPoint = 0,
2008 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2009 .channelQuant = {},
2010 .isIgnored = false,
2011 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f})
2012 }, { // output
2013 .type = TestOperandType::TENSOR_FLOAT16,
2014 .dimensions = {1, 2, 2, 3},
2015 .numberOfConsumers = 0,
2016 .scale = 0.0f,
2017 .zeroPoint = 0,
2018 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2019 .channelQuant = {},
2020 .isIgnored = false,
2021 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
2022 }},
2023 .operations = {{
2024 .type = TestOperationType::PRELU,
2025 .inputs = {0, 1},
2026 .outputs = {2}
2027 }},
2028 .inputIndexes = {0},
2029 .outputIndexes = {2}
2030 },
2031 .referenced = {},
2032 .isRelaxed = false,
2033 .expectedMultinomialDistributionTolerance = 0,
2034 .expectFailure = false,
2035 .minSupportedVersion = TestHalVersion::V1_2
2036 };
2037 return model;
2038 }
2039
2040 const auto dummy_test_model_float16 = TestModelManager::get().add("prelu_float16", get_test_model_float16());
2041
2042 } // namespace generated_tests::prelu
2043
2044 namespace generated_tests::prelu {
2045
get_test_model_float16_all_inputs_as_internal()2046 const TestModel& get_test_model_float16_all_inputs_as_internal() {
2047 static TestModel model = {
2048 .main = {
2049 .operands = {{ // input
2050 .type = TestOperandType::TENSOR_FLOAT16,
2051 .dimensions = {1, 2, 2, 3},
2052 .numberOfConsumers = 1,
2053 .scale = 0.0f,
2054 .zeroPoint = 0,
2055 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2056 .channelQuant = {},
2057 .isIgnored = false,
2058 .data = TestBuffer::createFromVector<_Float16>({})
2059 }, { // alpha
2060 .type = TestOperandType::TENSOR_FLOAT16,
2061 .dimensions = {1, 1, 3},
2062 .numberOfConsumers = 1,
2063 .scale = 0.0f,
2064 .zeroPoint = 0,
2065 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2066 .channelQuant = {},
2067 .isIgnored = false,
2068 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f})
2069 }, { // output
2070 .type = TestOperandType::TENSOR_FLOAT16,
2071 .dimensions = {1, 2, 2, 3},
2072 .numberOfConsumers = 0,
2073 .scale = 0.0f,
2074 .zeroPoint = 0,
2075 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2076 .channelQuant = {},
2077 .isIgnored = false,
2078 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
2079 }, { // input_new
2080 .type = TestOperandType::TENSOR_FLOAT16,
2081 .dimensions = {1, 2, 2, 3},
2082 .numberOfConsumers = 1,
2083 .scale = 0.0f,
2084 .zeroPoint = 0,
2085 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2086 .channelQuant = {},
2087 .isIgnored = false,
2088 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
2089 }, { // placeholder18
2090 .type = TestOperandType::TENSOR_FLOAT16,
2091 .dimensions = {1},
2092 .numberOfConsumers = 1,
2093 .scale = 0.0f,
2094 .zeroPoint = 0,
2095 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2096 .channelQuant = {},
2097 .isIgnored = false,
2098 .data = TestBuffer::createFromVector<_Float16>({0.0f})
2099 }, { // param18
2100 .type = TestOperandType::INT32,
2101 .dimensions = {},
2102 .numberOfConsumers = 1,
2103 .scale = 0.0f,
2104 .zeroPoint = 0,
2105 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2106 .channelQuant = {},
2107 .isIgnored = false,
2108 .data = TestBuffer::createFromVector<int32_t>({0})
2109 }},
2110 .operations = {{
2111 .type = TestOperationType::ADD,
2112 .inputs = {3, 4, 5},
2113 .outputs = {0}
2114 }, {
2115 .type = TestOperationType::PRELU,
2116 .inputs = {0, 1},
2117 .outputs = {2}
2118 }},
2119 .inputIndexes = {3},
2120 .outputIndexes = {2}
2121 },
2122 .referenced = {},
2123 .isRelaxed = false,
2124 .expectedMultinomialDistributionTolerance = 0,
2125 .expectFailure = false,
2126 .minSupportedVersion = TestHalVersion::V1_2
2127 };
2128 return model;
2129 }
2130
2131 const auto dummy_test_model_float16_all_inputs_as_internal = TestModelManager::get().add("prelu_float16_all_inputs_as_internal", get_test_model_float16_all_inputs_as_internal());
2132
2133 } // namespace generated_tests::prelu
2134
2135 namespace generated_tests::prelu {
2136
get_test_model_float16_all_tensors_as_inputs()2137 const TestModel& get_test_model_float16_all_tensors_as_inputs() {
2138 static TestModel model = {
2139 .main = {
2140 .operands = {{ // input
2141 .type = TestOperandType::TENSOR_FLOAT16,
2142 .dimensions = {1, 2, 2, 3},
2143 .numberOfConsumers = 1,
2144 .scale = 0.0f,
2145 .zeroPoint = 0,
2146 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2147 .channelQuant = {},
2148 .isIgnored = false,
2149 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
2150 }, { // alpha
2151 .type = TestOperandType::TENSOR_FLOAT16,
2152 .dimensions = {1, 1, 3},
2153 .numberOfConsumers = 1,
2154 .scale = 0.0f,
2155 .zeroPoint = 0,
2156 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2157 .channelQuant = {},
2158 .isIgnored = false,
2159 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f})
2160 }, { // output
2161 .type = TestOperandType::TENSOR_FLOAT16,
2162 .dimensions = {1, 2, 2, 3},
2163 .numberOfConsumers = 0,
2164 .scale = 0.0f,
2165 .zeroPoint = 0,
2166 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2167 .channelQuant = {},
2168 .isIgnored = false,
2169 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
2170 }},
2171 .operations = {{
2172 .type = TestOperationType::PRELU,
2173 .inputs = {0, 1},
2174 .outputs = {2}
2175 }},
2176 .inputIndexes = {0, 1},
2177 .outputIndexes = {2}
2178 },
2179 .referenced = {},
2180 .isRelaxed = false,
2181 .expectedMultinomialDistributionTolerance = 0,
2182 .expectFailure = false,
2183 .minSupportedVersion = TestHalVersion::V1_2
2184 };
2185 return model;
2186 }
2187
2188 const auto dummy_test_model_float16_all_tensors_as_inputs = TestModelManager::get().add("prelu_float16_all_tensors_as_inputs", get_test_model_float16_all_tensors_as_inputs());
2189
2190 } // namespace generated_tests::prelu
2191
2192 namespace generated_tests::prelu {
2193
get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal()2194 const TestModel& get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal() {
2195 static TestModel model = {
2196 .main = {
2197 .operands = {{ // input
2198 .type = TestOperandType::TENSOR_FLOAT16,
2199 .dimensions = {1, 2, 2, 3},
2200 .numberOfConsumers = 1,
2201 .scale = 0.0f,
2202 .zeroPoint = 0,
2203 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2204 .channelQuant = {},
2205 .isIgnored = false,
2206 .data = TestBuffer::createFromVector<_Float16>({})
2207 }, { // alpha
2208 .type = TestOperandType::TENSOR_FLOAT16,
2209 .dimensions = {1, 1, 3},
2210 .numberOfConsumers = 1,
2211 .scale = 0.0f,
2212 .zeroPoint = 0,
2213 .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
2214 .channelQuant = {},
2215 .isIgnored = false,
2216 .data = TestBuffer::createFromVector<_Float16>({})
2217 }, { // output
2218 .type = TestOperandType::TENSOR_FLOAT16,
2219 .dimensions = {1, 2, 2, 3},
2220 .numberOfConsumers = 0,
2221 .scale = 0.0f,
2222 .zeroPoint = 0,
2223 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
2224 .channelQuant = {},
2225 .isIgnored = false,
2226 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f})
2227 }, { // input_new
2228 .type = TestOperandType::TENSOR_FLOAT16,
2229 .dimensions = {1, 2, 2, 3},
2230 .numberOfConsumers = 1,
2231 .scale = 0.0f,
2232 .zeroPoint = 0,
2233 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2234 .channelQuant = {},
2235 .isIgnored = false,
2236 .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f})
2237 }, { // placeholder19
2238 .type = TestOperandType::TENSOR_FLOAT16,
2239 .dimensions = {1},
2240 .numberOfConsumers = 1,
2241 .scale = 0.0f,
2242 .zeroPoint = 0,
2243 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2244 .channelQuant = {},
2245 .isIgnored = false,
2246 .data = TestBuffer::createFromVector<_Float16>({0.0f})
2247 }, { // param19
2248 .type = TestOperandType::INT32,
2249 .dimensions = {},
2250 .numberOfConsumers = 1,
2251 .scale = 0.0f,
2252 .zeroPoint = 0,
2253 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2254 .channelQuant = {},
2255 .isIgnored = false,
2256 .data = TestBuffer::createFromVector<int32_t>({0})
2257 }, { // alpha_new
2258 .type = TestOperandType::TENSOR_FLOAT16,
2259 .dimensions = {1, 1, 3},
2260 .numberOfConsumers = 1,
2261 .scale = 0.0f,
2262 .zeroPoint = 0,
2263 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
2264 .channelQuant = {},
2265 .isIgnored = false,
2266 .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f})
2267 }, { // placeholder20
2268 .type = TestOperandType::TENSOR_FLOAT16,
2269 .dimensions = {1},
2270 .numberOfConsumers = 1,
2271 .scale = 0.0f,
2272 .zeroPoint = 0,
2273 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2274 .channelQuant = {},
2275 .isIgnored = false,
2276 .data = TestBuffer::createFromVector<_Float16>({0.0f})
2277 }, { // param20
2278 .type = TestOperandType::INT32,
2279 .dimensions = {},
2280 .numberOfConsumers = 1,
2281 .scale = 0.0f,
2282 .zeroPoint = 0,
2283 .lifetime = TestOperandLifeTime::CONSTANT_COPY,
2284 .channelQuant = {},
2285 .isIgnored = false,
2286 .data = TestBuffer::createFromVector<int32_t>({0})
2287 }},
2288 .operations = {{
2289 .type = TestOperationType::ADD,
2290 .inputs = {3, 4, 5},
2291 .outputs = {0}
2292 }, {
2293 .type = TestOperationType::ADD,
2294 .inputs = {6, 7, 8},
2295 .outputs = {1}
2296 }, {
2297 .type = TestOperationType::PRELU,
2298 .inputs = {0, 1},
2299 .outputs = {2}
2300 }},
2301 .inputIndexes = {3, 6},
2302 .outputIndexes = {2}
2303 },
2304 .referenced = {},
2305 .isRelaxed = false,
2306 .expectedMultinomialDistributionTolerance = 0,
2307 .expectFailure = false,
2308 .minSupportedVersion = TestHalVersion::V1_2
2309 };
2310 return model;
2311 }
2312
2313 const auto dummy_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_float16_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal());
2314
2315 } // namespace generated_tests::prelu
2316
2317