1 // Copyright 2020 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5
6 #include <xnnpack.h>
7
8 #include <array>
9 #include <algorithm>
10 #include <functional>
11 #include <iostream>
12 #include <limits>
13 #include <random>
14
15 #include <xnnpack/cache.h>
16
17 #include <fp16/fp16.h>
18
19 #include "models/models.h"
20
21 namespace models {
22
FP16MobileNetV1(pthreadpool_t threadpool)23 ExecutionPlan FP16MobileNetV1(pthreadpool_t threadpool) {
24 alignas(16) static std::array<uint16_t, 150528 + XNN_EXTRA_BYTES / sizeof(uint16_t)> v0;
25 alignas(16) static std::array<uint16_t, 401408> v1;
26 alignas(16) static std::array<uint16_t, 401408> v2;
27 alignas(16) static std::array<uint16_t, 802816> v3;
28 alignas(16) static std::array<uint16_t, 200704> v4;
29 alignas(16) static std::array<uint16_t, 401408> v5;
30 alignas(16) static std::array<uint16_t, 401408> v6;
31 alignas(16) static std::array<uint16_t, 401408> v7;
32 alignas(16) static std::array<uint16_t, 100352> v8;
33 alignas(16) static std::array<uint16_t, 200704> v9;
34 alignas(16) static std::array<uint16_t, 200704> v10;
35 alignas(16) static std::array<uint16_t, 200704> v11;
36 alignas(16) static std::array<uint16_t, 50176> v12;
37 alignas(16) static std::array<uint16_t, 100352> v13;
38 alignas(16) static std::array<uint16_t, 100352> v14;
39 alignas(16) static std::array<uint16_t, 100352> v15;
40 alignas(16) static std::array<uint16_t, 100352> v16;
41 alignas(16) static std::array<uint16_t, 100352> v17;
42 alignas(16) static std::array<uint16_t, 100352> v18;
43 alignas(16) static std::array<uint16_t, 100352> v19;
44 alignas(16) static std::array<uint16_t, 100352> v20;
45 alignas(16) static std::array<uint16_t, 100352> v21;
46 alignas(16) static std::array<uint16_t, 100352> v22;
47 alignas(16) static std::array<uint16_t, 100352> v23;
48 alignas(16) static std::array<uint16_t, 25088> v24;
49 alignas(16) static std::array<uint16_t, 50176> v25;
50 alignas(16) static std::array<uint16_t, 50176> v26;
51 alignas(16) static std::array<uint16_t, 50176> v27;
52 alignas(16) static std::array<uint16_t, 1024> v28;
53 alignas(16) static std::array<uint16_t, 1001> v29;
54 alignas(16) static std::array<uint16_t, 864> w30;
55 alignas(16) static std::array<uint16_t, 32> w31;
56 alignas(16) static std::array<uint16_t, 288> w32;
57 alignas(16) static std::array<uint16_t, 32> w33;
58 alignas(16) static std::array<uint16_t, 2048> w34;
59 alignas(16) static std::array<uint16_t, 64> w35;
60 alignas(16) static std::array<uint16_t, 576> w36;
61 alignas(16) static std::array<uint16_t, 64> w37;
62 alignas(16) static std::array<uint16_t, 8192> w38;
63 alignas(16) static std::array<uint16_t, 128> w39;
64 alignas(16) static std::array<uint16_t, 1152> w40;
65 alignas(16) static std::array<uint16_t, 128> w41;
66 alignas(16) static std::array<uint16_t, 16384> w42;
67 alignas(16) static std::array<uint16_t, 128> w43;
68 alignas(16) static std::array<uint16_t, 1152> w44;
69 alignas(16) static std::array<uint16_t, 128> w45;
70 alignas(16) static std::array<uint16_t, 32768> w46;
71 alignas(16) static std::array<uint16_t, 256> w47;
72 alignas(16) static std::array<uint16_t, 2304> w48;
73 alignas(16) static std::array<uint16_t, 256> w49;
74 alignas(16) static std::array<uint16_t, 65536> w50;
75 alignas(16) static std::array<uint16_t, 256> w51;
76 alignas(16) static std::array<uint16_t, 2304> w52;
77 alignas(16) static std::array<uint16_t, 256> w53;
78 alignas(16) static std::array<uint16_t, 131072> w54;
79 alignas(16) static std::array<uint16_t, 512> w55;
80 alignas(16) static std::array<uint16_t, 4608> w56;
81 alignas(16) static std::array<uint16_t, 512> w57;
82 alignas(16) static std::array<uint16_t, 262144> w58;
83 alignas(16) static std::array<uint16_t, 512> w59;
84 alignas(16) static std::array<uint16_t, 4608> w60;
85 alignas(16) static std::array<uint16_t, 512> w61;
86 alignas(16) static std::array<uint16_t, 262144> w62;
87 alignas(16) static std::array<uint16_t, 512> w63;
88 alignas(16) static std::array<uint16_t, 4608> w64;
89 alignas(16) static std::array<uint16_t, 512> w65;
90 alignas(16) static std::array<uint16_t, 262144> w66;
91 alignas(16) static std::array<uint16_t, 512> w67;
92 alignas(16) static std::array<uint16_t, 4608> w68;
93 alignas(16) static std::array<uint16_t, 512> w69;
94 alignas(16) static std::array<uint16_t, 262144> w70;
95 alignas(16) static std::array<uint16_t, 512> w71;
96 alignas(16) static std::array<uint16_t, 4608> w72;
97 alignas(16) static std::array<uint16_t, 512> w73;
98 alignas(16) static std::array<uint16_t, 262144> w74;
99 alignas(16) static std::array<uint16_t, 512> w75;
100 alignas(16) static std::array<uint16_t, 4608> w76;
101 alignas(16) static std::array<uint16_t, 512> w77;
102 alignas(16) static std::array<uint16_t, 524288> w78;
103 alignas(16) static std::array<uint16_t, 1024> w79;
104 alignas(16) static std::array<uint16_t, 9216> w80;
105 alignas(16) static std::array<uint16_t, 1024> w81;
106 alignas(16) static std::array<uint16_t, 1048576> w82;
107 alignas(16) static std::array<uint16_t, 1024> w83;
108 alignas(16) static std::array<uint16_t, 1025024> w84;
109 alignas(16) static std::array<uint16_t, 1001> w85;
110
111 std::random_device random_device;
112 auto rng = std::mt19937(random_device());
113 auto f32rng = std::bind(std::uniform_real_distribution<float>(-1.0f, +1.0f), std::ref(rng));
114 auto f16rng = std::bind(fp16_ieee_from_fp32_value, f32rng);
115 std::generate(v0.begin(), v0.end(), std::ref(f16rng));
116 std::generate(v1.begin(), v1.end(), std::ref(f16rng));
117 std::generate(v2.begin(), v2.end(), std::ref(f16rng));
118 std::generate(v3.begin(), v3.end(), std::ref(f16rng));
119 std::generate(v4.begin(), v4.end(), std::ref(f16rng));
120 std::generate(v5.begin(), v5.end(), std::ref(f16rng));
121 std::generate(v6.begin(), v6.end(), std::ref(f16rng));
122 std::generate(v7.begin(), v7.end(), std::ref(f16rng));
123 std::generate(v8.begin(), v8.end(), std::ref(f16rng));
124 std::generate(v9.begin(), v9.end(), std::ref(f16rng));
125 std::generate(v10.begin(), v10.end(), std::ref(f16rng));
126 std::generate(v11.begin(), v11.end(), std::ref(f16rng));
127 std::generate(v12.begin(), v12.end(), std::ref(f16rng));
128 std::generate(v13.begin(), v13.end(), std::ref(f16rng));
129 std::generate(v14.begin(), v14.end(), std::ref(f16rng));
130 std::generate(v15.begin(), v15.end(), std::ref(f16rng));
131 std::generate(v16.begin(), v16.end(), std::ref(f16rng));
132 std::generate(v17.begin(), v17.end(), std::ref(f16rng));
133 std::generate(v18.begin(), v18.end(), std::ref(f16rng));
134 std::generate(v19.begin(), v19.end(), std::ref(f16rng));
135 std::generate(v20.begin(), v20.end(), std::ref(f16rng));
136 std::generate(v21.begin(), v21.end(), std::ref(f16rng));
137 std::generate(v22.begin(), v22.end(), std::ref(f16rng));
138 std::generate(v23.begin(), v23.end(), std::ref(f16rng));
139 std::generate(v24.begin(), v24.end(), std::ref(f16rng));
140 std::generate(v25.begin(), v25.end(), std::ref(f16rng));
141 std::generate(v26.begin(), v26.end(), std::ref(f16rng));
142 std::generate(v27.begin(), v27.end(), std::ref(f16rng));
143 std::generate(v28.begin(), v28.end(), std::ref(f16rng));
144 std::generate(v29.begin(), v29.end(), std::ref(f16rng));
145 std::generate(w30.begin(), w30.end(), std::ref(f16rng));
146 std::generate(w31.begin(), w31.end(), std::ref(f16rng));
147 std::generate(w32.begin(), w32.end(), std::ref(f16rng));
148 std::generate(w33.begin(), w33.end(), std::ref(f16rng));
149 std::generate(w34.begin(), w34.end(), std::ref(f16rng));
150 std::generate(w35.begin(), w35.end(), std::ref(f16rng));
151 std::generate(w36.begin(), w36.end(), std::ref(f16rng));
152 std::generate(w37.begin(), w37.end(), std::ref(f16rng));
153 std::generate(w38.begin(), w38.end(), std::ref(f16rng));
154 std::generate(w39.begin(), w39.end(), std::ref(f16rng));
155 std::generate(w40.begin(), w40.end(), std::ref(f16rng));
156 std::generate(w41.begin(), w41.end(), std::ref(f16rng));
157 std::generate(w42.begin(), w42.end(), std::ref(f16rng));
158 std::generate(w43.begin(), w43.end(), std::ref(f16rng));
159 std::generate(w44.begin(), w44.end(), std::ref(f16rng));
160 std::generate(w45.begin(), w45.end(), std::ref(f16rng));
161 std::generate(w46.begin(), w46.end(), std::ref(f16rng));
162 std::generate(w47.begin(), w47.end(), std::ref(f16rng));
163 std::generate(w48.begin(), w48.end(), std::ref(f16rng));
164 std::generate(w49.begin(), w49.end(), std::ref(f16rng));
165 std::generate(w50.begin(), w50.end(), std::ref(f16rng));
166 std::generate(w51.begin(), w51.end(), std::ref(f16rng));
167 std::generate(w52.begin(), w52.end(), std::ref(f16rng));
168 std::generate(w53.begin(), w53.end(), std::ref(f16rng));
169 std::generate(w54.begin(), w54.end(), std::ref(f16rng));
170 std::generate(w55.begin(), w55.end(), std::ref(f16rng));
171 std::generate(w56.begin(), w56.end(), std::ref(f16rng));
172 std::generate(w57.begin(), w57.end(), std::ref(f16rng));
173 std::generate(w58.begin(), w58.end(), std::ref(f16rng));
174 std::generate(w59.begin(), w59.end(), std::ref(f16rng));
175 std::generate(w60.begin(), w60.end(), std::ref(f16rng));
176 std::generate(w61.begin(), w61.end(), std::ref(f16rng));
177 std::generate(w62.begin(), w62.end(), std::ref(f16rng));
178 std::generate(w63.begin(), w63.end(), std::ref(f16rng));
179 std::generate(w64.begin(), w64.end(), std::ref(f16rng));
180 std::generate(w65.begin(), w65.end(), std::ref(f16rng));
181 std::generate(w66.begin(), w66.end(), std::ref(f16rng));
182 std::generate(w67.begin(), w67.end(), std::ref(f16rng));
183 std::generate(w68.begin(), w68.end(), std::ref(f16rng));
184 std::generate(w69.begin(), w69.end(), std::ref(f16rng));
185 std::generate(w70.begin(), w70.end(), std::ref(f16rng));
186 std::generate(w71.begin(), w71.end(), std::ref(f16rng));
187 std::generate(w72.begin(), w72.end(), std::ref(f16rng));
188 std::generate(w73.begin(), w73.end(), std::ref(f16rng));
189 std::generate(w74.begin(), w74.end(), std::ref(f16rng));
190 std::generate(w75.begin(), w75.end(), std::ref(f16rng));
191 std::generate(w76.begin(), w76.end(), std::ref(f16rng));
192 std::generate(w77.begin(), w77.end(), std::ref(f16rng));
193 std::generate(w78.begin(), w78.end(), std::ref(f16rng));
194 std::generate(w79.begin(), w79.end(), std::ref(f16rng));
195 std::generate(w80.begin(), w80.end(), std::ref(f16rng));
196 std::generate(w81.begin(), w81.end(), std::ref(f16rng));
197 std::generate(w82.begin(), w82.end(), std::ref(f16rng));
198 std::generate(w83.begin(), w83.end(), std::ref(f16rng));
199 std::generate(w84.begin(), w84.end(), std::ref(f16rng));
200 std::generate(w85.begin(), w85.end(), std::ref(f16rng));
201
202 ExecutionPlan operators;
203 xnn_status status;
204 xnn_code_cache code_cache;
205 #if XNN_PLATFORM_JIT
206 xnn_init_code_cache(&code_cache);
207 #endif
208 xnn_caches caches = { 0 };
209 caches.code_cache = &code_cache;
210
211 xnn_operator_t op0 = nullptr;
212 status = xnn_create_convolution2d_nhwc_f16(
213 0 /* top padding */, 1 /* right padding */,
214 1 /* bottom padding */, 0 /* left padding */,
215 3 /* kernel height */, 3 /* kernel width */,
216 2 /* subsampling height */, 2 /* subsampling width */,
217 1 /* dilation_height */, 1 /* dilation_width */,
218 1 /* groups */,
219 3 /* input channels per group */,
220 32 /* output_channels_per_group */,
221 3 /* input pixel stride */,
222 32 /* output pixel stride */,
223 w30.data(), w31.data(),
224 0.0f /* output min */, 6.0f /* output max */,
225 0 /* flags */,
226 &caches,
227 &op0);
228 if (status != xnn_status_success) {
229 std::cerr << "failed to create operation #0" << std::endl;
230 return ExecutionPlan();
231 }
232 operators.emplace_back(op0, xnn_delete_operator);
233
234 xnn_operator_t op1 = nullptr;
235 status = xnn_create_convolution2d_nhwc_f16(
236 1 /* top padding */, 1 /* right padding */,
237 1 /* bottom padding */, 1 /* left padding */,
238 3 /* kernel height */, 3 /* kernel width */,
239 1 /* subsampling height */, 1 /* subsampling width */,
240 1 /* dilation_height */, 1 /* dilation_width */,
241 32 /* groups */,
242 1 /* input channels per group */,
243 1 /* output_channels_per_group */,
244 32 /* input pixel stride */,
245 32 /* output pixel stride */,
246 w32.data(), w33.data(),
247 0.0f /* output min */, 6.0f /* output max */,
248 0 /* flags */,
249 &caches,
250 &op1);
251 if (status != xnn_status_success) {
252 std::cerr << "failed to create operation #1" << std::endl;
253 return ExecutionPlan();
254 }
255 operators.emplace_back(op1, xnn_delete_operator);
256
257 xnn_operator_t op2 = nullptr;
258 status = xnn_create_convolution2d_nhwc_f16(
259 0 /* top padding */, 0 /* right padding */,
260 0 /* bottom padding */, 0 /* left padding */,
261 1 /* kernel height */, 1 /* kernel width */,
262 1 /* subsampling height */, 1 /* subsampling width */,
263 1 /* dilation_height */, 1 /* dilation_width */,
264 1 /* groups */,
265 32 /* input channels per group */,
266 64 /* output_channels_per_group */,
267 32 /* input pixel stride */,
268 64 /* output pixel stride */,
269 w34.data(), w35.data(),
270 0.0f /* output min */, 6.0f /* output max */,
271 0 /* flags */,
272 &caches,
273 &op2);
274 if (status != xnn_status_success) {
275 std::cerr << "failed to create operation #2" << std::endl;
276 return ExecutionPlan();
277 }
278 operators.emplace_back(op2, xnn_delete_operator);
279
280 xnn_operator_t op3 = nullptr;
281 status = xnn_create_convolution2d_nhwc_f16(
282 0 /* top padding */, 1 /* right padding */,
283 1 /* bottom padding */, 0 /* left padding */,
284 3 /* kernel height */, 3 /* kernel width */,
285 2 /* subsampling height */, 2 /* subsampling width */,
286 1 /* dilation_height */, 1 /* dilation_width */,
287 64 /* groups */,
288 1 /* input channels per group */,
289 1 /* output_channels_per_group */,
290 64 /* input pixel stride */,
291 64 /* output pixel stride */,
292 w36.data(), w37.data(),
293 0.0f /* output min */, 6.0f /* output max */,
294 0 /* flags */,
295 &caches,
296 &op3);
297 if (status != xnn_status_success) {
298 std::cerr << "failed to create operation #3" << std::endl;
299 return ExecutionPlan();
300 }
301 operators.emplace_back(op3, xnn_delete_operator);
302
303 xnn_operator_t op4 = nullptr;
304 status = xnn_create_convolution2d_nhwc_f16(
305 0 /* top padding */, 0 /* right padding */,
306 0 /* bottom padding */, 0 /* left padding */,
307 1 /* kernel height */, 1 /* kernel width */,
308 1 /* subsampling height */, 1 /* subsampling width */,
309 1 /* dilation_height */, 1 /* dilation_width */,
310 1 /* groups */,
311 64 /* input channels per group */,
312 128 /* output_channels_per_group */,
313 64 /* input pixel stride */,
314 128 /* output pixel stride */,
315 w38.data(), w39.data(),
316 0.0f /* output min */, 6.0f /* output max */,
317 0 /* flags */,
318 &caches,
319 &op4);
320 if (status != xnn_status_success) {
321 std::cerr << "failed to create operation #4" << std::endl;
322 return ExecutionPlan();
323 }
324 operators.emplace_back(op4, xnn_delete_operator);
325
326 xnn_operator_t op5 = nullptr;
327 status = xnn_create_convolution2d_nhwc_f16(
328 1 /* top padding */, 1 /* right padding */,
329 1 /* bottom padding */, 1 /* left padding */,
330 3 /* kernel height */, 3 /* kernel width */,
331 1 /* subsampling height */, 1 /* subsampling width */,
332 1 /* dilation_height */, 1 /* dilation_width */,
333 128 /* groups */,
334 1 /* input channels per group */,
335 1 /* output_channels_per_group */,
336 128 /* input pixel stride */,
337 128 /* output pixel stride */,
338 w40.data(), w41.data(),
339 0.0f /* output min */, 6.0f /* output max */,
340 0 /* flags */,
341 &caches,
342 &op5);
343 if (status != xnn_status_success) {
344 std::cerr << "failed to create operation #5" << std::endl;
345 return ExecutionPlan();
346 }
347 operators.emplace_back(op5, xnn_delete_operator);
348
349 xnn_operator_t op6 = nullptr;
350 status = xnn_create_convolution2d_nhwc_f16(
351 0 /* top padding */, 0 /* right padding */,
352 0 /* bottom padding */, 0 /* left padding */,
353 1 /* kernel height */, 1 /* kernel width */,
354 1 /* subsampling height */, 1 /* subsampling width */,
355 1 /* dilation_height */, 1 /* dilation_width */,
356 1 /* groups */,
357 128 /* input channels per group */,
358 128 /* output_channels_per_group */,
359 128 /* input pixel stride */,
360 128 /* output pixel stride */,
361 w42.data(), w43.data(),
362 0.0f /* output min */, 6.0f /* output max */,
363 0 /* flags */,
364 &caches,
365 &op6);
366 if (status != xnn_status_success) {
367 std::cerr << "failed to create operation #6" << std::endl;
368 return ExecutionPlan();
369 }
370 operators.emplace_back(op6, xnn_delete_operator);
371
372 xnn_operator_t op7 = nullptr;
373 status = xnn_create_convolution2d_nhwc_f16(
374 0 /* top padding */, 1 /* right padding */,
375 1 /* bottom padding */, 0 /* left padding */,
376 3 /* kernel height */, 3 /* kernel width */,
377 2 /* subsampling height */, 2 /* subsampling width */,
378 1 /* dilation_height */, 1 /* dilation_width */,
379 128 /* groups */,
380 1 /* input channels per group */,
381 1 /* output_channels_per_group */,
382 128 /* input pixel stride */,
383 128 /* output pixel stride */,
384 w44.data(), w45.data(),
385 0.0f /* output min */, 6.0f /* output max */,
386 0 /* flags */,
387 &caches,
388 &op7);
389 if (status != xnn_status_success) {
390 std::cerr << "failed to create operation #7" << std::endl;
391 return ExecutionPlan();
392 }
393 operators.emplace_back(op7, xnn_delete_operator);
394
395 xnn_operator_t op8 = nullptr;
396 status = xnn_create_convolution2d_nhwc_f16(
397 0 /* top padding */, 0 /* right padding */,
398 0 /* bottom padding */, 0 /* left padding */,
399 1 /* kernel height */, 1 /* kernel width */,
400 1 /* subsampling height */, 1 /* subsampling width */,
401 1 /* dilation_height */, 1 /* dilation_width */,
402 1 /* groups */,
403 128 /* input channels per group */,
404 256 /* output_channels_per_group */,
405 128 /* input pixel stride */,
406 256 /* output pixel stride */,
407 w46.data(), w47.data(),
408 0.0f /* output min */, 6.0f /* output max */,
409 0 /* flags */,
410 &caches,
411 &op8);
412 if (status != xnn_status_success) {
413 std::cerr << "failed to create operation #8" << std::endl;
414 return ExecutionPlan();
415 }
416 operators.emplace_back(op8, xnn_delete_operator);
417
418 xnn_operator_t op9 = nullptr;
419 status = xnn_create_convolution2d_nhwc_f16(
420 1 /* top padding */, 1 /* right padding */,
421 1 /* bottom padding */, 1 /* left padding */,
422 3 /* kernel height */, 3 /* kernel width */,
423 1 /* subsampling height */, 1 /* subsampling width */,
424 1 /* dilation_height */, 1 /* dilation_width */,
425 256 /* groups */,
426 1 /* input channels per group */,
427 1 /* output_channels_per_group */,
428 256 /* input pixel stride */,
429 256 /* output pixel stride */,
430 w48.data(), w49.data(),
431 0.0f /* output min */, 6.0f /* output max */,
432 0 /* flags */,
433 &caches,
434 &op9);
435 if (status != xnn_status_success) {
436 std::cerr << "failed to create operation #9" << std::endl;
437 return ExecutionPlan();
438 }
439 operators.emplace_back(op9, xnn_delete_operator);
440
441 xnn_operator_t op10 = nullptr;
442 status = xnn_create_convolution2d_nhwc_f16(
443 0 /* top padding */, 0 /* right padding */,
444 0 /* bottom padding */, 0 /* left padding */,
445 1 /* kernel height */, 1 /* kernel width */,
446 1 /* subsampling height */, 1 /* subsampling width */,
447 1 /* dilation_height */, 1 /* dilation_width */,
448 1 /* groups */,
449 256 /* input channels per group */,
450 256 /* output_channels_per_group */,
451 256 /* input pixel stride */,
452 256 /* output pixel stride */,
453 w50.data(), w51.data(),
454 0.0f /* output min */, 6.0f /* output max */,
455 0 /* flags */,
456 &caches,
457 &op10);
458 if (status != xnn_status_success) {
459 std::cerr << "failed to create operation #10" << std::endl;
460 return ExecutionPlan();
461 }
462 operators.emplace_back(op10, xnn_delete_operator);
463
464 xnn_operator_t op11 = nullptr;
465 status = xnn_create_convolution2d_nhwc_f16(
466 0 /* top padding */, 1 /* right padding */,
467 1 /* bottom padding */, 0 /* left padding */,
468 3 /* kernel height */, 3 /* kernel width */,
469 2 /* subsampling height */, 2 /* subsampling width */,
470 1 /* dilation_height */, 1 /* dilation_width */,
471 256 /* groups */,
472 1 /* input channels per group */,
473 1 /* output_channels_per_group */,
474 256 /* input pixel stride */,
475 256 /* output pixel stride */,
476 w52.data(), w53.data(),
477 0.0f /* output min */, 6.0f /* output max */,
478 0 /* flags */,
479 &caches,
480 &op11);
481 if (status != xnn_status_success) {
482 std::cerr << "failed to create operation #11" << std::endl;
483 return ExecutionPlan();
484 }
485 operators.emplace_back(op11, xnn_delete_operator);
486
487 xnn_operator_t op12 = nullptr;
488 status = xnn_create_convolution2d_nhwc_f16(
489 0 /* top padding */, 0 /* right padding */,
490 0 /* bottom padding */, 0 /* left padding */,
491 1 /* kernel height */, 1 /* kernel width */,
492 1 /* subsampling height */, 1 /* subsampling width */,
493 1 /* dilation_height */, 1 /* dilation_width */,
494 1 /* groups */,
495 256 /* input channels per group */,
496 512 /* output_channels_per_group */,
497 256 /* input pixel stride */,
498 512 /* output pixel stride */,
499 w54.data(), w55.data(),
500 0.0f /* output min */, 6.0f /* output max */,
501 0 /* flags */,
502 &caches,
503 &op12);
504 if (status != xnn_status_success) {
505 std::cerr << "failed to create operation #12" << std::endl;
506 return ExecutionPlan();
507 }
508 operators.emplace_back(op12, xnn_delete_operator);
509
510 xnn_operator_t op13 = nullptr;
511 status = xnn_create_convolution2d_nhwc_f16(
512 1 /* top padding */, 1 /* right padding */,
513 1 /* bottom padding */, 1 /* left padding */,
514 3 /* kernel height */, 3 /* kernel width */,
515 1 /* subsampling height */, 1 /* subsampling width */,
516 1 /* dilation_height */, 1 /* dilation_width */,
517 512 /* groups */,
518 1 /* input channels per group */,
519 1 /* output_channels_per_group */,
520 512 /* input pixel stride */,
521 512 /* output pixel stride */,
522 w56.data(), w57.data(),
523 0.0f /* output min */, 6.0f /* output max */,
524 0 /* flags */,
525 &caches,
526 &op13);
527 if (status != xnn_status_success) {
528 std::cerr << "failed to create operation #13" << std::endl;
529 return ExecutionPlan();
530 }
531 operators.emplace_back(op13, xnn_delete_operator);
532
533 xnn_operator_t op14 = nullptr;
534 status = xnn_create_convolution2d_nhwc_f16(
535 0 /* top padding */, 0 /* right padding */,
536 0 /* bottom padding */, 0 /* left padding */,
537 1 /* kernel height */, 1 /* kernel width */,
538 1 /* subsampling height */, 1 /* subsampling width */,
539 1 /* dilation_height */, 1 /* dilation_width */,
540 1 /* groups */,
541 512 /* input channels per group */,
542 512 /* output_channels_per_group */,
543 512 /* input pixel stride */,
544 512 /* output pixel stride */,
545 w58.data(), w59.data(),
546 0.0f /* output min */, 6.0f /* output max */,
547 0 /* flags */,
548 &caches,
549 &op14);
550 if (status != xnn_status_success) {
551 std::cerr << "failed to create operation #14" << std::endl;
552 return ExecutionPlan();
553 }
554 operators.emplace_back(op14, xnn_delete_operator);
555
556 xnn_operator_t op15 = nullptr;
557 status = xnn_create_convolution2d_nhwc_f16(
558 1 /* top padding */, 1 /* right padding */,
559 1 /* bottom padding */, 1 /* left padding */,
560 3 /* kernel height */, 3 /* kernel width */,
561 1 /* subsampling height */, 1 /* subsampling width */,
562 1 /* dilation_height */, 1 /* dilation_width */,
563 512 /* groups */,
564 1 /* input channels per group */,
565 1 /* output_channels_per_group */,
566 512 /* input pixel stride */,
567 512 /* output pixel stride */,
568 w60.data(), w61.data(),
569 0.0f /* output min */, 6.0f /* output max */,
570 0 /* flags */,
571 &caches,
572 &op15);
573 if (status != xnn_status_success) {
574 std::cerr << "failed to create operation #15" << std::endl;
575 return ExecutionPlan();
576 }
577 operators.emplace_back(op15, xnn_delete_operator);
578
579 xnn_operator_t op16 = nullptr;
580 status = xnn_create_convolution2d_nhwc_f16(
581 0 /* top padding */, 0 /* right padding */,
582 0 /* bottom padding */, 0 /* left padding */,
583 1 /* kernel height */, 1 /* kernel width */,
584 1 /* subsampling height */, 1 /* subsampling width */,
585 1 /* dilation_height */, 1 /* dilation_width */,
586 1 /* groups */,
587 512 /* input channels per group */,
588 512 /* output_channels_per_group */,
589 512 /* input pixel stride */,
590 512 /* output pixel stride */,
591 w62.data(), w63.data(),
592 0.0f /* output min */, 6.0f /* output max */,
593 0 /* flags */,
594 &caches,
595 &op16);
596 if (status != xnn_status_success) {
597 std::cerr << "failed to create operation #16" << std::endl;
598 return ExecutionPlan();
599 }
600 operators.emplace_back(op16, xnn_delete_operator);
601
602 xnn_operator_t op17 = nullptr;
603 status = xnn_create_convolution2d_nhwc_f16(
604 1 /* top padding */, 1 /* right padding */,
605 1 /* bottom padding */, 1 /* left padding */,
606 3 /* kernel height */, 3 /* kernel width */,
607 1 /* subsampling height */, 1 /* subsampling width */,
608 1 /* dilation_height */, 1 /* dilation_width */,
609 512 /* groups */,
610 1 /* input channels per group */,
611 1 /* output_channels_per_group */,
612 512 /* input pixel stride */,
613 512 /* output pixel stride */,
614 w64.data(), w65.data(),
615 0.0f /* output min */, 6.0f /* output max */,
616 0 /* flags */,
617 &caches,
618 &op17);
619 if (status != xnn_status_success) {
620 std::cerr << "failed to create operation #17" << std::endl;
621 return ExecutionPlan();
622 }
623 operators.emplace_back(op17, xnn_delete_operator);
624
625 xnn_operator_t op18 = nullptr;
626 status = xnn_create_convolution2d_nhwc_f16(
627 0 /* top padding */, 0 /* right padding */,
628 0 /* bottom padding */, 0 /* left padding */,
629 1 /* kernel height */, 1 /* kernel width */,
630 1 /* subsampling height */, 1 /* subsampling width */,
631 1 /* dilation_height */, 1 /* dilation_width */,
632 1 /* groups */,
633 512 /* input channels per group */,
634 512 /* output_channels_per_group */,
635 512 /* input pixel stride */,
636 512 /* output pixel stride */,
637 w66.data(), w67.data(),
638 0.0f /* output min */, 6.0f /* output max */,
639 0 /* flags */,
640 &caches,
641 &op18);
642 if (status != xnn_status_success) {
643 std::cerr << "failed to create operation #18" << std::endl;
644 return ExecutionPlan();
645 }
646 operators.emplace_back(op18, xnn_delete_operator);
647
648 xnn_operator_t op19 = nullptr;
649 status = xnn_create_convolution2d_nhwc_f16(
650 1 /* top padding */, 1 /* right padding */,
651 1 /* bottom padding */, 1 /* left padding */,
652 3 /* kernel height */, 3 /* kernel width */,
653 1 /* subsampling height */, 1 /* subsampling width */,
654 1 /* dilation_height */, 1 /* dilation_width */,
655 512 /* groups */,
656 1 /* input channels per group */,
657 1 /* output_channels_per_group */,
658 512 /* input pixel stride */,
659 512 /* output pixel stride */,
660 w68.data(), w69.data(),
661 0.0f /* output min */, 6.0f /* output max */,
662 0 /* flags */,
663 &caches,
664 &op19);
665 if (status != xnn_status_success) {
666 std::cerr << "failed to create operation #19" << std::endl;
667 return ExecutionPlan();
668 }
669 operators.emplace_back(op19, xnn_delete_operator);
670
671 xnn_operator_t op20 = nullptr;
672 status = xnn_create_convolution2d_nhwc_f16(
673 0 /* top padding */, 0 /* right padding */,
674 0 /* bottom padding */, 0 /* left padding */,
675 1 /* kernel height */, 1 /* kernel width */,
676 1 /* subsampling height */, 1 /* subsampling width */,
677 1 /* dilation_height */, 1 /* dilation_width */,
678 1 /* groups */,
679 512 /* input channels per group */,
680 512 /* output_channels_per_group */,
681 512 /* input pixel stride */,
682 512 /* output pixel stride */,
683 w70.data(), w71.data(),
684 0.0f /* output min */, 6.0f /* output max */,
685 0 /* flags */,
686 &caches,
687 &op20);
688 if (status != xnn_status_success) {
689 std::cerr << "failed to create operation #20" << std::endl;
690 return ExecutionPlan();
691 }
692 operators.emplace_back(op20, xnn_delete_operator);
693
694 xnn_operator_t op21 = nullptr;
695 status = xnn_create_convolution2d_nhwc_f16(
696 1 /* top padding */, 1 /* right padding */,
697 1 /* bottom padding */, 1 /* left padding */,
698 3 /* kernel height */, 3 /* kernel width */,
699 1 /* subsampling height */, 1 /* subsampling width */,
700 1 /* dilation_height */, 1 /* dilation_width */,
701 512 /* groups */,
702 1 /* input channels per group */,
703 1 /* output_channels_per_group */,
704 512 /* input pixel stride */,
705 512 /* output pixel stride */,
706 w72.data(), w73.data(),
707 0.0f /* output min */, 6.0f /* output max */,
708 0 /* flags */,
709 &caches,
710 &op21);
711 if (status != xnn_status_success) {
712 std::cerr << "failed to create operation #21" << std::endl;
713 return ExecutionPlan();
714 }
715 operators.emplace_back(op21, xnn_delete_operator);
716
717 xnn_operator_t op22 = nullptr;
718 status = xnn_create_convolution2d_nhwc_f16(
719 0 /* top padding */, 0 /* right padding */,
720 0 /* bottom padding */, 0 /* left padding */,
721 1 /* kernel height */, 1 /* kernel width */,
722 1 /* subsampling height */, 1 /* subsampling width */,
723 1 /* dilation_height */, 1 /* dilation_width */,
724 1 /* groups */,
725 512 /* input channels per group */,
726 512 /* output_channels_per_group */,
727 512 /* input pixel stride */,
728 512 /* output pixel stride */,
729 w74.data(), w75.data(),
730 0.0f /* output min */, 6.0f /* output max */,
731 0 /* flags */,
732 &caches,
733 &op22);
734 if (status != xnn_status_success) {
735 std::cerr << "failed to create operation #22" << std::endl;
736 return ExecutionPlan();
737 }
738 operators.emplace_back(op22, xnn_delete_operator);
739
740 xnn_operator_t op23 = nullptr;
741 status = xnn_create_convolution2d_nhwc_f16(
742 0 /* top padding */, 1 /* right padding */,
743 1 /* bottom padding */, 0 /* left padding */,
744 3 /* kernel height */, 3 /* kernel width */,
745 2 /* subsampling height */, 2 /* subsampling width */,
746 1 /* dilation_height */, 1 /* dilation_width */,
747 512 /* groups */,
748 1 /* input channels per group */,
749 1 /* output_channels_per_group */,
750 512 /* input pixel stride */,
751 512 /* output pixel stride */,
752 w76.data(), w77.data(),
753 0.0f /* output min */, 6.0f /* output max */,
754 0 /* flags */,
755 &caches,
756 &op23);
757 if (status != xnn_status_success) {
758 std::cerr << "failed to create operation #23" << std::endl;
759 return ExecutionPlan();
760 }
761 operators.emplace_back(op23, xnn_delete_operator);
762
763 xnn_operator_t op24 = nullptr;
764 status = xnn_create_convolution2d_nhwc_f16(
765 0 /* top padding */, 0 /* right padding */,
766 0 /* bottom padding */, 0 /* left padding */,
767 1 /* kernel height */, 1 /* kernel width */,
768 1 /* subsampling height */, 1 /* subsampling width */,
769 1 /* dilation_height */, 1 /* dilation_width */,
770 1 /* groups */,
771 512 /* input channels per group */,
772 1024 /* output_channels_per_group */,
773 512 /* input pixel stride */,
774 1024 /* output pixel stride */,
775 w78.data(), w79.data(),
776 0.0f /* output min */, 6.0f /* output max */,
777 0 /* flags */,
778 &caches,
779 &op24);
780 if (status != xnn_status_success) {
781 std::cerr << "failed to create operation #24" << std::endl;
782 return ExecutionPlan();
783 }
784 operators.emplace_back(op24, xnn_delete_operator);
785
786 xnn_operator_t op25 = nullptr;
787 status = xnn_create_convolution2d_nhwc_f16(
788 1 /* top padding */, 1 /* right padding */,
789 1 /* bottom padding */, 1 /* left padding */,
790 3 /* kernel height */, 3 /* kernel width */,
791 1 /* subsampling height */, 1 /* subsampling width */,
792 1 /* dilation_height */, 1 /* dilation_width */,
793 1024 /* groups */,
794 1 /* input channels per group */,
795 1 /* output_channels_per_group */,
796 1024 /* input pixel stride */,
797 1024 /* output pixel stride */,
798 w80.data(), w81.data(),
799 0.0f /* output min */, 6.0f /* output max */,
800 0 /* flags */,
801 &caches,
802 &op25);
803 if (status != xnn_status_success) {
804 std::cerr << "failed to create operation #25" << std::endl;
805 return ExecutionPlan();
806 }
807 operators.emplace_back(op25, xnn_delete_operator);
808
809 xnn_operator_t op26 = nullptr;
810 status = xnn_create_convolution2d_nhwc_f16(
811 0 /* top padding */, 0 /* right padding */,
812 0 /* bottom padding */, 0 /* left padding */,
813 1 /* kernel height */, 1 /* kernel width */,
814 1 /* subsampling height */, 1 /* subsampling width */,
815 1 /* dilation_height */, 1 /* dilation_width */,
816 1 /* groups */,
817 1024 /* input channels per group */,
818 1024 /* output_channels_per_group */,
819 1024 /* input pixel stride */,
820 1024 /* output pixel stride */,
821 w82.data(), w83.data(),
822 0.0f /* output min */, 6.0f /* output max */,
823 0 /* flags */,
824 &caches,
825 &op26);
826 if (status != xnn_status_success) {
827 std::cerr << "failed to create operation #26" << std::endl;
828 return ExecutionPlan();
829 }
830 operators.emplace_back(op26, xnn_delete_operator);
831
832 xnn_operator_t op27 = nullptr;
833 status = xnn_create_global_average_pooling_nwc_f16(
834 1024 /* channels */, 1024 /* input stride */, 1024 /* output stride */,
835 -std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(),
836 0 /* flags */,
837 &op27);
838 if (status != xnn_status_success) {
839 std::cerr << "failed to create operation #27" << std::endl;
840 return ExecutionPlan();
841 }
842 operators.emplace_back(op27, xnn_delete_operator);
843
844 xnn_operator_t op28 = nullptr;
845 status = xnn_create_convolution2d_nhwc_f16(
846 0 /* top padding */, 0 /* right padding */,
847 0 /* bottom padding */, 0 /* left padding */,
848 1 /* kernel height */, 1 /* kernel width */,
849 1 /* subsampling height */, 1 /* subsampling width */,
850 1 /* dilation_height */, 1 /* dilation_width */,
851 1 /* groups */,
852 1024 /* input channels per group */,
853 1001 /* output_channels_per_group */,
854 1024 /* input pixel stride */,
855 1001 /* output pixel stride */,
856 w84.data(), w85.data(),
857 -std::numeric_limits<float>::infinity() /* output min */, std::numeric_limits<float>::infinity() /* output max */,
858 0 /* flags */,
859 &caches,
860 &op28);
861 if (status != xnn_status_success) {
862 std::cerr << "failed to create operation #28" << std::endl;
863 return ExecutionPlan();
864 }
865 operators.emplace_back(op28, xnn_delete_operator);
866
867 #if XNN_PLATFORM_JIT
868 xnn_finalize_code_memory(&code_cache.cache.code);
869 #endif
870
871 status = xnn_setup_convolution2d_nhwc_f16(
872 op0,
873 1 /* batch size */, 224 /* input height */, 224 /* input width */,
874 v0.data() /* input */, v1.data() /* output */,
875 threadpool /* threadpool */);
876 if (status != xnn_status_success) {
877 std::cerr << "failed to setup operation #0" << std::endl;
878 return ExecutionPlan();
879 }
880
881 status = xnn_setup_convolution2d_nhwc_f16(
882 op1,
883 1 /* batch size */, 112 /* input height */, 112 /* input width */,
884 v1.data() /* input */, v2.data() /* output */,
885 threadpool /* threadpool */);
886 if (status != xnn_status_success) {
887 std::cerr << "failed to setup operation #1" << std::endl;
888 return ExecutionPlan();
889 }
890
891 status = xnn_setup_convolution2d_nhwc_f16(
892 op2,
893 1 /* batch size */, 112 /* input height */, 112 /* input width */,
894 v2.data() /* input */, v3.data() /* output */,
895 threadpool /* threadpool */);
896 if (status != xnn_status_success) {
897 std::cerr << "failed to setup operation #2" << std::endl;
898 return ExecutionPlan();
899 }
900
901 status = xnn_setup_convolution2d_nhwc_f16(
902 op3,
903 1 /* batch size */, 112 /* input height */, 112 /* input width */,
904 v3.data() /* input */, v4.data() /* output */,
905 threadpool /* threadpool */);
906 if (status != xnn_status_success) {
907 std::cerr << "failed to setup operation #3" << std::endl;
908 return ExecutionPlan();
909 }
910
911 status = xnn_setup_convolution2d_nhwc_f16(
912 op4,
913 1 /* batch size */, 56 /* input height */, 56 /* input width */,
914 v4.data() /* input */, v5.data() /* output */,
915 threadpool /* threadpool */);
916 if (status != xnn_status_success) {
917 std::cerr << "failed to setup operation #4" << std::endl;
918 return ExecutionPlan();
919 }
920
921 status = xnn_setup_convolution2d_nhwc_f16(
922 op5,
923 1 /* batch size */, 56 /* input height */, 56 /* input width */,
924 v5.data() /* input */, v6.data() /* output */,
925 threadpool /* threadpool */);
926 if (status != xnn_status_success) {
927 std::cerr << "failed to setup operation #5" << std::endl;
928 return ExecutionPlan();
929 }
930
931 status = xnn_setup_convolution2d_nhwc_f16(
932 op6,
933 1 /* batch size */, 56 /* input height */, 56 /* input width */,
934 v6.data() /* input */, v7.data() /* output */,
935 threadpool /* threadpool */);
936 if (status != xnn_status_success) {
937 std::cerr << "failed to setup operation #6" << std::endl;
938 return ExecutionPlan();
939 }
940
941 status = xnn_setup_convolution2d_nhwc_f16(
942 op7,
943 1 /* batch size */, 56 /* input height */, 56 /* input width */,
944 v7.data() /* input */, v8.data() /* output */,
945 threadpool /* threadpool */);
946 if (status != xnn_status_success) {
947 std::cerr << "failed to setup operation #7" << std::endl;
948 return ExecutionPlan();
949 }
950
951 status = xnn_setup_convolution2d_nhwc_f16(
952 op8,
953 1 /* batch size */, 28 /* input height */, 28 /* input width */,
954 v8.data() /* input */, v9.data() /* output */,
955 threadpool /* threadpool */);
956 if (status != xnn_status_success) {
957 std::cerr << "failed to setup operation #8" << std::endl;
958 return ExecutionPlan();
959 }
960
961 status = xnn_setup_convolution2d_nhwc_f16(
962 op9,
963 1 /* batch size */, 28 /* input height */, 28 /* input width */,
964 v9.data() /* input */, v10.data() /* output */,
965 threadpool /* threadpool */);
966 if (status != xnn_status_success) {
967 std::cerr << "failed to setup operation #9" << std::endl;
968 return ExecutionPlan();
969 }
970
971 status = xnn_setup_convolution2d_nhwc_f16(
972 op10,
973 1 /* batch size */, 28 /* input height */, 28 /* input width */,
974 v10.data() /* input */, v11.data() /* output */,
975 threadpool /* threadpool */);
976 if (status != xnn_status_success) {
977 std::cerr << "failed to setup operation #10" << std::endl;
978 return ExecutionPlan();
979 }
980
981 status = xnn_setup_convolution2d_nhwc_f16(
982 op11,
983 1 /* batch size */, 28 /* input height */, 28 /* input width */,
984 v11.data() /* input */, v12.data() /* output */,
985 threadpool /* threadpool */);
986 if (status != xnn_status_success) {
987 std::cerr << "failed to setup operation #11" << std::endl;
988 return ExecutionPlan();
989 }
990
991 status = xnn_setup_convolution2d_nhwc_f16(
992 op12,
993 1 /* batch size */, 14 /* input height */, 14 /* input width */,
994 v12.data() /* input */, v13.data() /* output */,
995 threadpool /* threadpool */);
996 if (status != xnn_status_success) {
997 std::cerr << "failed to setup operation #12" << std::endl;
998 return ExecutionPlan();
999 }
1000
1001 status = xnn_setup_convolution2d_nhwc_f16(
1002 op13,
1003 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1004 v13.data() /* input */, v14.data() /* output */,
1005 threadpool /* threadpool */);
1006 if (status != xnn_status_success) {
1007 std::cerr << "failed to setup operation #13" << std::endl;
1008 return ExecutionPlan();
1009 }
1010
1011 status = xnn_setup_convolution2d_nhwc_f16(
1012 op14,
1013 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1014 v14.data() /* input */, v15.data() /* output */,
1015 threadpool /* threadpool */);
1016 if (status != xnn_status_success) {
1017 std::cerr << "failed to setup operation #14" << std::endl;
1018 return ExecutionPlan();
1019 }
1020
1021 status = xnn_setup_convolution2d_nhwc_f16(
1022 op15,
1023 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1024 v15.data() /* input */, v16.data() /* output */,
1025 threadpool /* threadpool */);
1026 if (status != xnn_status_success) {
1027 std::cerr << "failed to setup operation #15" << std::endl;
1028 return ExecutionPlan();
1029 }
1030
1031 status = xnn_setup_convolution2d_nhwc_f16(
1032 op16,
1033 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1034 v16.data() /* input */, v17.data() /* output */,
1035 threadpool /* threadpool */);
1036 if (status != xnn_status_success) {
1037 std::cerr << "failed to setup operation #16" << std::endl;
1038 return ExecutionPlan();
1039 }
1040
1041 status = xnn_setup_convolution2d_nhwc_f16(
1042 op17,
1043 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1044 v17.data() /* input */, v18.data() /* output */,
1045 threadpool /* threadpool */);
1046 if (status != xnn_status_success) {
1047 std::cerr << "failed to setup operation #17" << std::endl;
1048 return ExecutionPlan();
1049 }
1050
1051 status = xnn_setup_convolution2d_nhwc_f16(
1052 op18,
1053 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1054 v18.data() /* input */, v19.data() /* output */,
1055 threadpool /* threadpool */);
1056 if (status != xnn_status_success) {
1057 std::cerr << "failed to setup operation #18" << std::endl;
1058 return ExecutionPlan();
1059 }
1060
1061 status = xnn_setup_convolution2d_nhwc_f16(
1062 op19,
1063 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1064 v19.data() /* input */, v20.data() /* output */,
1065 threadpool /* threadpool */);
1066 if (status != xnn_status_success) {
1067 std::cerr << "failed to setup operation #19" << std::endl;
1068 return ExecutionPlan();
1069 }
1070
1071 status = xnn_setup_convolution2d_nhwc_f16(
1072 op20,
1073 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1074 v20.data() /* input */, v21.data() /* output */,
1075 threadpool /* threadpool */);
1076 if (status != xnn_status_success) {
1077 std::cerr << "failed to setup operation #20" << std::endl;
1078 return ExecutionPlan();
1079 }
1080
1081 status = xnn_setup_convolution2d_nhwc_f16(
1082 op21,
1083 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1084 v21.data() /* input */, v22.data() /* output */,
1085 threadpool /* threadpool */);
1086 if (status != xnn_status_success) {
1087 std::cerr << "failed to setup operation #21" << std::endl;
1088 return ExecutionPlan();
1089 }
1090
1091 status = xnn_setup_convolution2d_nhwc_f16(
1092 op22,
1093 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1094 v22.data() /* input */, v23.data() /* output */,
1095 threadpool /* threadpool */);
1096 if (status != xnn_status_success) {
1097 std::cerr << "failed to setup operation #22" << std::endl;
1098 return ExecutionPlan();
1099 }
1100
1101 status = xnn_setup_convolution2d_nhwc_f16(
1102 op23,
1103 1 /* batch size */, 14 /* input height */, 14 /* input width */,
1104 v23.data() /* input */, v24.data() /* output */,
1105 threadpool /* threadpool */);
1106 if (status != xnn_status_success) {
1107 std::cerr << "failed to setup operation #23" << std::endl;
1108 return ExecutionPlan();
1109 }
1110
1111 status = xnn_setup_convolution2d_nhwc_f16(
1112 op24,
1113 1 /* batch size */, 7 /* input height */, 7 /* input width */,
1114 v24.data() /* input */, v25.data() /* output */,
1115 threadpool /* threadpool */);
1116 if (status != xnn_status_success) {
1117 std::cerr << "failed to setup operation #24" << std::endl;
1118 return ExecutionPlan();
1119 }
1120
1121 status = xnn_setup_convolution2d_nhwc_f16(
1122 op25,
1123 1 /* batch size */, 7 /* input height */, 7 /* input width */,
1124 v25.data() /* input */, v26.data() /* output */,
1125 threadpool /* threadpool */);
1126 if (status != xnn_status_success) {
1127 std::cerr << "failed to setup operation #25" << std::endl;
1128 return ExecutionPlan();
1129 }
1130
1131 status = xnn_setup_convolution2d_nhwc_f16(
1132 op26,
1133 1 /* batch size */, 7 /* input height */, 7 /* input width */,
1134 v26.data() /* input */, v27.data() /* output */,
1135 threadpool /* threadpool */);
1136 if (status != xnn_status_success) {
1137 std::cerr << "failed to setup operation #26" << std::endl;
1138 return ExecutionPlan();
1139 }
1140
1141 status = xnn_setup_global_average_pooling_nwc_f16(
1142 op27,
1143 1 /* batch size */, 49 /* width */,
1144 v27.data() /* input */, v28.data() /* output */,
1145 threadpool /* threadpool */);
1146 if (status != xnn_status_success) {
1147 std::cerr << "failed to setup operation #27" << std::endl;
1148 return ExecutionPlan();
1149 }
1150
1151 status = xnn_setup_convolution2d_nhwc_f16(
1152 op28,
1153 1 /* batch size */, 1 /* input height */, 1 /* input width */,
1154 v28.data() /* input */, v29.data() /* output */,
1155 threadpool /* threadpool */);
1156 if (status != xnn_status_success) {
1157 std::cerr << "failed to setup operation #28" << std::endl;
1158 return ExecutionPlan();
1159 }
1160
1161 #pragma clang diagnostic push
1162 #pragma clang diagnostic ignored "-Wpessimizing-move"
1163 return operators;
1164 #pragma clang diagnostic pop
1165 }
1166
1167 } // namespace models
1168