1 // clang-format off
2 // Generated file (from: cast.mod.py). Do not edit
3 #include "../../TestGenerated.h"
4 
5 namespace cast {
6 // Generated cast test
7 #include "generated/examples/cast.example.cpp"
8 // Generated model constructor
9 #include "generated/models/cast.model.cpp"
10 } // namespace cast
11 
TEST_F(GeneratedTests,cast_float16_to_float16)12 TEST_F(GeneratedTests, cast_float16_to_float16) {
13     execute(cast::CreateModel,
14             cast::is_ignored,
15             cast::get_examples_float16_to_float16());
16 }
TEST_AVAILABLE_SINCE(V1_2,cast_float16_to_float16,cast::CreateModel)17 TEST_AVAILABLE_SINCE(V1_2, cast_float16_to_float16, cast::CreateModel)
18 
19 TEST_F(DynamicOutputShapeTest, cast_float16_to_float16_dynamic_output_shape) {
20     execute(cast::CreateModel_dynamic_output_shape,
21             cast::is_ignored_dynamic_output_shape,
22             cast::get_examples_float16_to_float16_dynamic_output_shape());
23 }
24 
TEST_F(GeneratedTests,cast_float16_to_float32)25 TEST_F(GeneratedTests, cast_float16_to_float32) {
26     execute(cast::CreateModel_2,
27             cast::is_ignored_2,
28             cast::get_examples_float16_to_float32());
29 }
TEST_AVAILABLE_SINCE(V1_2,cast_float16_to_float32,cast::CreateModel_2)30 TEST_AVAILABLE_SINCE(V1_2, cast_float16_to_float32, cast::CreateModel_2)
31 
32 TEST_F(GeneratedTests, cast_float16_to_float32_relaxed) {
33     execute(cast::CreateModel_relaxed,
34             cast::is_ignored_relaxed,
35             cast::get_examples_float16_to_float32_relaxed());
36 }
37 
TEST_F(DynamicOutputShapeTest,cast_float16_to_float32_dynamic_output_shape)38 TEST_F(DynamicOutputShapeTest, cast_float16_to_float32_dynamic_output_shape) {
39     execute(cast::CreateModel_dynamic_output_shape_2,
40             cast::is_ignored_dynamic_output_shape_2,
41             cast::get_examples_float16_to_float32_dynamic_output_shape());
42 }
43 
TEST_F(DynamicOutputShapeTest,cast_float16_to_float32_dynamic_output_shape_relaxed)44 TEST_F(DynamicOutputShapeTest, cast_float16_to_float32_dynamic_output_shape_relaxed) {
45     execute(cast::CreateModel_dynamic_output_shape_relaxed,
46             cast::is_ignored_dynamic_output_shape_relaxed,
47             cast::get_examples_float16_to_float32_dynamic_output_shape_relaxed());
48 }
49 
TEST_F(GeneratedTests,cast_float16_to_int32)50 TEST_F(GeneratedTests, cast_float16_to_int32) {
51     execute(cast::CreateModel_3,
52             cast::is_ignored_3,
53             cast::get_examples_float16_to_int32());
54 }
TEST_AVAILABLE_SINCE(V1_2,cast_float16_to_int32,cast::CreateModel_3)55 TEST_AVAILABLE_SINCE(V1_2, cast_float16_to_int32, cast::CreateModel_3)
56 
57 TEST_F(DynamicOutputShapeTest, cast_float16_to_int32_dynamic_output_shape) {
58     execute(cast::CreateModel_dynamic_output_shape_3,
59             cast::is_ignored_dynamic_output_shape_3,
60             cast::get_examples_float16_to_int32_dynamic_output_shape());
61 }
62 
TEST_F(GeneratedTests,cast_float16_to_quant8)63 TEST_F(GeneratedTests, cast_float16_to_quant8) {
64     execute(cast::CreateModel_4,
65             cast::is_ignored_4,
66             cast::get_examples_float16_to_quant8());
67 }
TEST_AVAILABLE_SINCE(V1_2,cast_float16_to_quant8,cast::CreateModel_4)68 TEST_AVAILABLE_SINCE(V1_2, cast_float16_to_quant8, cast::CreateModel_4)
69 
70 TEST_F(DynamicOutputShapeTest, cast_float16_to_quant8_dynamic_output_shape) {
71     execute(cast::CreateModel_dynamic_output_shape_4,
72             cast::is_ignored_dynamic_output_shape_4,
73             cast::get_examples_float16_to_quant8_dynamic_output_shape());
74 }
75 
TEST_F(GeneratedTests,cast_float32_to_float16)76 TEST_F(GeneratedTests, cast_float32_to_float16) {
77     execute(cast::CreateModel_5,
78             cast::is_ignored_5,
79             cast::get_examples_float32_to_float16());
80 }
TEST_AVAILABLE_SINCE(V1_2,cast_float32_to_float16,cast::CreateModel_5)81 TEST_AVAILABLE_SINCE(V1_2, cast_float32_to_float16, cast::CreateModel_5)
82 
83 TEST_F(GeneratedTests, cast_float32_to_float16_relaxed) {
84     execute(cast::CreateModel_relaxed_2,
85             cast::is_ignored_relaxed_2,
86             cast::get_examples_float32_to_float16_relaxed());
87 }
88 
TEST_F(DynamicOutputShapeTest,cast_float32_to_float16_dynamic_output_shape)89 TEST_F(DynamicOutputShapeTest, cast_float32_to_float16_dynamic_output_shape) {
90     execute(cast::CreateModel_dynamic_output_shape_5,
91             cast::is_ignored_dynamic_output_shape_5,
92             cast::get_examples_float32_to_float16_dynamic_output_shape());
93 }
94 
TEST_F(DynamicOutputShapeTest,cast_float32_to_float16_dynamic_output_shape_relaxed)95 TEST_F(DynamicOutputShapeTest, cast_float32_to_float16_dynamic_output_shape_relaxed) {
96     execute(cast::CreateModel_dynamic_output_shape_relaxed_2,
97             cast::is_ignored_dynamic_output_shape_relaxed_2,
98             cast::get_examples_float32_to_float16_dynamic_output_shape_relaxed());
99 }
100 
TEST_F(GeneratedTests,cast_float32_to_float32)101 TEST_F(GeneratedTests, cast_float32_to_float32) {
102     execute(cast::CreateModel_6,
103             cast::is_ignored_6,
104             cast::get_examples_float32_to_float32());
105 }
TEST_AVAILABLE_SINCE(V1_2,cast_float32_to_float32,cast::CreateModel_6)106 TEST_AVAILABLE_SINCE(V1_2, cast_float32_to_float32, cast::CreateModel_6)
107 
108 TEST_F(GeneratedTests, cast_float32_to_float32_relaxed) {
109     execute(cast::CreateModel_relaxed_3,
110             cast::is_ignored_relaxed_3,
111             cast::get_examples_float32_to_float32_relaxed());
112 }
113 
TEST_F(DynamicOutputShapeTest,cast_float32_to_float32_dynamic_output_shape)114 TEST_F(DynamicOutputShapeTest, cast_float32_to_float32_dynamic_output_shape) {
115     execute(cast::CreateModel_dynamic_output_shape_6,
116             cast::is_ignored_dynamic_output_shape_6,
117             cast::get_examples_float32_to_float32_dynamic_output_shape());
118 }
119 
TEST_F(DynamicOutputShapeTest,cast_float32_to_float32_dynamic_output_shape_relaxed)120 TEST_F(DynamicOutputShapeTest, cast_float32_to_float32_dynamic_output_shape_relaxed) {
121     execute(cast::CreateModel_dynamic_output_shape_relaxed_3,
122             cast::is_ignored_dynamic_output_shape_relaxed_3,
123             cast::get_examples_float32_to_float32_dynamic_output_shape_relaxed());
124 }
125 
TEST_F(GeneratedTests,cast_float32_to_int32)126 TEST_F(GeneratedTests, cast_float32_to_int32) {
127     execute(cast::CreateModel_7,
128             cast::is_ignored_7,
129             cast::get_examples_float32_to_int32());
130 }
TEST_AVAILABLE_SINCE(V1_2,cast_float32_to_int32,cast::CreateModel_7)131 TEST_AVAILABLE_SINCE(V1_2, cast_float32_to_int32, cast::CreateModel_7)
132 
133 TEST_F(GeneratedTests, cast_float32_to_int32_relaxed) {
134     execute(cast::CreateModel_relaxed_4,
135             cast::is_ignored_relaxed_4,
136             cast::get_examples_float32_to_int32_relaxed());
137 }
138 
TEST_F(DynamicOutputShapeTest,cast_float32_to_int32_dynamic_output_shape)139 TEST_F(DynamicOutputShapeTest, cast_float32_to_int32_dynamic_output_shape) {
140     execute(cast::CreateModel_dynamic_output_shape_7,
141             cast::is_ignored_dynamic_output_shape_7,
142             cast::get_examples_float32_to_int32_dynamic_output_shape());
143 }
144 
TEST_F(DynamicOutputShapeTest,cast_float32_to_int32_dynamic_output_shape_relaxed)145 TEST_F(DynamicOutputShapeTest, cast_float32_to_int32_dynamic_output_shape_relaxed) {
146     execute(cast::CreateModel_dynamic_output_shape_relaxed_4,
147             cast::is_ignored_dynamic_output_shape_relaxed_4,
148             cast::get_examples_float32_to_int32_dynamic_output_shape_relaxed());
149 }
150 
TEST_F(GeneratedTests,cast_float32_to_quant8)151 TEST_F(GeneratedTests, cast_float32_to_quant8) {
152     execute(cast::CreateModel_8,
153             cast::is_ignored_8,
154             cast::get_examples_float32_to_quant8());
155 }
TEST_AVAILABLE_SINCE(V1_2,cast_float32_to_quant8,cast::CreateModel_8)156 TEST_AVAILABLE_SINCE(V1_2, cast_float32_to_quant8, cast::CreateModel_8)
157 
158 TEST_F(GeneratedTests, cast_float32_to_quant8_relaxed) {
159     execute(cast::CreateModel_relaxed_5,
160             cast::is_ignored_relaxed_5,
161             cast::get_examples_float32_to_quant8_relaxed());
162 }
163 
TEST_F(DynamicOutputShapeTest,cast_float32_to_quant8_dynamic_output_shape)164 TEST_F(DynamicOutputShapeTest, cast_float32_to_quant8_dynamic_output_shape) {
165     execute(cast::CreateModel_dynamic_output_shape_8,
166             cast::is_ignored_dynamic_output_shape_8,
167             cast::get_examples_float32_to_quant8_dynamic_output_shape());
168 }
169 
TEST_F(DynamicOutputShapeTest,cast_float32_to_quant8_dynamic_output_shape_relaxed)170 TEST_F(DynamicOutputShapeTest, cast_float32_to_quant8_dynamic_output_shape_relaxed) {
171     execute(cast::CreateModel_dynamic_output_shape_relaxed_5,
172             cast::is_ignored_dynamic_output_shape_relaxed_5,
173             cast::get_examples_float32_to_quant8_dynamic_output_shape_relaxed());
174 }
175 
TEST_F(GeneratedTests,cast_int32_to_float16)176 TEST_F(GeneratedTests, cast_int32_to_float16) {
177     execute(cast::CreateModel_9,
178             cast::is_ignored_9,
179             cast::get_examples_int32_to_float16());
180 }
TEST_AVAILABLE_SINCE(V1_2,cast_int32_to_float16,cast::CreateModel_9)181 TEST_AVAILABLE_SINCE(V1_2, cast_int32_to_float16, cast::CreateModel_9)
182 
183 TEST_F(DynamicOutputShapeTest, cast_int32_to_float16_dynamic_output_shape) {
184     execute(cast::CreateModel_dynamic_output_shape_9,
185             cast::is_ignored_dynamic_output_shape_9,
186             cast::get_examples_int32_to_float16_dynamic_output_shape());
187 }
188 
TEST_F(GeneratedTests,cast_int32_to_float32)189 TEST_F(GeneratedTests, cast_int32_to_float32) {
190     execute(cast::CreateModel_10,
191             cast::is_ignored_10,
192             cast::get_examples_int32_to_float32());
193 }
TEST_AVAILABLE_SINCE(V1_2,cast_int32_to_float32,cast::CreateModel_10)194 TEST_AVAILABLE_SINCE(V1_2, cast_int32_to_float32, cast::CreateModel_10)
195 
196 TEST_F(GeneratedTests, cast_int32_to_float32_relaxed) {
197     execute(cast::CreateModel_relaxed_6,
198             cast::is_ignored_relaxed_6,
199             cast::get_examples_int32_to_float32_relaxed());
200 }
201 
TEST_F(DynamicOutputShapeTest,cast_int32_to_float32_dynamic_output_shape)202 TEST_F(DynamicOutputShapeTest, cast_int32_to_float32_dynamic_output_shape) {
203     execute(cast::CreateModel_dynamic_output_shape_10,
204             cast::is_ignored_dynamic_output_shape_10,
205             cast::get_examples_int32_to_float32_dynamic_output_shape());
206 }
207 
TEST_F(DynamicOutputShapeTest,cast_int32_to_float32_dynamic_output_shape_relaxed)208 TEST_F(DynamicOutputShapeTest, cast_int32_to_float32_dynamic_output_shape_relaxed) {
209     execute(cast::CreateModel_dynamic_output_shape_relaxed_6,
210             cast::is_ignored_dynamic_output_shape_relaxed_6,
211             cast::get_examples_int32_to_float32_dynamic_output_shape_relaxed());
212 }
213 
TEST_F(GeneratedTests,cast_int32_to_int32)214 TEST_F(GeneratedTests, cast_int32_to_int32) {
215     execute(cast::CreateModel_11,
216             cast::is_ignored_11,
217             cast::get_examples_int32_to_int32());
218 }
TEST_AVAILABLE_SINCE(V1_2,cast_int32_to_int32,cast::CreateModel_11)219 TEST_AVAILABLE_SINCE(V1_2, cast_int32_to_int32, cast::CreateModel_11)
220 
221 TEST_F(DynamicOutputShapeTest, cast_int32_to_int32_dynamic_output_shape) {
222     execute(cast::CreateModel_dynamic_output_shape_11,
223             cast::is_ignored_dynamic_output_shape_11,
224             cast::get_examples_int32_to_int32_dynamic_output_shape());
225 }
226 
TEST_F(GeneratedTests,cast_int32_to_quant8)227 TEST_F(GeneratedTests, cast_int32_to_quant8) {
228     execute(cast::CreateModel_12,
229             cast::is_ignored_12,
230             cast::get_examples_int32_to_quant8());
231 }
TEST_AVAILABLE_SINCE(V1_2,cast_int32_to_quant8,cast::CreateModel_12)232 TEST_AVAILABLE_SINCE(V1_2, cast_int32_to_quant8, cast::CreateModel_12)
233 
234 TEST_F(DynamicOutputShapeTest, cast_int32_to_quant8_dynamic_output_shape) {
235     execute(cast::CreateModel_dynamic_output_shape_12,
236             cast::is_ignored_dynamic_output_shape_12,
237             cast::get_examples_int32_to_quant8_dynamic_output_shape());
238 }
239 
TEST_F(GeneratedTests,cast_quant8_to_float16)240 TEST_F(GeneratedTests, cast_quant8_to_float16) {
241     execute(cast::CreateModel_13,
242             cast::is_ignored_13,
243             cast::get_examples_quant8_to_float16());
244 }
TEST_AVAILABLE_SINCE(V1_2,cast_quant8_to_float16,cast::CreateModel_13)245 TEST_AVAILABLE_SINCE(V1_2, cast_quant8_to_float16, cast::CreateModel_13)
246 
247 TEST_F(DynamicOutputShapeTest, cast_quant8_to_float16_dynamic_output_shape) {
248     execute(cast::CreateModel_dynamic_output_shape_13,
249             cast::is_ignored_dynamic_output_shape_13,
250             cast::get_examples_quant8_to_float16_dynamic_output_shape());
251 }
252 
TEST_F(GeneratedTests,cast_quant8_to_float32)253 TEST_F(GeneratedTests, cast_quant8_to_float32) {
254     execute(cast::CreateModel_14,
255             cast::is_ignored_14,
256             cast::get_examples_quant8_to_float32());
257 }
TEST_AVAILABLE_SINCE(V1_2,cast_quant8_to_float32,cast::CreateModel_14)258 TEST_AVAILABLE_SINCE(V1_2, cast_quant8_to_float32, cast::CreateModel_14)
259 
260 TEST_F(GeneratedTests, cast_quant8_to_float32_relaxed) {
261     execute(cast::CreateModel_relaxed_7,
262             cast::is_ignored_relaxed_7,
263             cast::get_examples_quant8_to_float32_relaxed());
264 }
265 
TEST_F(DynamicOutputShapeTest,cast_quant8_to_float32_dynamic_output_shape)266 TEST_F(DynamicOutputShapeTest, cast_quant8_to_float32_dynamic_output_shape) {
267     execute(cast::CreateModel_dynamic_output_shape_14,
268             cast::is_ignored_dynamic_output_shape_14,
269             cast::get_examples_quant8_to_float32_dynamic_output_shape());
270 }
271 
TEST_F(DynamicOutputShapeTest,cast_quant8_to_float32_dynamic_output_shape_relaxed)272 TEST_F(DynamicOutputShapeTest, cast_quant8_to_float32_dynamic_output_shape_relaxed) {
273     execute(cast::CreateModel_dynamic_output_shape_relaxed_7,
274             cast::is_ignored_dynamic_output_shape_relaxed_7,
275             cast::get_examples_quant8_to_float32_dynamic_output_shape_relaxed());
276 }
277 
TEST_F(GeneratedTests,cast_quant8_to_int32)278 TEST_F(GeneratedTests, cast_quant8_to_int32) {
279     execute(cast::CreateModel_15,
280             cast::is_ignored_15,
281             cast::get_examples_quant8_to_int32());
282 }
TEST_AVAILABLE_SINCE(V1_2,cast_quant8_to_int32,cast::CreateModel_15)283 TEST_AVAILABLE_SINCE(V1_2, cast_quant8_to_int32, cast::CreateModel_15)
284 
285 TEST_F(DynamicOutputShapeTest, cast_quant8_to_int32_dynamic_output_shape) {
286     execute(cast::CreateModel_dynamic_output_shape_15,
287             cast::is_ignored_dynamic_output_shape_15,
288             cast::get_examples_quant8_to_int32_dynamic_output_shape());
289 }
290 
TEST_F(GeneratedTests,cast_quant8_to_quant8)291 TEST_F(GeneratedTests, cast_quant8_to_quant8) {
292     execute(cast::CreateModel_16,
293             cast::is_ignored_16,
294             cast::get_examples_quant8_to_quant8());
295 }
TEST_AVAILABLE_SINCE(V1_2,cast_quant8_to_quant8,cast::CreateModel_16)296 TEST_AVAILABLE_SINCE(V1_2, cast_quant8_to_quant8, cast::CreateModel_16)
297 
298 TEST_F(DynamicOutputShapeTest, cast_quant8_to_quant8_dynamic_output_shape) {
299     execute(cast::CreateModel_dynamic_output_shape_16,
300             cast::is_ignored_dynamic_output_shape_16,
301             cast::get_examples_quant8_to_quant8_dynamic_output_shape());
302 }
303 
TEST_F(GeneratedTests,cast_float16_to_quant8_overflow)304 TEST_F(GeneratedTests, cast_float16_to_quant8_overflow) {
305     execute(cast::CreateModel_17,
306             cast::is_ignored_17,
307             cast::get_examples_float16_to_quant8_overflow());
308 }
TEST_AVAILABLE_SINCE(V1_2,cast_float16_to_quant8_overflow,cast::CreateModel_17)309 TEST_AVAILABLE_SINCE(V1_2, cast_float16_to_quant8_overflow, cast::CreateModel_17)
310 
311 TEST_F(DynamicOutputShapeTest, cast_float16_to_quant8_overflow_dynamic_output_shape) {
312     execute(cast::CreateModel_dynamic_output_shape_17,
313             cast::is_ignored_dynamic_output_shape_17,
314             cast::get_examples_float16_to_quant8_overflow_dynamic_output_shape());
315 }
316 
TEST_F(GeneratedTests,cast_float32_to_quant8_overflow)317 TEST_F(GeneratedTests, cast_float32_to_quant8_overflow) {
318     execute(cast::CreateModel_18,
319             cast::is_ignored_18,
320             cast::get_examples_float32_to_quant8_overflow());
321 }
TEST_AVAILABLE_SINCE(V1_2,cast_float32_to_quant8_overflow,cast::CreateModel_18)322 TEST_AVAILABLE_SINCE(V1_2, cast_float32_to_quant8_overflow, cast::CreateModel_18)
323 
324 TEST_F(GeneratedTests, cast_float32_to_quant8_overflow_relaxed) {
325     execute(cast::CreateModel_relaxed_8,
326             cast::is_ignored_relaxed_8,
327             cast::get_examples_float32_to_quant8_overflow_relaxed());
328 }
329 
TEST_F(DynamicOutputShapeTest,cast_float32_to_quant8_overflow_dynamic_output_shape)330 TEST_F(DynamicOutputShapeTest, cast_float32_to_quant8_overflow_dynamic_output_shape) {
331     execute(cast::CreateModel_dynamic_output_shape_18,
332             cast::is_ignored_dynamic_output_shape_18,
333             cast::get_examples_float32_to_quant8_overflow_dynamic_output_shape());
334 }
335 
TEST_F(DynamicOutputShapeTest,cast_float32_to_quant8_overflow_dynamic_output_shape_relaxed)336 TEST_F(DynamicOutputShapeTest, cast_float32_to_quant8_overflow_dynamic_output_shape_relaxed) {
337     execute(cast::CreateModel_dynamic_output_shape_relaxed_8,
338             cast::is_ignored_dynamic_output_shape_relaxed_8,
339             cast::get_examples_float32_to_quant8_overflow_dynamic_output_shape_relaxed());
340 }
341 
TEST_F(GeneratedTests,cast_int32_to_quant8_overflow)342 TEST_F(GeneratedTests, cast_int32_to_quant8_overflow) {
343     execute(cast::CreateModel_19,
344             cast::is_ignored_19,
345             cast::get_examples_int32_to_quant8_overflow());
346 }
TEST_AVAILABLE_SINCE(V1_2,cast_int32_to_quant8_overflow,cast::CreateModel_19)347 TEST_AVAILABLE_SINCE(V1_2, cast_int32_to_quant8_overflow, cast::CreateModel_19)
348 
349 TEST_F(DynamicOutputShapeTest, cast_int32_to_quant8_overflow_dynamic_output_shape) {
350     execute(cast::CreateModel_dynamic_output_shape_19,
351             cast::is_ignored_dynamic_output_shape_19,
352             cast::get_examples_int32_to_quant8_overflow_dynamic_output_shape());
353 }
354 
355