• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Auto-generated file. Do not edit!
2 //   Template: src/qs8-dwconv/unipass-scalar.c.in
3 //   Generator: tools/xngen
4 //
5 // Copyright 2021 Google LLC
6 //
7 // This source code is licensed under the BSD-style license found in the
8 // LICENSE file in the root directory of this source tree.
9 
10 #include <assert.h>
11 
12 #include <xnnpack/dwconv.h>
13 #include <xnnpack/math.h>
14 #include <xnnpack/unaligned.h>
15 
16 
xnn_qc8_dwconv_minmax_fp32_ukernel_up2x25__scalar_imagic(size_t channels,size_t output_width,const int8_t ** input,const void * weights,int8_t * output,size_t input_stride,size_t output_increment,size_t input_offset,const int8_t * zero,const union xnn_qc8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS (1)])17 void xnn_qc8_dwconv_minmax_fp32_ukernel_up2x25__scalar_imagic(
18     size_t channels,
19     size_t output_width,
20     const int8_t** input,
21     const void* weights,
22     int8_t* output,
23     size_t input_stride,
24     size_t output_increment,
25     size_t input_offset,
26     const int8_t* zero,
27     const union xnn_qc8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS(1)])
28 {
29   assert(channels != 0);
30   assert(output_width != 0);
31 
32   const float vmagic_bias = params->fp32_scalar_imagic.magic_bias;
33   const int32_t vmagic_min = params->fp32_scalar_imagic.magic_min;
34   const int32_t vmagic_max = params->fp32_scalar_imagic.magic_max;
35   const int32_t vmagic_bias_less_zero_point = params->fp32_scalar_imagic.magic_bias_less_zero_point;
36   do {
37     const int8_t* i0 = input[0];
38     assert(i0 != NULL);
39     if XNN_UNPREDICTABLE(i0 != zero) {
40       i0 = (const int8_t*) ((uintptr_t) i0 + input_offset);
41     }
42     const int8_t* i1 = input[1];
43     assert(i1 != NULL);
44     if XNN_UNPREDICTABLE(i1 != zero) {
45       i1 = (const int8_t*) ((uintptr_t) i1 + input_offset);
46     }
47     const int8_t* i2 = input[2];
48     assert(i2 != NULL);
49     if XNN_UNPREDICTABLE(i2 != zero) {
50       i2 = (const int8_t*) ((uintptr_t) i2 + input_offset);
51     }
52     const int8_t* i3 = input[3];
53     assert(i3 != NULL);
54     if XNN_UNPREDICTABLE(i3 != zero) {
55       i3 = (const int8_t*) ((uintptr_t) i3 + input_offset);
56     }
57     const int8_t* i4 = input[4];
58     assert(i4 != NULL);
59     if XNN_UNPREDICTABLE(i4 != zero) {
60       i4 = (const int8_t*) ((uintptr_t) i4 + input_offset);
61     }
62     const int8_t* i5 = input[5];
63     assert(i5 != NULL);
64     if XNN_UNPREDICTABLE(i5 != zero) {
65       i5 = (const int8_t*) ((uintptr_t) i5 + input_offset);
66     }
67     const int8_t* i6 = input[6];
68     assert(i6 != NULL);
69     if XNN_UNPREDICTABLE(i6 != zero) {
70       i6 = (const int8_t*) ((uintptr_t) i6 + input_offset);
71     }
72     const int8_t* i7 = input[7];
73     assert(i7 != NULL);
74     if XNN_UNPREDICTABLE(i7 != zero) {
75       i7 = (const int8_t*) ((uintptr_t) i7 + input_offset);
76     }
77     const int8_t* i8 = input[8];
78     assert(i8 != NULL);
79     if XNN_UNPREDICTABLE(i8 != zero) {
80       i8 = (const int8_t*) ((uintptr_t) i8 + input_offset);
81     }
82     const int8_t* i9 = input[9];
83     assert(i9 != NULL);
84     if XNN_UNPREDICTABLE(i9 != zero) {
85       i9 = (const int8_t*) ((uintptr_t) i9 + input_offset);
86     }
87     const int8_t* i10 = input[10];
88     assert(i10 != NULL);
89     if XNN_UNPREDICTABLE(i10 != zero) {
90       i10 = (const int8_t*) ((uintptr_t) i10 + input_offset);
91     }
92     const int8_t* i11 = input[11];
93     assert(i11 != NULL);
94     if XNN_UNPREDICTABLE(i11 != zero) {
95       i11 = (const int8_t*) ((uintptr_t) i11 + input_offset);
96     }
97     const int8_t* i12 = input[12];
98     assert(i12 != NULL);
99     if XNN_UNPREDICTABLE(i12 != zero) {
100       i12 = (const int8_t*) ((uintptr_t) i12 + input_offset);
101     }
102     const int8_t* i13 = input[13];
103     assert(i13 != NULL);
104     if XNN_UNPREDICTABLE(i13 != zero) {
105       i13 = (const int8_t*) ((uintptr_t) i13 + input_offset);
106     }
107     const int8_t* i14 = input[14];
108     assert(i14 != NULL);
109     if XNN_UNPREDICTABLE(i14 != zero) {
110       i14 = (const int8_t*) ((uintptr_t) i14 + input_offset);
111     }
112     const int8_t* i15 = input[15];
113     assert(i15 != NULL);
114     if XNN_UNPREDICTABLE(i15 != zero) {
115       i15 = (const int8_t*) ((uintptr_t) i15 + input_offset);
116     }
117     const int8_t* i16 = input[16];
118     assert(i16 != NULL);
119     if XNN_UNPREDICTABLE(i16 != zero) {
120       i16 = (const int8_t*) ((uintptr_t) i16 + input_offset);
121     }
122     const int8_t* i17 = input[17];
123     assert(i17 != NULL);
124     if XNN_UNPREDICTABLE(i17 != zero) {
125       i17 = (const int8_t*) ((uintptr_t) i17 + input_offset);
126     }
127     const int8_t* i18 = input[18];
128     assert(i18 != NULL);
129     if XNN_UNPREDICTABLE(i18 != zero) {
130       i18 = (const int8_t*) ((uintptr_t) i18 + input_offset);
131     }
132     const int8_t* i19 = input[19];
133     assert(i19 != NULL);
134     if XNN_UNPREDICTABLE(i19 != zero) {
135       i19 = (const int8_t*) ((uintptr_t) i19 + input_offset);
136     }
137     const int8_t* i20 = input[20];
138     assert(i20 != NULL);
139     if XNN_UNPREDICTABLE(i20 != zero) {
140       i20 = (const int8_t*) ((uintptr_t) i20 + input_offset);
141     }
142     const int8_t* i21 = input[21];
143     assert(i21 != NULL);
144     if XNN_UNPREDICTABLE(i21 != zero) {
145       i21 = (const int8_t*) ((uintptr_t) i21 + input_offset);
146     }
147     const int8_t* i22 = input[22];
148     assert(i22 != NULL);
149     if XNN_UNPREDICTABLE(i22 != zero) {
150       i22 = (const int8_t*) ((uintptr_t) i22 + input_offset);
151     }
152     const int8_t* i23 = input[23];
153     assert(i23 != NULL);
154     if XNN_UNPREDICTABLE(i23 != zero) {
155       i23 = (const int8_t*) ((uintptr_t) i23 + input_offset);
156     }
157     const int8_t* i24 = input[24];
158     assert(i24 != NULL);
159     if XNN_UNPREDICTABLE(i24 != zero) {
160       i24 = (const int8_t*) ((uintptr_t) i24 + input_offset);
161     }
162     input = (const int8_t**) ((uintptr_t) input + input_stride);
163 
164     size_t c = channels;
165     const void* w = weights;
166     for (; c >= 2; c -= 2) {
167       int32_t vacc0 = unaligned_indexed_load_s32(w, 0);
168       int32_t vacc1 = unaligned_indexed_load_s32(w, 1);
169 
170 
171       const int32_t vi0x0 = (int32_t) i0[0];
172       const int32_t vi0x1 = (int32_t) i0[1];
173       i0 += 2;
174 
175       const int32_t vk0x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[0];
176       const int32_t vk0x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[1];
177 
178       vacc0 += vi0x0 * vk0x0;
179       vacc1 += vi0x1 * vk0x1;
180 
181       const int32_t vi1x0 = (int32_t) i1[0];
182       const int32_t vi1x1 = (int32_t) i1[1];
183       i1 += 2;
184 
185       const int32_t vk1x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[2];
186       const int32_t vk1x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[3];
187 
188       vacc0 += vi1x0 * vk1x0;
189       vacc1 += vi1x1 * vk1x1;
190 
191       const int32_t vi2x0 = (int32_t) i2[0];
192       const int32_t vi2x1 = (int32_t) i2[1];
193       i2 += 2;
194 
195       const int32_t vk2x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[4];
196       const int32_t vk2x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[5];
197 
198       vacc0 += vi2x0 * vk2x0;
199       vacc1 += vi2x1 * vk2x1;
200 
201       const int32_t vi3x0 = (int32_t) i3[0];
202       const int32_t vi3x1 = (int32_t) i3[1];
203       i3 += 2;
204 
205       const int32_t vk3x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[6];
206       const int32_t vk3x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[7];
207 
208       vacc0 += vi3x0 * vk3x0;
209       vacc1 += vi3x1 * vk3x1;
210 
211       const int32_t vi4x0 = (int32_t) i4[0];
212       const int32_t vi4x1 = (int32_t) i4[1];
213       i4 += 2;
214 
215       const int32_t vk4x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[8];
216       const int32_t vk4x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[9];
217 
218       vacc0 += vi4x0 * vk4x0;
219       vacc1 += vi4x1 * vk4x1;
220 
221       const int32_t vi5x0 = (int32_t) i5[0];
222       const int32_t vi5x1 = (int32_t) i5[1];
223       i5 += 2;
224 
225       const int32_t vk5x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[10];
226       const int32_t vk5x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[11];
227 
228       vacc0 += vi5x0 * vk5x0;
229       vacc1 += vi5x1 * vk5x1;
230 
231       const int32_t vi6x0 = (int32_t) i6[0];
232       const int32_t vi6x1 = (int32_t) i6[1];
233       i6 += 2;
234 
235       const int32_t vk6x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[12];
236       const int32_t vk6x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[13];
237 
238       vacc0 += vi6x0 * vk6x0;
239       vacc1 += vi6x1 * vk6x1;
240 
241       const int32_t vi7x0 = (int32_t) i7[0];
242       const int32_t vi7x1 = (int32_t) i7[1];
243       i7 += 2;
244 
245       const int32_t vk7x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[14];
246       const int32_t vk7x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[15];
247 
248       vacc0 += vi7x0 * vk7x0;
249       vacc1 += vi7x1 * vk7x1;
250 
251       const int32_t vi8x0 = (int32_t) i8[0];
252       const int32_t vi8x1 = (int32_t) i8[1];
253       i8 += 2;
254 
255       const int32_t vk8x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[16];
256       const int32_t vk8x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[17];
257 
258       vacc0 += vi8x0 * vk8x0;
259       vacc1 += vi8x1 * vk8x1;
260 
261       const int32_t vi9x0 = (int32_t) i9[0];
262       const int32_t vi9x1 = (int32_t) i9[1];
263       i9 += 2;
264 
265       const int32_t vk9x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[18];
266       const int32_t vk9x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[19];
267 
268       vacc0 += vi9x0 * vk9x0;
269       vacc1 += vi9x1 * vk9x1;
270 
271       const int32_t vi10x0 = (int32_t) i10[0];
272       const int32_t vi10x1 = (int32_t) i10[1];
273       i10 += 2;
274 
275       const int32_t vk10x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[20];
276       const int32_t vk10x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[21];
277 
278       vacc0 += vi10x0 * vk10x0;
279       vacc1 += vi10x1 * vk10x1;
280 
281       const int32_t vi11x0 = (int32_t) i11[0];
282       const int32_t vi11x1 = (int32_t) i11[1];
283       i11 += 2;
284 
285       const int32_t vk11x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[22];
286       const int32_t vk11x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[23];
287 
288       vacc0 += vi11x0 * vk11x0;
289       vacc1 += vi11x1 * vk11x1;
290 
291       const int32_t vi12x0 = (int32_t) i12[0];
292       const int32_t vi12x1 = (int32_t) i12[1];
293       i12 += 2;
294 
295       const int32_t vk12x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[24];
296       const int32_t vk12x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[25];
297 
298       vacc0 += vi12x0 * vk12x0;
299       vacc1 += vi12x1 * vk12x1;
300 
301       const int32_t vi13x0 = (int32_t) i13[0];
302       const int32_t vi13x1 = (int32_t) i13[1];
303       i13 += 2;
304 
305       const int32_t vk13x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[26];
306       const int32_t vk13x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[27];
307 
308       vacc0 += vi13x0 * vk13x0;
309       vacc1 += vi13x1 * vk13x1;
310 
311       const int32_t vi14x0 = (int32_t) i14[0];
312       const int32_t vi14x1 = (int32_t) i14[1];
313       i14 += 2;
314 
315       const int32_t vk14x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[28];
316       const int32_t vk14x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[29];
317 
318       vacc0 += vi14x0 * vk14x0;
319       vacc1 += vi14x1 * vk14x1;
320 
321       const int32_t vi15x0 = (int32_t) i15[0];
322       const int32_t vi15x1 = (int32_t) i15[1];
323       i15 += 2;
324 
325       const int32_t vk15x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[30];
326       const int32_t vk15x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[31];
327 
328       vacc0 += vi15x0 * vk15x0;
329       vacc1 += vi15x1 * vk15x1;
330 
331       const int32_t vi16x0 = (int32_t) i16[0];
332       const int32_t vi16x1 = (int32_t) i16[1];
333       i16 += 2;
334 
335       const int32_t vk16x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[32];
336       const int32_t vk16x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[33];
337 
338       vacc0 += vi16x0 * vk16x0;
339       vacc1 += vi16x1 * vk16x1;
340 
341       const int32_t vi17x0 = (int32_t) i17[0];
342       const int32_t vi17x1 = (int32_t) i17[1];
343       i17 += 2;
344 
345       const int32_t vk17x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[34];
346       const int32_t vk17x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[35];
347 
348       vacc0 += vi17x0 * vk17x0;
349       vacc1 += vi17x1 * vk17x1;
350 
351       const int32_t vi18x0 = (int32_t) i18[0];
352       const int32_t vi18x1 = (int32_t) i18[1];
353       i18 += 2;
354 
355       const int32_t vk18x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[36];
356       const int32_t vk18x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[37];
357 
358       vacc0 += vi18x0 * vk18x0;
359       vacc1 += vi18x1 * vk18x1;
360 
361       const int32_t vi19x0 = (int32_t) i19[0];
362       const int32_t vi19x1 = (int32_t) i19[1];
363       i19 += 2;
364 
365       const int32_t vk19x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[38];
366       const int32_t vk19x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[39];
367 
368       vacc0 += vi19x0 * vk19x0;
369       vacc1 += vi19x1 * vk19x1;
370 
371       const int32_t vi20x0 = (int32_t) i20[0];
372       const int32_t vi20x1 = (int32_t) i20[1];
373       i20 += 2;
374 
375       const int32_t vk20x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[40];
376       const int32_t vk20x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[41];
377 
378       vacc0 += vi20x0 * vk20x0;
379       vacc1 += vi20x1 * vk20x1;
380 
381       const int32_t vi21x0 = (int32_t) i21[0];
382       const int32_t vi21x1 = (int32_t) i21[1];
383       i21 += 2;
384 
385       const int32_t vk21x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[42];
386       const int32_t vk21x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[43];
387 
388       vacc0 += vi21x0 * vk21x0;
389       vacc1 += vi21x1 * vk21x1;
390 
391       const int32_t vi22x0 = (int32_t) i22[0];
392       const int32_t vi22x1 = (int32_t) i22[1];
393       i22 += 2;
394 
395       const int32_t vk22x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[44];
396       const int32_t vk22x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[45];
397 
398       vacc0 += vi22x0 * vk22x0;
399       vacc1 += vi22x1 * vk22x1;
400 
401       const int32_t vi23x0 = (int32_t) i23[0];
402       const int32_t vi23x1 = (int32_t) i23[1];
403       i23 += 2;
404 
405       const int32_t vk23x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[46];
406       const int32_t vk23x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[47];
407 
408       vacc0 += vi23x0 * vk23x0;
409       vacc1 += vi23x1 * vk23x1;
410 
411       const int32_t vi24x0 = (int32_t) i24[0];
412       const int32_t vi24x1 = (int32_t) i24[1];
413       i24 += 2;
414 
415       const int32_t vk24x0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[48];
416       const int32_t vk24x1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[49];
417 
418       vacc0 += vi24x0 * vk24x0;
419       vacc1 += vi24x1 * vk24x1;
420 
421       w = (const void*) ((uintptr_t) w + 2 * sizeof(int32_t) + 50 * sizeof(int8_t));
422 
423       float vfpacc0 = (float) vacc0;
424       float vfpacc1 = (float) vacc1;
425 
426       const float vscale0 = unaligned_indexed_load_f32(w, 0);
427       const float vscale1 = unaligned_indexed_load_f32(w, 1);
428       w = (const void*) ((const float*) w + 2);
429 
430       vfpacc0 *= vscale0;
431       vfpacc1 *= vscale1;
432 
433       vfpacc0 += vmagic_bias;
434       vfpacc1 += vmagic_bias;
435 
436       int32_t vout0 = (int32_t) float_as_uint32(vfpacc0);
437       int32_t vout1 = (int32_t) float_as_uint32(vfpacc1);
438 
439       vout0 = math_max_s32(vout0, vmagic_min);
440       vout1 = math_max_s32(vout1, vmagic_min);
441 
442       vout0 = math_min_s32(vout0, vmagic_max);
443       vout1 = math_min_s32(vout1, vmagic_max);
444 
445       vout0 -= vmagic_bias_less_zero_point;
446       vout1 -= vmagic_bias_less_zero_point;
447 
448       output[0] = (int8_t) vout0;
449       output[1] = (int8_t) vout1;
450       output += 2;
451     }
452     if XNN_UNLIKELY(c != 0) {
453       int32_t vacc = unaligned_load_s32(w);
454 
455       const int32_t vi0 = (int32_t) *i0;
456       const int32_t vk0 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[0];
457       vacc += vi0 * vk0;
458       const int32_t vi1 = (int32_t) *i1;
459       const int32_t vk1 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[2];
460       vacc += vi1 * vk1;
461       const int32_t vi2 = (int32_t) *i2;
462       const int32_t vk2 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[4];
463       vacc += vi2 * vk2;
464       const int32_t vi3 = (int32_t) *i3;
465       const int32_t vk3 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[6];
466       vacc += vi3 * vk3;
467       const int32_t vi4 = (int32_t) *i4;
468       const int32_t vk4 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[8];
469       vacc += vi4 * vk4;
470       const int32_t vi5 = (int32_t) *i5;
471       const int32_t vk5 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[10];
472       vacc += vi5 * vk5;
473       const int32_t vi6 = (int32_t) *i6;
474       const int32_t vk6 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[12];
475       vacc += vi6 * vk6;
476       const int32_t vi7 = (int32_t) *i7;
477       const int32_t vk7 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[14];
478       vacc += vi7 * vk7;
479       const int32_t vi8 = (int32_t) *i8;
480       const int32_t vk8 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[16];
481       vacc += vi8 * vk8;
482       const int32_t vi9 = (int32_t) *i9;
483       const int32_t vk9 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[18];
484       vacc += vi9 * vk9;
485       const int32_t vi10 = (int32_t) *i10;
486       const int32_t vk10 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[20];
487       vacc += vi10 * vk10;
488       const int32_t vi11 = (int32_t) *i11;
489       const int32_t vk11 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[22];
490       vacc += vi11 * vk11;
491       const int32_t vi12 = (int32_t) *i12;
492       const int32_t vk12 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[24];
493       vacc += vi12 * vk12;
494       const int32_t vi13 = (int32_t) *i13;
495       const int32_t vk13 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[26];
496       vacc += vi13 * vk13;
497       const int32_t vi14 = (int32_t) *i14;
498       const int32_t vk14 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[28];
499       vacc += vi14 * vk14;
500       const int32_t vi15 = (int32_t) *i15;
501       const int32_t vk15 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[30];
502       vacc += vi15 * vk15;
503       const int32_t vi16 = (int32_t) *i16;
504       const int32_t vk16 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[32];
505       vacc += vi16 * vk16;
506       const int32_t vi17 = (int32_t) *i17;
507       const int32_t vk17 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[34];
508       vacc += vi17 * vk17;
509       const int32_t vi18 = (int32_t) *i18;
510       const int32_t vk18 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[36];
511       vacc += vi18 * vk18;
512       const int32_t vi19 = (int32_t) *i19;
513       const int32_t vk19 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[38];
514       vacc += vi19 * vk19;
515       const int32_t vi20 = (int32_t) *i20;
516       const int32_t vk20 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[40];
517       vacc += vi20 * vk20;
518       const int32_t vi21 = (int32_t) *i21;
519       const int32_t vk21 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[42];
520       vacc += vi21 * vk21;
521       const int32_t vi22 = (int32_t) *i22;
522       const int32_t vk22 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[44];
523       vacc += vi22 * vk22;
524       const int32_t vi23 = (int32_t) *i23;
525       const int32_t vk23 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[46];
526       vacc += vi23 * vk23;
527       const int32_t vi24 = (int32_t) *i24;
528       const int32_t vk24 = (int32_t) ((const int8_t*) ((uintptr_t) w + 2 * sizeof(int32_t)))[48];
529       vacc += vi24 * vk24;
530 
531       typedef XNN_UNALIGNED float unaligned_float;
532       const float vscale = *((const unaligned_float*) ((uintptr_t) w + 2 * sizeof(int32_t) + 50 * sizeof(int8_t)));
533       float vfpacc = (float) vacc * vscale;
534 
535       vfpacc += vmagic_bias;
536       int32_t vout = (int32_t) float_as_uint32(vfpacc);
537       vout = math_max_s32(vout, vmagic_min);
538       vout = math_min_s32(vout, vmagic_max);
539       vout -= vmagic_bias_less_zero_point;
540 
541       *output++ = (int8_t) vout;
542     }
543 
544     output = (int8_t*) ((uintptr_t) output + output_increment);
545   } while (--output_width != 0);
546 }
547