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