1 // Generated from abs.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;
6
7 namespace generated_tests::abs {
8
get_test_model()9 const TestModel& get_test_model() {
10 static TestModel model = {
11 .expectFailure = false,
12 .expectedMultinomialDistributionTolerance = 0,
13 .isRelaxed = false,
14 .main = {
15 .inputIndexes = {0},
16 .operands = {{ // input0
17 .channelQuant = {},
18 .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}),
19 .dimensions = {1, 2, 3, 4, 5},
20 .isIgnored = false,
21 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
22 .numberOfConsumers = 1,
23 .scale = 0.0f,
24 .type = TestOperandType::TENSOR_FLOAT32,
25 .zeroPoint = 0
26 }, { // output0
27 .channelQuant = {},
28 .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}),
29 .dimensions = {1, 2, 3, 4, 5},
30 .isIgnored = false,
31 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
32 .numberOfConsumers = 0,
33 .scale = 0.0f,
34 .type = TestOperandType::TENSOR_FLOAT32,
35 .zeroPoint = 0
36 }},
37 .operations = {{
38 .inputs = {0},
39 .outputs = {1},
40 .type = TestOperationType::ABS
41 }},
42 .outputIndexes = {1}
43 },
44 .minSupportedVersion = TestHalVersion::V1_2,
45 .referenced = {}
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 .expectFailure = false,
59 .expectedMultinomialDistributionTolerance = 0,
60 .isRelaxed = true,
61 .main = {
62 .inputIndexes = {0},
63 .operands = {{ // input0
64 .channelQuant = {},
65 .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}),
66 .dimensions = {1, 2, 3, 4, 5},
67 .isIgnored = false,
68 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
69 .numberOfConsumers = 1,
70 .scale = 0.0f,
71 .type = TestOperandType::TENSOR_FLOAT32,
72 .zeroPoint = 0
73 }, { // output0
74 .channelQuant = {},
75 .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}),
76 .dimensions = {1, 2, 3, 4, 5},
77 .isIgnored = false,
78 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
79 .numberOfConsumers = 0,
80 .scale = 0.0f,
81 .type = TestOperandType::TENSOR_FLOAT32,
82 .zeroPoint = 0
83 }},
84 .operations = {{
85 .inputs = {0},
86 .outputs = {1},
87 .type = TestOperationType::ABS
88 }},
89 .outputIndexes = {1}
90 },
91 .minSupportedVersion = TestHalVersion::UNKNOWN,
92 .referenced = {}
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 .expectFailure = false,
106 .expectedMultinomialDistributionTolerance = 0,
107 .isRelaxed = false,
108 .main = {
109 .inputIndexes = {0},
110 .operands = {{ // input0
111 .channelQuant = {},
112 .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}),
113 .dimensions = {1, 2, 3, 4, 5},
114 .isIgnored = false,
115 .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
116 .numberOfConsumers = 1,
117 .scale = 0.0f,
118 .type = TestOperandType::TENSOR_FLOAT16,
119 .zeroPoint = 0
120 }, { // output0
121 .channelQuant = {},
122 .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}),
123 .dimensions = {1, 2, 3, 4, 5},
124 .isIgnored = false,
125 .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
126 .numberOfConsumers = 0,
127 .scale = 0.0f,
128 .type = TestOperandType::TENSOR_FLOAT16,
129 .zeroPoint = 0
130 }},
131 .operations = {{
132 .inputs = {0},
133 .outputs = {1},
134 .type = TestOperationType::ABS
135 }},
136 .outputIndexes = {1}
137 },
138 .minSupportedVersion = TestHalVersion::V1_2,
139 .referenced = {}
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