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