ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FloatAddNKernel.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef LUCI_INTERPRETER_TEST_MODELS_ADD_N_KERNEL_FLOAT_H
18#define LUCI_INTERPRETER_TEST_MODELS_ADD_N_KERNEL_FLOAT_H
19
20#include "TestDataAddNBase.h"
21
22namespace onert_micro
23{
24namespace test_model
25{
26namespace add_n_float
27{
28/*
29 * AddN Kernel:
30 *
31 * Input_1(1, 4, 4, 3) Input_2(1, 4, 4, 3) Input_3(1, 4, 4, 3)
32 * \ | /
33 * AddN
34 * |
35 * Output(1, 4, 4, 3)
36 */
37const unsigned char test_kernel_model_circle[] = {
38 0x18, 0x00, 0x00, 0x00, 0x43, 0x49, 0x52, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00,
39 0x0c, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
40 0x38, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
41 0x24, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
42 0x04, 0x00, 0x00, 0x00, 0x84, 0xff, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0x8c, 0xff, 0xff, 0xff,
43 0x90, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
44 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x04, 0x00,
45 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
46 0x68, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e,
47 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
48 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x08, 0x00, 0x0e, 0x00, 0x00, 0x00,
49 0x00, 0x00, 0x00, 0x52, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
50 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
51 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
52 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
53 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
54 0x68, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0xff, 0xff, 0xff,
55 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
56 0x6f, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
57 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xa0, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
58 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x33,
59 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
60 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
61 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x32,
62 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
63 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
64 0x08, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
65 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x31, 0x00, 0x00, 0x00, 0x00,
66 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
67 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00,
68 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00,
69 0x00, 0x00, 0x00, 0x6a, 0x11, 0x00, 0x00, 0x00, 0x4f, 0x4e, 0x45, 0x2d, 0x74, 0x66, 0x6c, 0x69,
70 0x74, 0x65, 0x32, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00};
71
72const std::vector<float> input1_data = {
73 6.427741, -5.5336685, -6.2939873, 8.121177, -3.0810785, -10.091913, -2.4849992, 1.774254,
74 13.800129, -22.152988, 12.696625, 0.2929567, 8.354922, 5.7603703, -5.8994074, -18.484707,
75 8.926415, 15.341654, 4.8836274, 5.289197, -9.766411, 13.688, -2.9341066, 7.2281685,
76 -7.639269, -19.849337, -10.183603, -3.39605, 7.0884247, -4.100115, -13.114395, 20.1859,
77 8.514902, -2.8839726, -4.8524947, -7.7189302, 12.958817, 0.7408314, -14.70222, -4.840035,
78 -5.6485643, 9.197558, 4.805386, -5.6769075, -4.0590677, -6.5562315, 7.0200677, -0.99683046};
79const std::vector<float> input2_data = {
80 -4.0646977, 3.8888195, -0.45402065, -2.352005, 4.839372, -16.821068, 6.937857, 6.233658,
81 16.912395, -7.1494417, 6.260419, -0.9814551, 5.560984, 2.5352159, 3.3039222, -13.475629,
82 21.22035, -14.078774, 5.582642, 4.1715817, -3.3241076, 1.4076965, -1.1146233, -5.846616,
83 -9.14507, -7.9248514, 3.61239, -4.173052, 1.4289827, 1.0473942, -8.506401, -11.117105,
84 11.395946, -3.0757384, -13.336702, 1.6729355, 9.1125765, -5.3872676, -17.386013, 1.4701926,
85 -16.397867, 9.311203, -9.718552, -8.854298, 8.296376, 3.8650365, 8.381851, -6.6090994};
86const std::vector<float> input3_data = {
87 11.190196, 5.642186, -7.297735, 11.227684, -1.727619, 1.9045501, -9.593952, -16.171299,
88 -6.0474806, 3.3553686, 19.021252, -3.9855165, 5.2290893, 8.515632, -8.236364, 12.097031,
89 7.9482317, 1.4470768, -0.58474195, -2.9820383, 9.381822, 8.335634, 0.9053579, -0.120785415,
90 7.994109, -7.4182167, 9.492107, 0.7696781, 6.868584, 6.2453837, 1.7782576, 5.5902786,
91 9.0994215, -8.651535, -0.6730907, 1.4408729, 5.3254695, 4.124748, 8.724231, -6.1463547,
92 2.751103, -4.8675337, -9.386753, -15.851856, 5.0927544, 0.2861572, -2.6495001, -4.626466};
93const std::vector<float> reference_output_data = {
94 13.55324, 3.997337, -14.045743, 16.996857, 0.030674577, -25.00843, -5.141094, -8.163387,
95 24.665043, -25.94706, 37.978294, -4.674015, 19.144997, 16.811218, -10.83185, -19.863304,
96 38.094997, 2.7099562, 9.881528, 6.4787407, -3.7086973, 23.431332, -3.143372, 1.2607672,
97 -8.790231, -35.192406, 2.9208941, -6.7994237, 15.385992, 3.1926632, -19.842539, 14.659074,
98 29.01027, -14.611246, -18.862288, -4.6051216, 27.396862, -0.521688, -23.364002, -9.516197,
99 -19.29533, 13.641229, -14.299919, -30.38306, 9.330063, -2.4050379, 12.7524185, -12.232395};
100
101} // namespace add_n_float
102
117
118} // namespace test_model
119} // namespace onert_micro
120
121#endif // LUCI_INTERPRETER_TEST_MODELS_ADD_N_KERNEL_FLOAT_H
const std::vector< float > input3_data
const unsigned char test_kernel_model_circle[]
const std::vector< float > reference_output_data
const std::vector< float > input1_data
const std::vector< float > input2_data