1 // Generated from abs.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::abs {
8 
get_test_model()9 const TestModel& get_test_model() {
10     static TestModel model = {
11         .main = {
12                 .operands = {{ // input0
13                             .type = TestOperandType::TENSOR_FLOAT32,
14                             .dimensions = {1, 2, 3, 4, 5},
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>({-6.0f, -5.9f, -5.8f, -5.7f, -5.6f, -5.5f, -5.4f, -5.3f, -5.2f, -5.1f, -5.0f, -4.9f, -4.8f, -4.7f, -4.6f, -4.5f, -4.4f, -4.3f, -4.2f, -4.1f, -4.0f, -3.9f, -3.8f, -3.7f, -3.6f, -3.5f, -3.4f, -3.3f, -3.2f, -3.1f, -3.0f, -2.9f, -2.8f, -2.7f, -2.6f, -2.5f, -2.4f, -2.3f, -2.2f, -2.1f, -2.0f, -1.9f, -1.8f, -1.7f, -1.6f, -1.5f, -1.4f, -1.3f, -1.2f, -1.1f, -1.0f, -0.9f, -0.8f, -0.7f, -0.6f, -0.5f, -0.4f, -0.3f, -0.2f, -0.1f, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.1f, 2.2f, 2.3f, 2.4f, 2.5f, 2.6f, 2.7f, 2.8f, 2.9f, 3.0f, 3.1f, 3.2f, 3.3f, 3.4f, 3.5f, 3.6f, 3.7f, 3.8f, 3.9f, 4.0f, 4.1f, 4.2f, 4.3f, 4.4f, 4.5f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 5.1f, 5.2f, 5.3f, 5.4f, 5.5f, 5.6f, 5.7f, 5.8f, 5.9f})
22                         }, { // output0
23                             .type = TestOperandType::TENSOR_FLOAT32,
24                             .dimensions = {1, 2, 3, 4, 5},
25                             .numberOfConsumers = 0,
26                             .scale = 0.0f,
27                             .zeroPoint = 0,
28                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
29                             .channelQuant = {},
30                             .isIgnored = false,
31                             .data = TestBuffer::createFromVector<float>({6.0f, 5.9f, 5.8f, 5.7f, 5.6f, 5.5f, 5.4f, 5.3f, 5.2f, 5.1f, 5.0f, 4.9f, 4.8f, 4.7f, 4.6f, 4.5f, 4.4f, 4.3f, 4.2f, 4.1f, 4.0f, 3.9f, 3.8f, 3.7f, 3.6f, 3.5f, 3.4f, 3.3f, 3.2f, 3.1f, 3.0f, 2.9f, 2.8f, 2.7f, 2.6f, 2.5f, 2.4f, 2.3f, 2.2f, 2.1f, 2.0f, 1.9f, 1.8f, 1.7f, 1.6f, 1.5f, 1.4f, 1.3f, 1.2f, 1.1f, 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.1f, 2.2f, 2.3f, 2.4f, 2.5f, 2.6f, 2.7f, 2.8f, 2.9f, 3.0f, 3.1f, 3.2f, 3.3f, 3.4f, 3.5f, 3.6f, 3.7f, 3.8f, 3.9f, 4.0f, 4.1f, 4.2f, 4.3f, 4.4f, 4.5f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 5.1f, 5.2f, 5.3f, 5.4f, 5.5f, 5.6f, 5.7f, 5.8f, 5.9f})
32                         }},
33                 .operations = {{
34                             .type = TestOperationType::ABS,
35                             .inputs = {0},
36                             .outputs = {1}
37                         }},
38                 .inputIndexes = {0},
39                 .outputIndexes = {1}
40             },
41         .referenced = {},
42         .isRelaxed = false,
43         .expectedMultinomialDistributionTolerance = 0,
44         .expectFailure = false,
45         .minSupportedVersion = TestHalVersion::V1_2
46     };
47     return model;
48 }
49 
50 const auto dummy_test_model = TestModelManager::get().add("abs", get_test_model());
51 
52 }  // namespace generated_tests::abs
53 
54 namespace generated_tests::abs {
55 
get_test_model_relaxed()56 const TestModel& get_test_model_relaxed() {
57     static TestModel model = {
58         .main = {
59                 .operands = {{ // input0
60                             .type = TestOperandType::TENSOR_FLOAT32,
61                             .dimensions = {1, 2, 3, 4, 5},
62                             .numberOfConsumers = 1,
63                             .scale = 0.0f,
64                             .zeroPoint = 0,
65                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
66                             .channelQuant = {},
67                             .isIgnored = false,
68                             .data = TestBuffer::createFromVector<float>({-6.0f, -5.9f, -5.8f, -5.7f, -5.6f, -5.5f, -5.4f, -5.3f, -5.2f, -5.1f, -5.0f, -4.9f, -4.8f, -4.7f, -4.6f, -4.5f, -4.4f, -4.3f, -4.2f, -4.1f, -4.0f, -3.9f, -3.8f, -3.7f, -3.6f, -3.5f, -3.4f, -3.3f, -3.2f, -3.1f, -3.0f, -2.9f, -2.8f, -2.7f, -2.6f, -2.5f, -2.4f, -2.3f, -2.2f, -2.1f, -2.0f, -1.9f, -1.8f, -1.7f, -1.6f, -1.5f, -1.4f, -1.3f, -1.2f, -1.1f, -1.0f, -0.9f, -0.8f, -0.7f, -0.6f, -0.5f, -0.4f, -0.3f, -0.2f, -0.1f, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.1f, 2.2f, 2.3f, 2.4f, 2.5f, 2.6f, 2.7f, 2.8f, 2.9f, 3.0f, 3.1f, 3.2f, 3.3f, 3.4f, 3.5f, 3.6f, 3.7f, 3.8f, 3.9f, 4.0f, 4.1f, 4.2f, 4.3f, 4.4f, 4.5f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 5.1f, 5.2f, 5.3f, 5.4f, 5.5f, 5.6f, 5.7f, 5.8f, 5.9f})
69                         }, { // output0
70                             .type = TestOperandType::TENSOR_FLOAT32,
71                             .dimensions = {1, 2, 3, 4, 5},
72                             .numberOfConsumers = 0,
73                             .scale = 0.0f,
74                             .zeroPoint = 0,
75                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
76                             .channelQuant = {},
77                             .isIgnored = false,
78                             .data = TestBuffer::createFromVector<float>({6.0f, 5.9f, 5.8f, 5.7f, 5.6f, 5.5f, 5.4f, 5.3f, 5.2f, 5.1f, 5.0f, 4.9f, 4.8f, 4.7f, 4.6f, 4.5f, 4.4f, 4.3f, 4.2f, 4.1f, 4.0f, 3.9f, 3.8f, 3.7f, 3.6f, 3.5f, 3.4f, 3.3f, 3.2f, 3.1f, 3.0f, 2.9f, 2.8f, 2.7f, 2.6f, 2.5f, 2.4f, 2.3f, 2.2f, 2.1f, 2.0f, 1.9f, 1.8f, 1.7f, 1.6f, 1.5f, 1.4f, 1.3f, 1.2f, 1.1f, 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.1f, 2.2f, 2.3f, 2.4f, 2.5f, 2.6f, 2.7f, 2.8f, 2.9f, 3.0f, 3.1f, 3.2f, 3.3f, 3.4f, 3.5f, 3.6f, 3.7f, 3.8f, 3.9f, 4.0f, 4.1f, 4.2f, 4.3f, 4.4f, 4.5f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 5.1f, 5.2f, 5.3f, 5.4f, 5.5f, 5.6f, 5.7f, 5.8f, 5.9f})
79                         }},
80                 .operations = {{
81                             .type = TestOperationType::ABS,
82                             .inputs = {0},
83                             .outputs = {1}
84                         }},
85                 .inputIndexes = {0},
86                 .outputIndexes = {1}
87             },
88         .referenced = {},
89         .isRelaxed = true,
90         .expectedMultinomialDistributionTolerance = 0,
91         .expectFailure = false,
92         .minSupportedVersion = TestHalVersion::UNKNOWN
93     };
94     return model;
95 }
96 
97 const auto dummy_test_model_relaxed = TestModelManager::get().add("abs_relaxed", get_test_model_relaxed());
98 
99 }  // namespace generated_tests::abs
100 
101 namespace generated_tests::abs {
102 
get_test_model_float16()103 const TestModel& get_test_model_float16() {
104     static TestModel model = {
105         .main = {
106                 .operands = {{ // input0
107                             .type = TestOperandType::TENSOR_FLOAT16,
108                             .dimensions = {1, 2, 3, 4, 5},
109                             .numberOfConsumers = 1,
110                             .scale = 0.0f,
111                             .zeroPoint = 0,
112                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
113                             .channelQuant = {},
114                             .isIgnored = false,
115                             .data = TestBuffer::createFromVector<_Float16>({-6.0f, -5.900000095367432f, -5.800000190734863f, -5.699999809265137f, -5.599999904632568f, -5.5f, -5.400000095367432f, -5.300000190734863f, -5.199999809265137f, -5.099999904632568f, -5.0f, -4.900000095367432f, -4.800000190734863f, -4.699999809265137f, -4.599999904632568f, -4.5f, -4.400000095367432f, -4.300000190734863f, -4.199999809265137f, -4.099999904632568f, -4.0f, -3.9000000953674316f, -3.799999952316284f, -3.700000047683716f, -3.5999999046325684f, -3.5f, -3.4000000953674316f, -3.299999952316284f, -3.200000047683716f, -3.0999999046325684f, -3.0f, -2.9000000953674316f, -2.799999952316284f, -2.700000047683716f, -2.5999999046325684f, -2.5f, -2.4000000953674316f, -2.299999952316284f, -2.200000047683716f, -2.0999999046325684f, -2.0f, -1.899999976158142f, -1.7999999523162842f, -1.7000000476837158f, -1.600000023841858f, -1.5f, -1.399999976158142f, -1.2999999523162842f, -1.2000000476837158f, -1.100000023841858f, -1.0f, -0.8999999761581421f, -0.800000011920929f, -0.699999988079071f, -0.6000000238418579f, -0.5f, -0.4000000059604645f, -0.30000001192092896f, -0.20000000298023224f, -0.10000000149011612f, 0.0f, 0.10000000149011612f, 0.20000000298023224f, 0.30000001192092896f, 0.4000000059604645f, 0.5f, 0.6000000238418579f, 0.699999988079071f, 0.800000011920929f, 0.8999999761581421f, 1.0f, 1.100000023841858f, 1.2000000476837158f, 1.2999999523162842f, 1.399999976158142f, 1.5f, 1.600000023841858f, 1.7000000476837158f, 1.7999999523162842f, 1.899999976158142f, 2.0f, 2.0999999046325684f, 2.200000047683716f, 2.299999952316284f, 2.4000000953674316f, 2.5f, 2.5999999046325684f, 2.700000047683716f, 2.799999952316284f, 2.9000000953674316f, 3.0f, 3.0999999046325684f, 3.200000047683716f, 3.299999952316284f, 3.4000000953674316f, 3.5f, 3.5999999046325684f, 3.700000047683716f, 3.799999952316284f, 3.9000000953674316f, 4.0f, 4.099999904632568f, 4.199999809265137f, 4.300000190734863f, 4.400000095367432f, 4.5f, 4.599999904632568f, 4.699999809265137f, 4.800000190734863f, 4.900000095367432f, 5.0f, 5.099999904632568f, 5.199999809265137f, 5.300000190734863f, 5.400000095367432f, 5.5f, 5.599999904632568f, 5.699999809265137f, 5.800000190734863f, 5.900000095367432f})
116                         }, { // output0
117                             .type = TestOperandType::TENSOR_FLOAT16,
118                             .dimensions = {1, 2, 3, 4, 5},
119                             .numberOfConsumers = 0,
120                             .scale = 0.0f,
121                             .zeroPoint = 0,
122                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
123                             .channelQuant = {},
124                             .isIgnored = false,
125                             .data = TestBuffer::createFromVector<_Float16>({6.0f, 5.900000095367432f, 5.800000190734863f, 5.699999809265137f, 5.599999904632568f, 5.5f, 5.400000095367432f, 5.300000190734863f, 5.199999809265137f, 5.099999904632568f, 5.0f, 4.900000095367432f, 4.800000190734863f, 4.699999809265137f, 4.599999904632568f, 4.5f, 4.400000095367432f, 4.300000190734863f, 4.199999809265137f, 4.099999904632568f, 4.0f, 3.9000000953674316f, 3.799999952316284f, 3.700000047683716f, 3.5999999046325684f, 3.5f, 3.4000000953674316f, 3.299999952316284f, 3.200000047683716f, 3.0999999046325684f, 3.0f, 2.9000000953674316f, 2.799999952316284f, 2.700000047683716f, 2.5999999046325684f, 2.5f, 2.4000000953674316f, 2.299999952316284f, 2.200000047683716f, 2.0999999046325684f, 2.0f, 1.899999976158142f, 1.7999999523162842f, 1.7000000476837158f, 1.600000023841858f, 1.5f, 1.399999976158142f, 1.2999999523162842f, 1.2000000476837158f, 1.100000023841858f, 1.0f, 0.8999999761581421f, 0.800000011920929f, 0.699999988079071f, 0.6000000238418579f, 0.5f, 0.4000000059604645f, 0.30000001192092896f, 0.20000000298023224f, 0.10000000149011612f, 0.0f, 0.10000000149011612f, 0.20000000298023224f, 0.30000001192092896f, 0.4000000059604645f, 0.5f, 0.6000000238418579f, 0.699999988079071f, 0.800000011920929f, 0.8999999761581421f, 1.0f, 1.100000023841858f, 1.2000000476837158f, 1.2999999523162842f, 1.399999976158142f, 1.5f, 1.600000023841858f, 1.7000000476837158f, 1.7999999523162842f, 1.899999976158142f, 2.0f, 2.0999999046325684f, 2.200000047683716f, 2.299999952316284f, 2.4000000953674316f, 2.5f, 2.5999999046325684f, 2.700000047683716f, 2.799999952316284f, 2.9000000953674316f, 3.0f, 3.0999999046325684f, 3.200000047683716f, 3.299999952316284f, 3.4000000953674316f, 3.5f, 3.5999999046325684f, 3.700000047683716f, 3.799999952316284f, 3.9000000953674316f, 4.0f, 4.099999904632568f, 4.199999809265137f, 4.300000190734863f, 4.400000095367432f, 4.5f, 4.599999904632568f, 4.699999809265137f, 4.800000190734863f, 4.900000095367432f, 5.0f, 5.099999904632568f, 5.199999809265137f, 5.300000190734863f, 5.400000095367432f, 5.5f, 5.599999904632568f, 5.699999809265137f, 5.800000190734863f, 5.900000095367432f})
126                         }},
127                 .operations = {{
128                             .type = TestOperationType::ABS,
129                             .inputs = {0},
130                             .outputs = {1}
131                         }},
132                 .inputIndexes = {0},
133                 .outputIndexes = {1}
134             },
135         .referenced = {},
136         .isRelaxed = false,
137         .expectedMultinomialDistributionTolerance = 0,
138         .expectFailure = false,
139         .minSupportedVersion = TestHalVersion::V1_2
140     };
141     return model;
142 }
143 
144 const auto dummy_test_model_float16 = TestModelManager::get().add("abs_float16", get_test_model_float16());
145 
146 }  // namespace generated_tests::abs
147 
148