ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FloatSquaredDifferenceKernel.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 ONERT_MICRO_TEST_MODELS_SQUARED_DIFFERENCE_KERNEL_FLOAT_H
18#define ONERT_MICRO_TEST_MODELS_SQUARED_DIFFERENCE_KERNEL_FLOAT_H
19
21
22namespace onert_micro
23{
24namespace test_model
25{
26namespace squared_difference_float_with_broadcasting
27{
28
29/*
30 * SquaredDifference Kernel:
31 *
32 * Input_1(1, 4, 4, 3) Input_2(1, 4, 4, 3)
33 * \ /
34 * SquaredDifference(with broadcast)
35 * |
36 * Output(1, 4, 4, 3)
37 */
38const unsigned char test_kernel_model_circle[] = {
39 0x18, 0x00, 0x00, 0x00, 0x43, 0x49, 0x52, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00,
40 0x0c, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
41 0x30, 0x00, 0x00, 0x00, 0x6c, 0x01, 0x00, 0x00, 0x88, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
42 0x1c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
43 0x88, 0xff, 0xff, 0xff, 0x8c, 0xff, 0xff, 0xff, 0x90, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, 0xff,
44 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x14, 0x00,
45 0x10, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
46 0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
47 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
48 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0c, 0x00,
49 0x07, 0x00, 0x08, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, 0x00,
50 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
51 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
52 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
53 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
54 0x34, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
55 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x6d, 0x00,
56 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
57 0x03, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
58 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x32, 0x00, 0x00, 0x00, 0x00,
59 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
60 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00,
61 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
62 0x04, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x31, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
63 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
64 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x00, 0x00,
65 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63,
66 0x11, 0x00, 0x00, 0x00, 0x4f, 0x4e, 0x45, 0x2d, 0x74, 0x66, 0x6c, 0x69, 0x74, 0x65, 0x32, 0x63,
67 0x69, 0x72, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00};
68
69const std::vector<float> input1_data = {
70 33.44, 44.74834, 42.31354, 17.271736, 46.138657, 42.50795, 9.75354, 11.343542,
71 25.705894, 36.687202, 17.357473, 29.17235, 34.9576, 34.23016, 22.528538, 25.484097,
72 38.542297, 32.78322, 31.368523, 52.47518, 29.052322, 35.70844, 19.942907, 30.840899,
73 45.22654, 22.581013, 24.37784, -7.1113133, 44.58411, 42.722954, 20.67068, 47.006798,
74 40.08999, 25.972889, 51.532227, 15.329674, 22.725258, 37.83095, 24.72808, 32.937607,
75 39.836365, 11.756248, 8.707649, 42.69889, 22.493517, 26.656416, 19.543903, 38.58926};
76const std::vector<float> input2_data = {
77 45.496315, 47.277058, 43.62587, 25.520176, 26.66666, 21.242783, 38.55497, 29.928194,
78 32.247902, 5.110588, 35.261402, 35.692963, 30.808405, 30.916706, 38.445484, 32.367344,
79 20.506172, 21.414955, 39.93972, 34.694054, 36.724403, 17.250431, 34.863686, 32.42676,
80 31.634842, 44.39825, 31.116629, 18.85633, 19.150063, 33.974716, 26.233631, 29.054287,
81 29.618658, 38.05911, 54.44181, 28.360674, 15.703876, 39.576363, 29.899979, 26.719788,
82 56.03285, 50.236435, 41.24733, 31.759392, 47.402603, 34.884254, 38.37292, 18.049467};
83const std::vector<float> reference_output_data = {
84 145.35477, 6.3944097, 1.7222056, 68.03676, 379.15863, 452.20734, 829.52234, 345.38928,
85 42.797863, 997.0826, 320.55066, 42.51839, 17.215816, 10.978975, 253.34918, 47.379093,
86 325.30182, 129.23741, 73.46542, 316.16852, 58.86083, 340.69806, 222.62962, 2.5149617,
87 184.73425, 475.99188, 45.41127, 674.31854, 646.8908, 76.53166, 30.946436, 322.29263,
88 109.648766, 146.0767, 8.465679, 169.80696, 49.29981, 3.0464592, 26.748528, 38.661274,
89 262.32608, 1480.7247, 1058.8308, 119.67264, 620.4626, 67.69733, 354.5319, 421.8831};
90
91} // namespace squared_difference_float_with_broadcasting
92
108
109} // namespace test_model
110} // namespace onert_micro
111
112#endif // ONERT_MICRO_TEST_MODELS_SQUARED_DIFFERENCE_KERNEL_FLOAT_H