| 1 |
// Auto-generated file. Do not edit! |
| 2 |
// Template: src/qs8-gemm/c8-neoni8mm.c.in |
| 3 |
// Generator: tools/xngen |
| 4 |
// |
| 5 |
// Copyright 2023 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 <arm_neon.h> |
| 13 |
|
| 14 |
#include "xnnpack/gemm.h" |
| 15 |
#include "xnnpack/math.h" |
| 16 |
|
| 17 |
|
| 18 |
void xnn_qd8_f32_qb4w_gemm_minmax_ukernel_8x32c8__neoni8mm( |
| 19 |
size_t mr, |
| 20 |
size_t nc, |
| 21 |
size_t kc, |
| 22 |
const int8_t* restrict a, |
| 23 |
size_t a_stride, |
| 24 |
const void* restrict w, |
| 25 |
float* restrict c, |
| 26 |
size_t cm_stride, |
| 27 |
size_t cn_stride, |
| 28 |
const struct xnn_f32_qb4w_minmax_params params[restrict XNN_MIN_ELEMENTS(1)], |
| 29 |
const struct xnn_qd8_quantization_params quantization_params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS |
| 30 |
{ |
| 31 |
assert(mr != 0); |
| 32 |
assert(mr <= 8); |
| 33 |
assert(nc != 0); |
| 34 |
assert(kc != 0); |
| 35 |
assert(kc % sizeof(int8_t) == 0); |
| 36 |
assert(a != NULL); |
| 37 |
assert(w != NULL); |
| 38 |
assert(c != NULL); |
| 39 |
|
| 40 |
kc = round_up_po2(kc, 8 * sizeof(int8_t)); |
| 41 |
size_t bl = params->scalar.blocksize; |
| 42 |
assert(bl <= kc); |
| 43 |
assert(bl != 0); |
| 44 |
assert(bl % 32 == 0); |
| 45 |
const int8_t* a0 = a; |
| 46 |
float* c0 = c; |
| 47 |
const int8_t* a1 = (const int8_t*) ((uintptr_t) a0 + a_stride); |
| 48 |
float* c1 = (float*) ((uintptr_t) c0 + cm_stride); |
| 49 |
if XNN_UNPREDICTABLE(mr < 2) { |
| 50 |
a1 = a0; |
| 51 |
c1 = c0; |
| 52 |
} |
| 53 |
const int8_t* a2 = (const int8_t*) ((uintptr_t) a1 + a_stride); |
| 54 |
float* c2 = (float*) ((uintptr_t) c1 + cm_stride); |
| 55 |
if XNN_UNPREDICTABLE(mr <= 2) { |
| 56 |
a2 = a1; |
| 57 |
c2 = c1; |
| 58 |
} |
| 59 |
const int8_t* a3 = (const int8_t*) ((uintptr_t) a2 + a_stride); |
| 60 |
float* c3 = (float*) ((uintptr_t) c2 + cm_stride); |
| 61 |
if XNN_UNPREDICTABLE(mr < 4) { |
| 62 |
a3 = a2; |
| 63 |
c3 = c2; |
| 64 |
} |
| 65 |
const int8_t* a4 = (const int8_t*) ((uintptr_t) a3 + a_stride); |
| 66 |
float* c4 = (float*) ((uintptr_t) c3 + cm_stride); |
| 67 |
if XNN_UNPREDICTABLE(mr <= 4) { |
| 68 |
a4 = a3; |
| 69 |
c4 = c3; |
| 70 |
} |
| 71 |
const int8_t* a5 = (const int8_t*) ((uintptr_t) a4 + a_stride); |
| 72 |
float* c5 = (float*) ((uintptr_t) c4 + cm_stride); |
| 73 |
if XNN_UNPREDICTABLE(mr < 6) { |
| 74 |
a5 = a4; |
| 75 |
c5 = c4; |
| 76 |
} |
| 77 |
const int8_t* a6 = (const int8_t*) ((uintptr_t) a5 + a_stride); |
| 78 |
float* c6 = (float*) ((uintptr_t) c5 + cm_stride); |
| 79 |
if XNN_UNPREDICTABLE(mr <= 6) { |
| 80 |
a6 = a5; |
| 81 |
c6 = c5; |
| 82 |
} |
| 83 |
const int8_t* a7 = (const int8_t*) ((uintptr_t) a6 + a_stride); |
| 84 |
float* c7 = (float*) ((uintptr_t) c6 + cm_stride); |
| 85 |
if XNN_UNPREDICTABLE(mr != 8) { |
| 86 |
a7 = a6; |
| 87 |
c7 = c6; |
| 88 |
} |
| 89 |
const int8x16_t vmask = vmovq_n_s8(INT8_C(0xF0)); |
| 90 |
|
| 91 |
// Loop over groups of 32 columns. |
| 92 |
do { |
| 93 |
// Initialize accumulators with scaled vksum. 32 scaled vksum values are loaded from the |
| 94 |
// weight matrix, at the start of the group of 32 columns. |
| 95 |
const float32x4_t vinput_zero_point01 = vcvtq_f32_s32(vld1q_s32(&quantization_params[0].zero_point)); |
| 96 |
const float32x4_t vksum0123 = vld1q_f32(w); w = (const float*) w + 4; |
| 97 |
float32x4_t vout0x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point01), 0); |
| 98 |
float32x4_t vout1x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point01), 0); |
| 99 |
const float32x4_t vksum4567 = vld1q_f32(w); w = (const float*) w + 4; |
| 100 |
float32x4_t vout0x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point01), 0); |
| 101 |
float32x4_t vout1x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point01), 0); |
| 102 |
const float32x4_t vksum89AB = vld1q_f32(w); w = (const float*) w + 4; |
| 103 |
float32x4_t vout0x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point01), 0); |
| 104 |
float32x4_t vout1x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point01), 0); |
| 105 |
const float32x4_t vksumCDEF = vld1q_f32(w); w = (const float*) w + 4; |
| 106 |
float32x4_t vout0xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point01), 0); |
| 107 |
float32x4_t vout1xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point01), 0); |
| 108 |
const float32x4_t vksumGHIJ = vld1q_f32(w); w = (const float*) w + 4; |
| 109 |
float32x4_t vout0xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_low_f32(vinput_zero_point01), 0); |
| 110 |
float32x4_t vout1xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_high_f32(vinput_zero_point01), 0); |
| 111 |
const float32x4_t vksumKLMN = vld1q_f32(w); w = (const float*) w + 4; |
| 112 |
float32x4_t vout0xKLMN = vmulq_lane_f32(vksumKLMN, vget_low_f32(vinput_zero_point01), 0); |
| 113 |
float32x4_t vout1xKLMN = vmulq_lane_f32(vksumKLMN, vget_high_f32(vinput_zero_point01), 0); |
| 114 |
const float32x4_t vksumOPQR = vld1q_f32(w); w = (const float*) w + 4; |
| 115 |
float32x4_t vout0xOPQR = vmulq_lane_f32(vksumOPQR, vget_low_f32(vinput_zero_point01), 0); |
| 116 |
float32x4_t vout1xOPQR = vmulq_lane_f32(vksumOPQR, vget_high_f32(vinput_zero_point01), 0); |
| 117 |
const float32x4_t vksumSTUV = vld1q_f32(w); w = (const float*) w + 4; |
| 118 |
float32x4_t vout0xSTUV = vmulq_lane_f32(vksumSTUV, vget_low_f32(vinput_zero_point01), 0); |
| 119 |
float32x4_t vout1xSTUV = vmulq_lane_f32(vksumSTUV, vget_high_f32(vinput_zero_point01), 0); |
| 120 |
const float32x4_t vinput_zero_point23 = vcvtq_f32_s32(vld1q_s32(&quantization_params[2].zero_point)); |
| 121 |
float32x4_t vout2x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point23), 0); |
| 122 |
float32x4_t vout3x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point23), 0); |
| 123 |
float32x4_t vout2x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point23), 0); |
| 124 |
float32x4_t vout3x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point23), 0); |
| 125 |
float32x4_t vout2x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point23), 0); |
| 126 |
float32x4_t vout3x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point23), 0); |
| 127 |
float32x4_t vout2xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point23), 0); |
| 128 |
float32x4_t vout3xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point23), 0); |
| 129 |
float32x4_t vout2xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_low_f32(vinput_zero_point23), 0); |
| 130 |
float32x4_t vout3xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_high_f32(vinput_zero_point23), 0); |
| 131 |
float32x4_t vout2xKLMN = vmulq_lane_f32(vksumKLMN, vget_low_f32(vinput_zero_point23), 0); |
| 132 |
float32x4_t vout3xKLMN = vmulq_lane_f32(vksumKLMN, vget_high_f32(vinput_zero_point23), 0); |
| 133 |
float32x4_t vout2xOPQR = vmulq_lane_f32(vksumOPQR, vget_low_f32(vinput_zero_point23), 0); |
| 134 |
float32x4_t vout3xOPQR = vmulq_lane_f32(vksumOPQR, vget_high_f32(vinput_zero_point23), 0); |
| 135 |
float32x4_t vout2xSTUV = vmulq_lane_f32(vksumSTUV, vget_low_f32(vinput_zero_point23), 0); |
| 136 |
float32x4_t vout3xSTUV = vmulq_lane_f32(vksumSTUV, vget_high_f32(vinput_zero_point23), 0); |
| 137 |
const float32x4_t vinput_zero_point45 = vcvtq_f32_s32(vld1q_s32(&quantization_params[4].zero_point)); |
| 138 |
float32x4_t vout4x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point45), 0); |
| 139 |
float32x4_t vout5x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point45), 0); |
| 140 |
float32x4_t vout4x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point45), 0); |
| 141 |
float32x4_t vout5x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point45), 0); |
| 142 |
float32x4_t vout4x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point45), 0); |
| 143 |
float32x4_t vout5x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point45), 0); |
| 144 |
float32x4_t vout4xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point45), 0); |
| 145 |
float32x4_t vout5xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point45), 0); |
| 146 |
float32x4_t vout4xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_low_f32(vinput_zero_point45), 0); |
| 147 |
float32x4_t vout5xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_high_f32(vinput_zero_point45), 0); |
| 148 |
float32x4_t vout4xKLMN = vmulq_lane_f32(vksumKLMN, vget_low_f32(vinput_zero_point45), 0); |
| 149 |
float32x4_t vout5xKLMN = vmulq_lane_f32(vksumKLMN, vget_high_f32(vinput_zero_point45), 0); |
| 150 |
float32x4_t vout4xOPQR = vmulq_lane_f32(vksumOPQR, vget_low_f32(vinput_zero_point45), 0); |
| 151 |
float32x4_t vout5xOPQR = vmulq_lane_f32(vksumOPQR, vget_high_f32(vinput_zero_point45), 0); |
| 152 |
float32x4_t vout4xSTUV = vmulq_lane_f32(vksumSTUV, vget_low_f32(vinput_zero_point45), 0); |
| 153 |
float32x4_t vout5xSTUV = vmulq_lane_f32(vksumSTUV, vget_high_f32(vinput_zero_point45), 0); |
| 154 |
const float32x4_t vinput_zero_point67 = vcvtq_f32_s32(vld1q_s32(&quantization_params[6].zero_point)); |
| 155 |
float32x4_t vout6x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point67), 0); |
| 156 |
float32x4_t vout7x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point67), 0); |
| 157 |
float32x4_t vout6x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point67), 0); |
| 158 |
float32x4_t vout7x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point67), 0); |
| 159 |
float32x4_t vout6x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point67), 0); |
| 160 |
float32x4_t vout7x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point67), 0); |
| 161 |
float32x4_t vout6xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point67), 0); |
| 162 |
float32x4_t vout7xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point67), 0); |
| 163 |
float32x4_t vout6xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_low_f32(vinput_zero_point67), 0); |
| 164 |
float32x4_t vout7xGHIJ = vmulq_lane_f32(vksumGHIJ, vget_high_f32(vinput_zero_point67), 0); |
| 165 |
float32x4_t vout6xKLMN = vmulq_lane_f32(vksumKLMN, vget_low_f32(vinput_zero_point67), 0); |
| 166 |
float32x4_t vout7xKLMN = vmulq_lane_f32(vksumKLMN, vget_high_f32(vinput_zero_point67), 0); |
| 167 |
float32x4_t vout6xOPQR = vmulq_lane_f32(vksumOPQR, vget_low_f32(vinput_zero_point67), 0); |
| 168 |
float32x4_t vout7xOPQR = vmulq_lane_f32(vksumOPQR, vget_high_f32(vinput_zero_point67), 0); |
| 169 |
float32x4_t vout6xSTUV = vmulq_lane_f32(vksumSTUV, vget_low_f32(vinput_zero_point67), 0); |
| 170 |
float32x4_t vout7xSTUV = vmulq_lane_f32(vksumSTUV, vget_high_f32(vinput_zero_point67), 0); |
| 171 |
|
| 172 |
|
| 173 |
for (size_t kb=0; kb < kc; kb += bl) { |
| 174 |
int32x4_t vacc01x01 = vdupq_n_s32(0); |
| 175 |
int32x4_t vacc01x23 = vdupq_n_s32(0); |
| 176 |
int32x4_t vacc01x45 = vdupq_n_s32(0); |
| 177 |
int32x4_t vacc01x67 = vdupq_n_s32(0); |
| 178 |
int32x4_t vacc01x89 = vdupq_n_s32(0); |
| 179 |
int32x4_t vacc01xAB = vdupq_n_s32(0); |
| 180 |
int32x4_t vacc01xCD = vdupq_n_s32(0); |
| 181 |
int32x4_t vacc01xEF = vdupq_n_s32(0); |
| 182 |
int32x4_t vacc01xGH = vdupq_n_s32(0); |
| 183 |
int32x4_t vacc01xIJ = vdupq_n_s32(0); |
| 184 |
int32x4_t vacc01xKL = vdupq_n_s32(0); |
| 185 |
int32x4_t vacc01xMN = vdupq_n_s32(0); |
| 186 |
int32x4_t vacc01xOP = vdupq_n_s32(0); |
| 187 |
int32x4_t vacc01xQR = vdupq_n_s32(0); |
| 188 |
int32x4_t vacc01xST = vdupq_n_s32(0); |
| 189 |
int32x4_t vacc01xUV = vdupq_n_s32(0); |
| 190 |
int32x4_t vacc23x01 = vdupq_n_s32(0); |
| 191 |
int32x4_t vacc23x23 = vdupq_n_s32(0); |
| 192 |
int32x4_t vacc23x45 = vdupq_n_s32(0); |
| 193 |
int32x4_t vacc23x67 = vdupq_n_s32(0); |
| 194 |
int32x4_t vacc23x89 = vdupq_n_s32(0); |
| 195 |
int32x4_t vacc23xAB = vdupq_n_s32(0); |
| 196 |
int32x4_t vacc23xCD = vdupq_n_s32(0); |
| 197 |
int32x4_t vacc23xEF = vdupq_n_s32(0); |
| 198 |
int32x4_t vacc23xGH = vdupq_n_s32(0); |
| 199 |
int32x4_t vacc23xIJ = vdupq_n_s32(0); |
| 200 |
int32x4_t vacc23xKL = vdupq_n_s32(0); |
| 201 |
int32x4_t vacc23xMN = vdupq_n_s32(0); |
| 202 |
int32x4_t vacc23xOP = vdupq_n_s32(0); |
| 203 |
int32x4_t vacc23xQR = vdupq_n_s32(0); |
| 204 |
int32x4_t vacc23xST = vdupq_n_s32(0); |
| 205 |
int32x4_t vacc23xUV = vdupq_n_s32(0); |
| 206 |
int32x4_t vacc45x01 = vdupq_n_s32(0); |
| 207 |
int32x4_t vacc45x23 = vdupq_n_s32(0); |
| 208 |
int32x4_t vacc45x45 = vdupq_n_s32(0); |
| 209 |
int32x4_t vacc45x67 = vdupq_n_s32(0); |
| 210 |
int32x4_t vacc45x89 = vdupq_n_s32(0); |
| 211 |
int32x4_t vacc45xAB = vdupq_n_s32(0); |
| 212 |
int32x4_t vacc45xCD = vdupq_n_s32(0); |
| 213 |
int32x4_t vacc45xEF = vdupq_n_s32(0); |
| 214 |
int32x4_t vacc45xGH = vdupq_n_s32(0); |
| 215 |
int32x4_t vacc45xIJ = vdupq_n_s32(0); |
| 216 |
int32x4_t vacc45xKL = vdupq_n_s32(0); |
| 217 |
int32x4_t vacc45xMN = vdupq_n_s32(0); |
| 218 |
int32x4_t vacc45xOP = vdupq_n_s32(0); |
| 219 |
int32x4_t vacc45xQR = vdupq_n_s32(0); |
| 220 |
int32x4_t vacc45xST = vdupq_n_s32(0); |
| 221 |
int32x4_t vacc45xUV = vdupq_n_s32(0); |
| 222 |
int32x4_t vacc67x01 = vdupq_n_s32(0); |
| 223 |
int32x4_t vacc67x23 = vdupq_n_s32(0); |
| 224 |
int32x4_t vacc67x45 = vdupq_n_s32(0); |
| 225 |
int32x4_t vacc67x67 = vdupq_n_s32(0); |
| 226 |
int32x4_t vacc67x89 = vdupq_n_s32(0); |
| 227 |
int32x4_t vacc67xAB = vdupq_n_s32(0); |
| 228 |
int32x4_t vacc67xCD = vdupq_n_s32(0); |
| 229 |
int32x4_t vacc67xEF = vdupq_n_s32(0); |
| 230 |
int32x4_t vacc67xGH = vdupq_n_s32(0); |
| 231 |
int32x4_t vacc67xIJ = vdupq_n_s32(0); |
| 232 |
int32x4_t vacc67xKL = vdupq_n_s32(0); |
| 233 |
int32x4_t vacc67xMN = vdupq_n_s32(0); |
| 234 |
int32x4_t vacc67xOP = vdupq_n_s32(0); |
| 235 |
int32x4_t vacc67xQR = vdupq_n_s32(0); |
| 236 |
int32x4_t vacc67xST = vdupq_n_s32(0); |
| 237 |
int32x4_t vacc67xUV = vdupq_n_s32(0); |
| 238 |
|
| 239 |
size_t k = bl; |
| 240 |
// 2x partial unrolled loop to load 8 bytes at a time. |
| 241 |
|
| 242 |
uint64x2x2_t va01x0123456789ABCDEF; |
| 243 |
va01x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 244 |
va01x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 245 |
uint64x2x2_t va23x0123456789ABCDEF; |
| 246 |
va23x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 247 |
va23x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 248 |
uint64x2x2_t va45x0123456789ABCDEF; |
| 249 |
va45x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 250 |
va45x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 251 |
uint64x2x2_t va67x0123456789ABCDEF; |
| 252 |
va67x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 253 |
va67x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 254 |
|
| 255 |
while (k >= 16 * sizeof(int8_t)) { |
| 256 |
// Load a 8x16 block of activations. |
| 257 |
va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a0, va01x0123456789ABCDEF, 0); a0 += 16; |
| 258 |
va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a2, va23x0123456789ABCDEF, 0); a2 += 16; |
| 259 |
va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a4, va45x0123456789ABCDEF, 0); a4 += 16; |
| 260 |
va67x0123456789ABCDEF = vld2q_lane_u64((const void*) a6, va67x0123456789ABCDEF, 0); a6 += 16; |
| 261 |
va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a1, va01x0123456789ABCDEF, 1); a1 += 16; |
| 262 |
va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a3, va23x0123456789ABCDEF, 1); a3 += 16; |
| 263 |
va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a5, va45x0123456789ABCDEF, 1); a5 += 16; |
| 264 |
va67x0123456789ABCDEF = vld2q_lane_u64((const void*) a7, va67x0123456789ABCDEF, 1); a7 += 16; |
| 265 |
|
| 266 |
const int8x16_t va01x01234567 = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]); |
| 267 |
const int8x16_t va01x89ABCDEF = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]); |
| 268 |
const int8x16_t va23x01234567 = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]); |
| 269 |
const int8x16_t va23x89ABCDEF = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]); |
| 270 |
const int8x16_t va45x01234567 = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]); |
| 271 |
const int8x16_t va45x89ABCDEF = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]); |
| 272 |
const int8x16_t va67x01234567 = vreinterpretq_s8_u64(va67x0123456789ABCDEF.val[0]); |
| 273 |
const int8x16_t va67x89ABCDEF = vreinterpretq_s8_u64(va67x0123456789ABCDEF.val[1]); |
| 274 |
|
| 275 |
// Load a 16x32 block of weights. |
| 276 |
const int8x16_t vb01x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 277 |
const int8x16_t vb23x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 278 |
const int8x16_t vb45x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 279 |
const int8x16_t vb67x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 280 |
const int8x16_t vb89x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 281 |
const int8x16_t vbABx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 282 |
const int8x16_t vbCDx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 283 |
const int8x16_t vbEFx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 284 |
const int8x16_t vbGHx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 285 |
const int8x16_t vbIJx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 286 |
const int8x16_t vbKLx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 287 |
const int8x16_t vbMNx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 288 |
const int8x16_t vbOPx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 289 |
const int8x16_t vbQRx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 290 |
const int8x16_t vbSTx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 291 |
const int8x16_t vbUVx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 292 |
const int8x16_t vb01x01234567 = vshlq_n_s8(vb01x0123456789ABCDEF, 4); |
| 293 |
const int8x16_t vb23x01234567 = vshlq_n_s8(vb23x0123456789ABCDEF, 4); |
| 294 |
const int8x16_t vb45x01234567 = vshlq_n_s8(vb45x0123456789ABCDEF, 4); |
| 295 |
const int8x16_t vb67x01234567 = vshlq_n_s8(vb67x0123456789ABCDEF, 4); |
| 296 |
const int8x16_t vb89x01234567 = vshlq_n_s8(vb89x0123456789ABCDEF, 4); |
| 297 |
const int8x16_t vbABx01234567 = vshlq_n_s8(vbABx0123456789ABCDEF, 4); |
| 298 |
const int8x16_t vbCDx01234567 = vshlq_n_s8(vbCDx0123456789ABCDEF, 4); |
| 299 |
const int8x16_t vbEFx01234567 = vshlq_n_s8(vbEFx0123456789ABCDEF, 4); |
| 300 |
const int8x16_t vbGHx01234567 = vshlq_n_s8(vbGHx0123456789ABCDEF, 4); |
| 301 |
const int8x16_t vbIJx01234567 = vshlq_n_s8(vbIJx0123456789ABCDEF, 4); |
| 302 |
const int8x16_t vbKLx01234567 = vshlq_n_s8(vbKLx0123456789ABCDEF, 4); |
| 303 |
const int8x16_t vbMNx01234567 = vshlq_n_s8(vbMNx0123456789ABCDEF, 4); |
| 304 |
const int8x16_t vbOPx01234567 = vshlq_n_s8(vbOPx0123456789ABCDEF, 4); |
| 305 |
const int8x16_t vbQRx01234567 = vshlq_n_s8(vbQRx0123456789ABCDEF, 4); |
| 306 |
const int8x16_t vbSTx01234567 = vshlq_n_s8(vbSTx0123456789ABCDEF, 4); |
| 307 |
const int8x16_t vbUVx01234567 = vshlq_n_s8(vbUVx0123456789ABCDEF, 4); |
| 308 |
const int8x16_t vb01x89ABCDEF = vandq_s8(vb01x0123456789ABCDEF, vmask); |
| 309 |
const int8x16_t vb23x89ABCDEF = vandq_s8(vb23x0123456789ABCDEF, vmask); |
| 310 |
const int8x16_t vb45x89ABCDEF = vandq_s8(vb45x0123456789ABCDEF, vmask); |
| 311 |
const int8x16_t vb67x89ABCDEF = vandq_s8(vb67x0123456789ABCDEF, vmask); |
| 312 |
const int8x16_t vb89x89ABCDEF = vandq_s8(vb89x0123456789ABCDEF, vmask); |
| 313 |
const int8x16_t vbABx89ABCDEF = vandq_s8(vbABx0123456789ABCDEF, vmask); |
| 314 |
const int8x16_t vbCDx89ABCDEF = vandq_s8(vbCDx0123456789ABCDEF, vmask); |
| 315 |
const int8x16_t vbEFx89ABCDEF = vandq_s8(vbEFx0123456789ABCDEF, vmask); |
| 316 |
const int8x16_t vbGHx89ABCDEF = vandq_s8(vbGHx0123456789ABCDEF, vmask); |
| 317 |
const int8x16_t vbIJx89ABCDEF = vandq_s8(vbIJx0123456789ABCDEF, vmask); |
| 318 |
const int8x16_t vbKLx89ABCDEF = vandq_s8(vbKLx0123456789ABCDEF, vmask); |
| 319 |
const int8x16_t vbMNx89ABCDEF = vandq_s8(vbMNx0123456789ABCDEF, vmask); |
| 320 |
const int8x16_t vbOPx89ABCDEF = vandq_s8(vbOPx0123456789ABCDEF, vmask); |
| 321 |
const int8x16_t vbQRx89ABCDEF = vandq_s8(vbQRx0123456789ABCDEF, vmask); |
| 322 |
const int8x16_t vbSTx89ABCDEF = vandq_s8(vbSTx0123456789ABCDEF, vmask); |
| 323 |
const int8x16_t vbUVx89ABCDEF = vandq_s8(vbUVx0123456789ABCDEF, vmask); |
| 324 |
|
| 325 |
// Multiply-accumulate: 8x8 * 8x32 --> 8x32. |
| 326 |
vacc01x01 = vmmlaq_s32(vacc01x01, va01x01234567, vb01x01234567); |
| 327 |
vacc01x23 = vmmlaq_s32(vacc01x23, va01x01234567, vb23x01234567); |
| 328 |
vacc01x45 = vmmlaq_s32(vacc01x45, va01x01234567, vb45x01234567); |
| 329 |
vacc01x67 = vmmlaq_s32(vacc01x67, va01x01234567, vb67x01234567); |
| 330 |
vacc01x89 = vmmlaq_s32(vacc01x89, va01x01234567, vb89x01234567); |
| 331 |
vacc01xAB = vmmlaq_s32(vacc01xAB, va01x01234567, vbABx01234567); |
| 332 |
vacc01xCD = vmmlaq_s32(vacc01xCD, va01x01234567, vbCDx01234567); |
| 333 |
vacc01xEF = vmmlaq_s32(vacc01xEF, va01x01234567, vbEFx01234567); |
| 334 |
vacc01xGH = vmmlaq_s32(vacc01xGH, va01x01234567, vbGHx01234567); |
| 335 |
vacc01xIJ = vmmlaq_s32(vacc01xIJ, va01x01234567, vbIJx01234567); |
| 336 |
vacc01xKL = vmmlaq_s32(vacc01xKL, va01x01234567, vbKLx01234567); |
| 337 |
vacc01xMN = vmmlaq_s32(vacc01xMN, va01x01234567, vbMNx01234567); |
| 338 |
vacc01xOP = vmmlaq_s32(vacc01xOP, va01x01234567, vbOPx01234567); |
| 339 |
vacc01xQR = vmmlaq_s32(vacc01xQR, va01x01234567, vbQRx01234567); |
| 340 |
vacc01xST = vmmlaq_s32(vacc01xST, va01x01234567, vbSTx01234567); |
| 341 |
vacc01xUV = vmmlaq_s32(vacc01xUV, va01x01234567, vbUVx01234567); |
| 342 |
vacc23x01 = vmmlaq_s32(vacc23x01, va23x01234567, vb01x01234567); |
| 343 |
vacc23x23 = vmmlaq_s32(vacc23x23, va23x01234567, vb23x01234567); |
| 344 |
vacc23x45 = vmmlaq_s32(vacc23x45, va23x01234567, vb45x01234567); |
| 345 |
vacc23x67 = vmmlaq_s32(vacc23x67, va23x01234567, vb67x01234567); |
| 346 |
vacc23x89 = vmmlaq_s32(vacc23x89, va23x01234567, vb89x01234567); |
| 347 |
vacc23xAB = vmmlaq_s32(vacc23xAB, va23x01234567, vbABx01234567); |
| 348 |
vacc23xCD = vmmlaq_s32(vacc23xCD, va23x01234567, vbCDx01234567); |
| 349 |
vacc23xEF = vmmlaq_s32(vacc23xEF, va23x01234567, vbEFx01234567); |
| 350 |
vacc23xGH = vmmlaq_s32(vacc23xGH, va23x01234567, vbGHx01234567); |
| 351 |
vacc23xIJ = vmmlaq_s32(vacc23xIJ, va23x01234567, vbIJx01234567); |
| 352 |
vacc23xKL = vmmlaq_s32(vacc23xKL, va23x01234567, vbKLx01234567); |
| 353 |
vacc23xMN = vmmlaq_s32(vacc23xMN, va23x01234567, vbMNx01234567); |
| 354 |
vacc23xOP = vmmlaq_s32(vacc23xOP, va23x01234567, vbOPx01234567); |
| 355 |
vacc23xQR = vmmlaq_s32(vacc23xQR, va23x01234567, vbQRx01234567); |
| 356 |
vacc23xST = vmmlaq_s32(vacc23xST, va23x01234567, vbSTx01234567); |
| 357 |
vacc23xUV = vmmlaq_s32(vacc23xUV, va23x01234567, vbUVx01234567); |
| 358 |
vacc45x01 = vmmlaq_s32(vacc45x01, va45x01234567, vb01x01234567); |
| 359 |
vacc45x23 = vmmlaq_s32(vacc45x23, va45x01234567, vb23x01234567); |
| 360 |
vacc45x45 = vmmlaq_s32(vacc45x45, va45x01234567, vb45x01234567); |
| 361 |
vacc45x67 = vmmlaq_s32(vacc45x67, va45x01234567, vb67x01234567); |
| 362 |
vacc45x89 = vmmlaq_s32(vacc45x89, va45x01234567, vb89x01234567); |
| 363 |
vacc45xAB = vmmlaq_s32(vacc45xAB, va45x01234567, vbABx01234567); |
| 364 |
vacc45xCD = vmmlaq_s32(vacc45xCD, va45x01234567, vbCDx01234567); |
| 365 |
vacc45xEF = vmmlaq_s32(vacc45xEF, va45x01234567, vbEFx01234567); |
| 366 |
vacc45xGH = vmmlaq_s32(vacc45xGH, va45x01234567, vbGHx01234567); |
| 367 |
vacc45xIJ = vmmlaq_s32(vacc45xIJ, va45x01234567, vbIJx01234567); |
| 368 |
vacc45xKL = vmmlaq_s32(vacc45xKL, va45x01234567, vbKLx01234567); |
| 369 |
vacc45xMN = vmmlaq_s32(vacc45xMN, va45x01234567, vbMNx01234567); |
| 370 |
vacc45xOP = vmmlaq_s32(vacc45xOP, va45x01234567, vbOPx01234567); |
| 371 |
vacc45xQR = vmmlaq_s32(vacc45xQR, va45x01234567, vbQRx01234567); |
| 372 |
vacc45xST = vmmlaq_s32(vacc45xST, va45x01234567, vbSTx01234567); |
| 373 |
vacc45xUV = vmmlaq_s32(vacc45xUV, va45x01234567, vbUVx01234567); |
| 374 |
vacc67x01 = vmmlaq_s32(vacc67x01, va67x01234567, vb01x01234567); |
| 375 |
vacc67x23 = vmmlaq_s32(vacc67x23, va67x01234567, vb23x01234567); |
| 376 |
vacc67x45 = vmmlaq_s32(vacc67x45, va67x01234567, vb45x01234567); |
| 377 |
vacc67x67 = vmmlaq_s32(vacc67x67, va67x01234567, vb67x01234567); |
| 378 |
vacc67x89 = vmmlaq_s32(vacc67x89, va67x01234567, vb89x01234567); |
| 379 |
vacc67xAB = vmmlaq_s32(vacc67xAB, va67x01234567, vbABx01234567); |
| 380 |
vacc67xCD = vmmlaq_s32(vacc67xCD, va67x01234567, vbCDx01234567); |
| 381 |
vacc67xEF = vmmlaq_s32(vacc67xEF, va67x01234567, vbEFx01234567); |
| 382 |
vacc67xGH = vmmlaq_s32(vacc67xGH, va67x01234567, vbGHx01234567); |
| 383 |
vacc67xIJ = vmmlaq_s32(vacc67xIJ, va67x01234567, vbIJx01234567); |
| 384 |
vacc67xKL = vmmlaq_s32(vacc67xKL, va67x01234567, vbKLx01234567); |
| 385 |
vacc67xMN = vmmlaq_s32(vacc67xMN, va67x01234567, vbMNx01234567); |
| 386 |
vacc67xOP = vmmlaq_s32(vacc67xOP, va67x01234567, vbOPx01234567); |
| 387 |
vacc67xQR = vmmlaq_s32(vacc67xQR, va67x01234567, vbQRx01234567); |
| 388 |
vacc67xST = vmmlaq_s32(vacc67xST, va67x01234567, vbSTx01234567); |
| 389 |
vacc67xUV = vmmlaq_s32(vacc67xUV, va67x01234567, vbUVx01234567); |
| 390 |
vacc01x01 = vmmlaq_s32(vacc01x01, va01x89ABCDEF, vb01x89ABCDEF); |
| 391 |
vacc01x23 = vmmlaq_s32(vacc01x23, va01x89ABCDEF, vb23x89ABCDEF); |
| 392 |
vacc01x45 = vmmlaq_s32(vacc01x45, va01x89ABCDEF, vb45x89ABCDEF); |
| 393 |
vacc01x67 = vmmlaq_s32(vacc01x67, va01x89ABCDEF, vb67x89ABCDEF); |
| 394 |
vacc01x89 = vmmlaq_s32(vacc01x89, va01x89ABCDEF, vb89x89ABCDEF); |
| 395 |
vacc01xAB = vmmlaq_s32(vacc01xAB, va01x89ABCDEF, vbABx89ABCDEF); |
| 396 |
vacc01xCD = vmmlaq_s32(vacc01xCD, va01x89ABCDEF, vbCDx89ABCDEF); |
| 397 |
vacc01xEF = vmmlaq_s32(vacc01xEF, va01x89ABCDEF, vbEFx89ABCDEF); |
| 398 |
vacc01xGH = vmmlaq_s32(vacc01xGH, va01x89ABCDEF, vbGHx89ABCDEF); |
| 399 |
vacc01xIJ = vmmlaq_s32(vacc01xIJ, va01x89ABCDEF, vbIJx89ABCDEF); |
| 400 |
vacc01xKL = vmmlaq_s32(vacc01xKL, va01x89ABCDEF, vbKLx89ABCDEF); |
| 401 |
vacc01xMN = vmmlaq_s32(vacc01xMN, va01x89ABCDEF, vbMNx89ABCDEF); |
| 402 |
vacc01xOP = vmmlaq_s32(vacc01xOP, va01x89ABCDEF, vbOPx89ABCDEF); |
| 403 |
vacc01xQR = vmmlaq_s32(vacc01xQR, va01x89ABCDEF, vbQRx89ABCDEF); |
| 404 |
vacc01xST = vmmlaq_s32(vacc01xST, va01x89ABCDEF, vbSTx89ABCDEF); |
| 405 |
vacc01xUV = vmmlaq_s32(vacc01xUV, va01x89ABCDEF, vbUVx89ABCDEF); |
| 406 |
vacc23x01 = vmmlaq_s32(vacc23x01, va23x89ABCDEF, vb01x89ABCDEF); |
| 407 |
vacc23x23 = vmmlaq_s32(vacc23x23, va23x89ABCDEF, vb23x89ABCDEF); |
| 408 |
vacc23x45 = vmmlaq_s32(vacc23x45, va23x89ABCDEF, vb45x89ABCDEF); |
| 409 |
vacc23x67 = vmmlaq_s32(vacc23x67, va23x89ABCDEF, vb67x89ABCDEF); |
| 410 |
vacc23x89 = vmmlaq_s32(vacc23x89, va23x89ABCDEF, vb89x89ABCDEF); |
| 411 |
vacc23xAB = vmmlaq_s32(vacc23xAB, va23x89ABCDEF, vbABx89ABCDEF); |
| 412 |
vacc23xCD = vmmlaq_s32(vacc23xCD, va23x89ABCDEF, vbCDx89ABCDEF); |
| 413 |
vacc23xEF = vmmlaq_s32(vacc23xEF, va23x89ABCDEF, vbEFx89ABCDEF); |
| 414 |
vacc23xGH = vmmlaq_s32(vacc23xGH, va23x89ABCDEF, vbGHx89ABCDEF); |
| 415 |
vacc23xIJ = vmmlaq_s32(vacc23xIJ, va23x89ABCDEF, vbIJx89ABCDEF); |
| 416 |
vacc23xKL = vmmlaq_s32(vacc23xKL, va23x89ABCDEF, vbKLx89ABCDEF); |
| 417 |
vacc23xMN = vmmlaq_s32(vacc23xMN, va23x89ABCDEF, vbMNx89ABCDEF); |
| 418 |
vacc23xOP = vmmlaq_s32(vacc23xOP, va23x89ABCDEF, vbOPx89ABCDEF); |
| 419 |
vacc23xQR = vmmlaq_s32(vacc23xQR, va23x89ABCDEF, vbQRx89ABCDEF); |
| 420 |
vacc23xST = vmmlaq_s32(vacc23xST, va23x89ABCDEF, vbSTx89ABCDEF); |
| 421 |
vacc23xUV = vmmlaq_s32(vacc23xUV, va23x89ABCDEF, vbUVx89ABCDEF); |
| 422 |
vacc45x01 = vmmlaq_s32(vacc45x01, va45x89ABCDEF, vb01x89ABCDEF); |
| 423 |
vacc45x23 = vmmlaq_s32(vacc45x23, va45x89ABCDEF, vb23x89ABCDEF); |
| 424 |
vacc45x45 = vmmlaq_s32(vacc45x45, va45x89ABCDEF, vb45x89ABCDEF); |
| 425 |
vacc45x67 = vmmlaq_s32(vacc45x67, va45x89ABCDEF, vb67x89ABCDEF); |
| 426 |
vacc45x89 = vmmlaq_s32(vacc45x89, va45x89ABCDEF, vb89x89ABCDEF); |
| 427 |
vacc45xAB = vmmlaq_s32(vacc45xAB, va45x89ABCDEF, vbABx89ABCDEF); |
| 428 |
vacc45xCD = vmmlaq_s32(vacc45xCD, va45x89ABCDEF, vbCDx89ABCDEF); |
| 429 |
vacc45xEF = vmmlaq_s32(vacc45xEF, va45x89ABCDEF, vbEFx89ABCDEF); |
| 430 |
vacc45xGH = vmmlaq_s32(vacc45xGH, va45x89ABCDEF, vbGHx89ABCDEF); |
| 431 |
vacc45xIJ = vmmlaq_s32(vacc45xIJ, va45x89ABCDEF, vbIJx89ABCDEF); |
| 432 |
vacc45xKL = vmmlaq_s32(vacc45xKL, va45x89ABCDEF, vbKLx89ABCDEF); |
| 433 |
vacc45xMN = vmmlaq_s32(vacc45xMN, va45x89ABCDEF, vbMNx89ABCDEF); |
| 434 |
vacc45xOP = vmmlaq_s32(vacc45xOP, va45x89ABCDEF, vbOPx89ABCDEF); |
| 435 |
vacc45xQR = vmmlaq_s32(vacc45xQR, va45x89ABCDEF, vbQRx89ABCDEF); |
| 436 |
vacc45xST = vmmlaq_s32(vacc45xST, va45x89ABCDEF, vbSTx89ABCDEF); |
| 437 |
vacc45xUV = vmmlaq_s32(vacc45xUV, va45x89ABCDEF, vbUVx89ABCDEF); |
| 438 |
vacc67x01 = vmmlaq_s32(vacc67x01, va67x89ABCDEF, vb01x89ABCDEF); |
| 439 |
vacc67x23 = vmmlaq_s32(vacc67x23, va67x89ABCDEF, vb23x89ABCDEF); |
| 440 |
vacc67x45 = vmmlaq_s32(vacc67x45, va67x89ABCDEF, vb45x89ABCDEF); |
| 441 |
vacc67x67 = vmmlaq_s32(vacc67x67, va67x89ABCDEF, vb67x89ABCDEF); |
| 442 |
vacc67x89 = vmmlaq_s32(vacc67x89, va67x89ABCDEF, vb89x89ABCDEF); |
| 443 |
vacc67xAB = vmmlaq_s32(vacc67xAB, va67x89ABCDEF, vbABx89ABCDEF); |
| 444 |
vacc67xCD = vmmlaq_s32(vacc67xCD, va67x89ABCDEF, vbCDx89ABCDEF); |
| 445 |
vacc67xEF = vmmlaq_s32(vacc67xEF, va67x89ABCDEF, vbEFx89ABCDEF); |
| 446 |
vacc67xGH = vmmlaq_s32(vacc67xGH, va67x89ABCDEF, vbGHx89ABCDEF); |
| 447 |
vacc67xIJ = vmmlaq_s32(vacc67xIJ, va67x89ABCDEF, vbIJx89ABCDEF); |
| 448 |
vacc67xKL = vmmlaq_s32(vacc67xKL, va67x89ABCDEF, vbKLx89ABCDEF); |
| 449 |
vacc67xMN = vmmlaq_s32(vacc67xMN, va67x89ABCDEF, vbMNx89ABCDEF); |
| 450 |
vacc67xOP = vmmlaq_s32(vacc67xOP, va67x89ABCDEF, vbOPx89ABCDEF); |
| 451 |
vacc67xQR = vmmlaq_s32(vacc67xQR, va67x89ABCDEF, vbQRx89ABCDEF); |
| 452 |
vacc67xST = vmmlaq_s32(vacc67xST, va67x89ABCDEF, vbSTx89ABCDEF); |
| 453 |
vacc67xUV = vmmlaq_s32(vacc67xUV, va67x89ABCDEF, vbUVx89ABCDEF); |
| 454 |
|
| 455 |
k -= 16 * sizeof(int8_t); |
| 456 |
} |
| 457 |
// Handle up to 8 final positions of `k` |
| 458 |
if XNN_UNLIKELY(k != 0) { |
| 459 |
// Load a 8x8 block of activations. |
| 460 |
uint64x2_t va01x01234567 = vld1q_dup_u64((const void*) a0); a0 += 8; |
| 461 |
uint64x2_t va23x01234567 = vld1q_dup_u64((const void*) a2); a2 += 8; |
| 462 |
uint64x2_t va45x01234567 = vld1q_dup_u64((const void*) a4); a4 += 8; |
| 463 |
uint64x2_t va67x01234567 = vld1q_dup_u64((const void*) a6); a6 += 8; |
| 464 |
va01x01234567 = vld1q_lane_u64((const void*) a1, va01x01234567, 1); a1 += 8; |
| 465 |
va23x01234567 = vld1q_lane_u64((const void*) a3, va23x01234567, 1); a3 += 8; |
| 466 |
va45x01234567 = vld1q_lane_u64((const void*) a5, va45x01234567, 1); a5 += 8; |
| 467 |
va67x01234567 = vld1q_lane_u64((const void*) a7, va67x01234567, 1); a7 += 8; |
| 468 |
|
| 469 |
// Load a 16x32 block of weights. |
| 470 |
const int8x16_t vb01x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 471 |
const int8x16_t vb23x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 472 |
const int8x16_t vb45x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 473 |
const int8x16_t vb67x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 474 |
const int8x16_t vb89x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 475 |
const int8x16_t vbABx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 476 |
const int8x16_t vbCDx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 477 |
const int8x16_t vbEFx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 478 |
const int8x16_t vbGHx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 479 |
const int8x16_t vbIJx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 480 |
const int8x16_t vbKLx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 481 |
const int8x16_t vbMNx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 482 |
const int8x16_t vbOPx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 483 |
const int8x16_t vbQRx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 484 |
const int8x16_t vbSTx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 485 |
const int8x16_t vbUVx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 486 |
const int8x16_t vb01x01234567 = vshlq_n_s8(vb01x0123456789ABCDEF, 4); |
| 487 |
const int8x16_t vb23x01234567 = vshlq_n_s8(vb23x0123456789ABCDEF, 4); |
| 488 |
const int8x16_t vb45x01234567 = vshlq_n_s8(vb45x0123456789ABCDEF, 4); |
| 489 |
const int8x16_t vb67x01234567 = vshlq_n_s8(vb67x0123456789ABCDEF, 4); |
| 490 |
const int8x16_t vb89x01234567 = vshlq_n_s8(vb89x0123456789ABCDEF, 4); |
| 491 |
const int8x16_t vbABx01234567 = vshlq_n_s8(vbABx0123456789ABCDEF, 4); |
| 492 |
const int8x16_t vbCDx01234567 = vshlq_n_s8(vbCDx0123456789ABCDEF, 4); |
| 493 |
const int8x16_t vbEFx01234567 = vshlq_n_s8(vbEFx0123456789ABCDEF, 4); |
| 494 |
const int8x16_t vbGHx01234567 = vshlq_n_s8(vbGHx0123456789ABCDEF, 4); |
| 495 |
const int8x16_t vbIJx01234567 = vshlq_n_s8(vbIJx0123456789ABCDEF, 4); |
| 496 |
const int8x16_t vbKLx01234567 = vshlq_n_s8(vbKLx0123456789ABCDEF, 4); |
| 497 |
const int8x16_t vbMNx01234567 = vshlq_n_s8(vbMNx0123456789ABCDEF, 4); |
| 498 |
const int8x16_t vbOPx01234567 = vshlq_n_s8(vbOPx0123456789ABCDEF, 4); |
| 499 |
const int8x16_t vbQRx01234567 = vshlq_n_s8(vbQRx0123456789ABCDEF, 4); |
| 500 |
const int8x16_t vbSTx01234567 = vshlq_n_s8(vbSTx0123456789ABCDEF, 4); |
| 501 |
const int8x16_t vbUVx01234567 = vshlq_n_s8(vbUVx0123456789ABCDEF, 4); |
| 502 |
|
| 503 |
// Multiply-accumulate: 8x4 * 4x32 --> 8x32. |
| 504 |
vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x01234567), vb01x01234567); |
| 505 |
vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x01234567), vb23x01234567); |
| 506 |
vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x01234567), vb45x01234567); |
| 507 |
vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x01234567), vb67x01234567); |
| 508 |
vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x01234567), vb89x01234567); |
| 509 |
vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x01234567), vbABx01234567); |
| 510 |
vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x01234567), vbCDx01234567); |
| 511 |
vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x01234567), vbEFx01234567); |
| 512 |
vacc01xGH = vmmlaq_s32(vacc01xGH, vreinterpretq_s8_u64(va01x01234567), vbGHx01234567); |
| 513 |
vacc01xIJ = vmmlaq_s32(vacc01xIJ, vreinterpretq_s8_u64(va01x01234567), vbIJx01234567); |
| 514 |
vacc01xKL = vmmlaq_s32(vacc01xKL, vreinterpretq_s8_u64(va01x01234567), vbKLx01234567); |
| 515 |
vacc01xMN = vmmlaq_s32(vacc01xMN, vreinterpretq_s8_u64(va01x01234567), vbMNx01234567); |
| 516 |
vacc01xOP = vmmlaq_s32(vacc01xOP, vreinterpretq_s8_u64(va01x01234567), vbOPx01234567); |
| 517 |
vacc01xQR = vmmlaq_s32(vacc01xQR, vreinterpretq_s8_u64(va01x01234567), vbQRx01234567); |
| 518 |
vacc01xST = vmmlaq_s32(vacc01xST, vreinterpretq_s8_u64(va01x01234567), vbSTx01234567); |
| 519 |
vacc01xUV = vmmlaq_s32(vacc01xUV, vreinterpretq_s8_u64(va01x01234567), vbUVx01234567); |
| 520 |
vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x01234567), vb01x01234567); |
| 521 |
vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x01234567), vb23x01234567); |
| 522 |
vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x01234567), vb45x01234567); |
| 523 |
vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x01234567), vb67x01234567); |
| 524 |
vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x01234567), vb89x01234567); |
| 525 |
vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x01234567), vbABx01234567); |
| 526 |
vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x01234567), vbCDx01234567); |
| 527 |
vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x01234567), vbEFx01234567); |
| 528 |
vacc23xGH = vmmlaq_s32(vacc23xGH, vreinterpretq_s8_u64(va23x01234567), vbGHx01234567); |
| 529 |
vacc23xIJ = vmmlaq_s32(vacc23xIJ, vreinterpretq_s8_u64(va23x01234567), vbIJx01234567); |
| 530 |
vacc23xKL = vmmlaq_s32(vacc23xKL, vreinterpretq_s8_u64(va23x01234567), vbKLx01234567); |
| 531 |
vacc23xMN = vmmlaq_s32(vacc23xMN, vreinterpretq_s8_u64(va23x01234567), vbMNx01234567); |
| 532 |
vacc23xOP = vmmlaq_s32(vacc23xOP, vreinterpretq_s8_u64(va23x01234567), vbOPx01234567); |
| 533 |
vacc23xQR = vmmlaq_s32(vacc23xQR, vreinterpretq_s8_u64(va23x01234567), vbQRx01234567); |
| 534 |
vacc23xST = vmmlaq_s32(vacc23xST, vreinterpretq_s8_u64(va23x01234567), vbSTx01234567); |
| 535 |
vacc23xUV = vmmlaq_s32(vacc23xUV, vreinterpretq_s8_u64(va23x01234567), vbUVx01234567); |
| 536 |
vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x01234567), vb01x01234567); |
| 537 |
vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x01234567), vb23x01234567); |
| 538 |
vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x01234567), vb45x01234567); |
| 539 |
vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x01234567), vb67x01234567); |
| 540 |
vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x01234567), vb89x01234567); |
| 541 |
vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x01234567), vbABx01234567); |
| 542 |
vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x01234567), vbCDx01234567); |
| 543 |
vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x01234567), vbEFx01234567); |
| 544 |
vacc45xGH = vmmlaq_s32(vacc45xGH, vreinterpretq_s8_u64(va45x01234567), vbGHx01234567); |
| 545 |
vacc45xIJ = vmmlaq_s32(vacc45xIJ, vreinterpretq_s8_u64(va45x01234567), vbIJx01234567); |
| 546 |
vacc45xKL = vmmlaq_s32(vacc45xKL, vreinterpretq_s8_u64(va45x01234567), vbKLx01234567); |
| 547 |
vacc45xMN = vmmlaq_s32(vacc45xMN, vreinterpretq_s8_u64(va45x01234567), vbMNx01234567); |
| 548 |
vacc45xOP = vmmlaq_s32(vacc45xOP, vreinterpretq_s8_u64(va45x01234567), vbOPx01234567); |
| 549 |
vacc45xQR = vmmlaq_s32(vacc45xQR, vreinterpretq_s8_u64(va45x01234567), vbQRx01234567); |
| 550 |
vacc45xST = vmmlaq_s32(vacc45xST, vreinterpretq_s8_u64(va45x01234567), vbSTx01234567); |
| 551 |
vacc45xUV = vmmlaq_s32(vacc45xUV, vreinterpretq_s8_u64(va45x01234567), vbUVx01234567); |
| 552 |
vacc67x01 = vmmlaq_s32(vacc67x01, vreinterpretq_s8_u64(va67x01234567), vb01x01234567); |
| 553 |
vacc67x23 = vmmlaq_s32(vacc67x23, vreinterpretq_s8_u64(va67x01234567), vb23x01234567); |
| 554 |
vacc67x45 = vmmlaq_s32(vacc67x45, vreinterpretq_s8_u64(va67x01234567), vb45x01234567); |
| 555 |
vacc67x67 = vmmlaq_s32(vacc67x67, vreinterpretq_s8_u64(va67x01234567), vb67x01234567); |
| 556 |
vacc67x89 = vmmlaq_s32(vacc67x89, vreinterpretq_s8_u64(va67x01234567), vb89x01234567); |
| 557 |
vacc67xAB = vmmlaq_s32(vacc67xAB, vreinterpretq_s8_u64(va67x01234567), vbABx01234567); |
| 558 |
vacc67xCD = vmmlaq_s32(vacc67xCD, vreinterpretq_s8_u64(va67x01234567), vbCDx01234567); |
| 559 |
vacc67xEF = vmmlaq_s32(vacc67xEF, vreinterpretq_s8_u64(va67x01234567), vbEFx01234567); |
| 560 |
vacc67xGH = vmmlaq_s32(vacc67xGH, vreinterpretq_s8_u64(va67x01234567), vbGHx01234567); |
| 561 |
vacc67xIJ = vmmlaq_s32(vacc67xIJ, vreinterpretq_s8_u64(va67x01234567), vbIJx01234567); |
| 562 |
vacc67xKL = vmmlaq_s32(vacc67xKL, vreinterpretq_s8_u64(va67x01234567), vbKLx01234567); |
| 563 |
vacc67xMN = vmmlaq_s32(vacc67xMN, vreinterpretq_s8_u64(va67x01234567), vbMNx01234567); |
| 564 |
vacc67xOP = vmmlaq_s32(vacc67xOP, vreinterpretq_s8_u64(va67x01234567), vbOPx01234567); |
| 565 |
vacc67xQR = vmmlaq_s32(vacc67xQR, vreinterpretq_s8_u64(va67x01234567), vbQRx01234567); |
| 566 |
vacc67xST = vmmlaq_s32(vacc67xST, vreinterpretq_s8_u64(va67x01234567), vbSTx01234567); |
| 567 |
vacc67xUV = vmmlaq_s32(vacc67xUV, vreinterpretq_s8_u64(va67x01234567), vbUVx01234567); |
| 568 |
} |
| 569 |
|
| 570 |
int32x4_t vacc0x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23))); |
| 571 |
int32x4_t vacc1x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23))); |
| 572 |
int32x4_t vacc0x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67))); |
| 573 |
int32x4_t vacc1x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67))); |
| 574 |
int32x4_t vacc0x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB))); |
| 575 |
int32x4_t vacc1x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB))); |
| 576 |
int32x4_t vacc0xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF))); |
| 577 |
int32x4_t vacc1xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF))); |
| 578 |
int32x4_t vacc0xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xGH), vreinterpretq_u64_s32(vacc01xIJ))); |
| 579 |
int32x4_t vacc1xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xGH), vreinterpretq_u64_s32(vacc01xIJ))); |
| 580 |
int32x4_t vacc0xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xKL), vreinterpretq_u64_s32(vacc01xMN))); |
| 581 |
int32x4_t vacc1xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xKL), vreinterpretq_u64_s32(vacc01xMN))); |
| 582 |
int32x4_t vacc0xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xOP), vreinterpretq_u64_s32(vacc01xQR))); |
| 583 |
int32x4_t vacc1xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xOP), vreinterpretq_u64_s32(vacc01xQR))); |
| 584 |
int32x4_t vacc0xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xST), vreinterpretq_u64_s32(vacc01xUV))); |
| 585 |
int32x4_t vacc1xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xST), vreinterpretq_u64_s32(vacc01xUV))); |
| 586 |
int32x4_t vacc2x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23))); |
| 587 |
int32x4_t vacc3x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23))); |
| 588 |
int32x4_t vacc2x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67))); |
| 589 |
int32x4_t vacc3x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67))); |
| 590 |
int32x4_t vacc2x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB))); |
| 591 |
int32x4_t vacc3x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB))); |
| 592 |
int32x4_t vacc2xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF))); |
| 593 |
int32x4_t vacc3xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF))); |
| 594 |
int32x4_t vacc2xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xGH), vreinterpretq_u64_s32(vacc23xIJ))); |
| 595 |
int32x4_t vacc3xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xGH), vreinterpretq_u64_s32(vacc23xIJ))); |
| 596 |
int32x4_t vacc2xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xKL), vreinterpretq_u64_s32(vacc23xMN))); |
| 597 |
int32x4_t vacc3xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xKL), vreinterpretq_u64_s32(vacc23xMN))); |
| 598 |
int32x4_t vacc2xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xOP), vreinterpretq_u64_s32(vacc23xQR))); |
| 599 |
int32x4_t vacc3xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xOP), vreinterpretq_u64_s32(vacc23xQR))); |
| 600 |
int32x4_t vacc2xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xST), vreinterpretq_u64_s32(vacc23xUV))); |
| 601 |
int32x4_t vacc3xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xST), vreinterpretq_u64_s32(vacc23xUV))); |
| 602 |
int32x4_t vacc4x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23))); |
| 603 |
int32x4_t vacc5x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23))); |
| 604 |
int32x4_t vacc4x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67))); |
| 605 |
int32x4_t vacc5x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67))); |
| 606 |
int32x4_t vacc4x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB))); |
| 607 |
int32x4_t vacc5x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB))); |
| 608 |
int32x4_t vacc4xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF))); |
| 609 |
int32x4_t vacc5xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF))); |
| 610 |
int32x4_t vacc4xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xGH), vreinterpretq_u64_s32(vacc45xIJ))); |
| 611 |
int32x4_t vacc5xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xGH), vreinterpretq_u64_s32(vacc45xIJ))); |
| 612 |
int32x4_t vacc4xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xKL), vreinterpretq_u64_s32(vacc45xMN))); |
| 613 |
int32x4_t vacc5xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xKL), vreinterpretq_u64_s32(vacc45xMN))); |
| 614 |
int32x4_t vacc4xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xOP), vreinterpretq_u64_s32(vacc45xQR))); |
| 615 |
int32x4_t vacc5xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xOP), vreinterpretq_u64_s32(vacc45xQR))); |
| 616 |
int32x4_t vacc4xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xST), vreinterpretq_u64_s32(vacc45xUV))); |
| 617 |
int32x4_t vacc5xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xST), vreinterpretq_u64_s32(vacc45xUV))); |
| 618 |
int32x4_t vacc6x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x01), vreinterpretq_u64_s32(vacc67x23))); |
| 619 |
int32x4_t vacc7x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x01), vreinterpretq_u64_s32(vacc67x23))); |
| 620 |
int32x4_t vacc6x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x45), vreinterpretq_u64_s32(vacc67x67))); |
| 621 |
int32x4_t vacc7x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x45), vreinterpretq_u64_s32(vacc67x67))); |
| 622 |
int32x4_t vacc6x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x89), vreinterpretq_u64_s32(vacc67xAB))); |
| 623 |
int32x4_t vacc7x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x89), vreinterpretq_u64_s32(vacc67xAB))); |
| 624 |
int32x4_t vacc6xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xCD), vreinterpretq_u64_s32(vacc67xEF))); |
| 625 |
int32x4_t vacc7xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xCD), vreinterpretq_u64_s32(vacc67xEF))); |
| 626 |
int32x4_t vacc6xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xGH), vreinterpretq_u64_s32(vacc67xIJ))); |
| 627 |
int32x4_t vacc7xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xGH), vreinterpretq_u64_s32(vacc67xIJ))); |
| 628 |
int32x4_t vacc6xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xKL), vreinterpretq_u64_s32(vacc67xMN))); |
| 629 |
int32x4_t vacc7xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xKL), vreinterpretq_u64_s32(vacc67xMN))); |
| 630 |
int32x4_t vacc6xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xOP), vreinterpretq_u64_s32(vacc67xQR))); |
| 631 |
int32x4_t vacc7xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xOP), vreinterpretq_u64_s32(vacc67xQR))); |
| 632 |
int32x4_t vacc6xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xST), vreinterpretq_u64_s32(vacc67xUV))); |
| 633 |
int32x4_t vacc7xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xST), vreinterpretq_u64_s32(vacc67xUV))); |
| 634 |
const float32x4_t vfilter_output_scale0123 = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 635 |
const float32x4_t vfilter_output_scale4567 = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 636 |
const float32x4_t vfilter_output_scale89AB = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 637 |
const float32x4_t vfilter_output_scaleCDEF = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 638 |
const float32x4_t vfilter_output_scaleGHIJ = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 639 |
const float32x4_t vfilter_output_scaleKLMN = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 640 |
const float32x4_t vfilter_output_scaleOPQR = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 641 |
const float32x4_t vfilter_output_scaleSTUV = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4; |
| 642 |
float32x4_t vf0x0123 = vcvtq_f32_s32(vacc0x0123); |
| 643 |
vout0x0123 = vfmaq_f32(vout0x0123, vf0x0123, vfilter_output_scale0123); |
| 644 |
float32x4_t vf0x4567 = vcvtq_f32_s32(vacc0x4567); |
| 645 |
vout0x4567 = vfmaq_f32(vout0x4567, vf0x4567, vfilter_output_scale4567); |
| 646 |
float32x4_t vf0x89AB = vcvtq_f32_s32(vacc0x89AB); |
| 647 |
vout0x89AB = vfmaq_f32(vout0x89AB, vf0x89AB, vfilter_output_scale89AB); |
| 648 |
float32x4_t vf0xCDEF = vcvtq_f32_s32(vacc0xCDEF); |
| 649 |
vout0xCDEF = vfmaq_f32(vout0xCDEF, vf0xCDEF, vfilter_output_scaleCDEF); |
| 650 |
float32x4_t vf0xGHIJ = vcvtq_f32_s32(vacc0xGHIJ); |
| 651 |
vout0xGHIJ = vfmaq_f32(vout0xGHIJ, vf0xGHIJ, vfilter_output_scaleGHIJ); |
| 652 |
float32x4_t vf0xKLMN = vcvtq_f32_s32(vacc0xKLMN); |
| 653 |
vout0xKLMN = vfmaq_f32(vout0xKLMN, vf0xKLMN, vfilter_output_scaleKLMN); |
| 654 |
float32x4_t vf0xOPQR = vcvtq_f32_s32(vacc0xOPQR); |
| 655 |
vout0xOPQR = vfmaq_f32(vout0xOPQR, vf0xOPQR, vfilter_output_scaleOPQR); |
| 656 |
float32x4_t vf0xSTUV = vcvtq_f32_s32(vacc0xSTUV); |
| 657 |
vout0xSTUV = vfmaq_f32(vout0xSTUV, vf0xSTUV, vfilter_output_scaleSTUV); |
| 658 |
float32x4_t vf1x0123 = vcvtq_f32_s32(vacc1x0123); |
| 659 |
vout1x0123 = vfmaq_f32(vout1x0123, vf1x0123, vfilter_output_scale0123); |
| 660 |
float32x4_t vf1x4567 = vcvtq_f32_s32(vacc1x4567); |
| 661 |
vout1x4567 = vfmaq_f32(vout1x4567, vf1x4567, vfilter_output_scale4567); |
| 662 |
float32x4_t vf1x89AB = vcvtq_f32_s32(vacc1x89AB); |
| 663 |
vout1x89AB = vfmaq_f32(vout1x89AB, vf1x89AB, vfilter_output_scale89AB); |
| 664 |
float32x4_t vf1xCDEF = vcvtq_f32_s32(vacc1xCDEF); |
| 665 |
vout1xCDEF = vfmaq_f32(vout1xCDEF, vf1xCDEF, vfilter_output_scaleCDEF); |
| 666 |
float32x4_t vf1xGHIJ = vcvtq_f32_s32(vacc1xGHIJ); |
| 667 |
vout1xGHIJ = vfmaq_f32(vout1xGHIJ, vf1xGHIJ, vfilter_output_scaleGHIJ); |
| 668 |
float32x4_t vf1xKLMN = vcvtq_f32_s32(vacc1xKLMN); |
| 669 |
vout1xKLMN = vfmaq_f32(vout1xKLMN, vf1xKLMN, vfilter_output_scaleKLMN); |
| 670 |
float32x4_t vf1xOPQR = vcvtq_f32_s32(vacc1xOPQR); |
| 671 |
vout1xOPQR = vfmaq_f32(vout1xOPQR, vf1xOPQR, vfilter_output_scaleOPQR); |
| 672 |
float32x4_t vf1xSTUV = vcvtq_f32_s32(vacc1xSTUV); |
| 673 |
vout1xSTUV = vfmaq_f32(vout1xSTUV, vf1xSTUV, vfilter_output_scaleSTUV); |
| 674 |
float32x4_t vf2x0123 = vcvtq_f32_s32(vacc2x0123); |
| 675 |
vout2x0123 = vfmaq_f32(vout2x0123, vf2x0123, vfilter_output_scale0123); |
| 676 |
float32x4_t vf2x4567 = vcvtq_f32_s32(vacc2x4567); |
| 677 |
vout2x4567 = vfmaq_f32(vout2x4567, vf2x4567, vfilter_output_scale4567); |
| 678 |
float32x4_t vf2x89AB = vcvtq_f32_s32(vacc2x89AB); |
| 679 |
vout2x89AB = vfmaq_f32(vout2x89AB, vf2x89AB, vfilter_output_scale89AB); |
| 680 |
float32x4_t vf2xCDEF = vcvtq_f32_s32(vacc2xCDEF); |
| 681 |
vout2xCDEF = vfmaq_f32(vout2xCDEF, vf2xCDEF, vfilter_output_scaleCDEF); |
| 682 |
float32x4_t vf2xGHIJ = vcvtq_f32_s32(vacc2xGHIJ); |
| 683 |
vout2xGHIJ = vfmaq_f32(vout2xGHIJ, vf2xGHIJ, vfilter_output_scaleGHIJ); |
| 684 |
float32x4_t vf2xKLMN = vcvtq_f32_s32(vacc2xKLMN); |
| 685 |
vout2xKLMN = vfmaq_f32(vout2xKLMN, vf2xKLMN, vfilter_output_scaleKLMN); |
| 686 |
float32x4_t vf2xOPQR = vcvtq_f32_s32(vacc2xOPQR); |
| 687 |
vout2xOPQR = vfmaq_f32(vout2xOPQR, vf2xOPQR, vfilter_output_scaleOPQR); |
| 688 |
float32x4_t vf2xSTUV = vcvtq_f32_s32(vacc2xSTUV); |
| 689 |
vout2xSTUV = vfmaq_f32(vout2xSTUV, vf2xSTUV, vfilter_output_scaleSTUV); |
| 690 |
float32x4_t vf3x0123 = vcvtq_f32_s32(vacc3x0123); |
| 691 |
vout3x0123 = vfmaq_f32(vout3x0123, vf3x0123, vfilter_output_scale0123); |
| 692 |
float32x4_t vf3x4567 = vcvtq_f32_s32(vacc3x4567); |
| 693 |
vout3x4567 = vfmaq_f32(vout3x4567, vf3x4567, vfilter_output_scale4567); |
| 694 |
float32x4_t vf3x89AB = vcvtq_f32_s32(vacc3x89AB); |
| 695 |
vout3x89AB = vfmaq_f32(vout3x89AB, vf3x89AB, vfilter_output_scale89AB); |
| 696 |
float32x4_t vf3xCDEF = vcvtq_f32_s32(vacc3xCDEF); |
| 697 |
vout3xCDEF = vfmaq_f32(vout3xCDEF, vf3xCDEF, vfilter_output_scaleCDEF); |
| 698 |
float32x4_t vf3xGHIJ = vcvtq_f32_s32(vacc3xGHIJ); |
| 699 |
vout3xGHIJ = vfmaq_f32(vout3xGHIJ, vf3xGHIJ, vfilter_output_scaleGHIJ); |
| 700 |
float32x4_t vf3xKLMN = vcvtq_f32_s32(vacc3xKLMN); |
| 701 |
vout3xKLMN = vfmaq_f32(vout3xKLMN, vf3xKLMN, vfilter_output_scaleKLMN); |
| 702 |
float32x4_t vf3xOPQR = vcvtq_f32_s32(vacc3xOPQR); |
| 703 |
vout3xOPQR = vfmaq_f32(vout3xOPQR, vf3xOPQR, vfilter_output_scaleOPQR); |
| 704 |
float32x4_t vf3xSTUV = vcvtq_f32_s32(vacc3xSTUV); |
| 705 |
vout3xSTUV = vfmaq_f32(vout3xSTUV, vf3xSTUV, vfilter_output_scaleSTUV); |
| 706 |
float32x4_t vf4x0123 = vcvtq_f32_s32(vacc4x0123); |
| 707 |
vout4x0123 = vfmaq_f32(vout4x0123, vf4x0123, vfilter_output_scale0123); |
| 708 |
float32x4_t vf4x4567 = vcvtq_f32_s32(vacc4x4567); |
| 709 |
vout4x4567 = vfmaq_f32(vout4x4567, vf4x4567, vfilter_output_scale4567); |
| 710 |
float32x4_t vf4x89AB = vcvtq_f32_s32(vacc4x89AB); |
| 711 |
vout4x89AB = vfmaq_f32(vout4x89AB, vf4x89AB, vfilter_output_scale89AB); |
| 712 |
float32x4_t vf4xCDEF = vcvtq_f32_s32(vacc4xCDEF); |
| 713 |
vout4xCDEF = vfmaq_f32(vout4xCDEF, vf4xCDEF, vfilter_output_scaleCDEF); |
| 714 |
float32x4_t vf4xGHIJ = vcvtq_f32_s32(vacc4xGHIJ); |
| 715 |
vout4xGHIJ = vfmaq_f32(vout4xGHIJ, vf4xGHIJ, vfilter_output_scaleGHIJ); |
| 716 |
float32x4_t vf4xKLMN = vcvtq_f32_s32(vacc4xKLMN); |
| 717 |
vout4xKLMN = vfmaq_f32(vout4xKLMN, vf4xKLMN, vfilter_output_scaleKLMN); |
| 718 |
float32x4_t vf4xOPQR = vcvtq_f32_s32(vacc4xOPQR); |
| 719 |
vout4xOPQR = vfmaq_f32(vout4xOPQR, vf4xOPQR, vfilter_output_scaleOPQR); |
| 720 |
float32x4_t vf4xSTUV = vcvtq_f32_s32(vacc4xSTUV); |
| 721 |
vout4xSTUV = vfmaq_f32(vout4xSTUV, vf4xSTUV, vfilter_output_scaleSTUV); |
| 722 |
float32x4_t vf5x0123 = vcvtq_f32_s32(vacc5x0123); |
| 723 |
vout5x0123 = vfmaq_f32(vout5x0123, vf5x0123, vfilter_output_scale0123); |
| 724 |
float32x4_t vf5x4567 = vcvtq_f32_s32(vacc5x4567); |
| 725 |
vout5x4567 = vfmaq_f32(vout5x4567, vf5x4567, vfilter_output_scale4567); |
| 726 |
float32x4_t vf5x89AB = vcvtq_f32_s32(vacc5x89AB); |
| 727 |
vout5x89AB = vfmaq_f32(vout5x89AB, vf5x89AB, vfilter_output_scale89AB); |
| 728 |
float32x4_t vf5xCDEF = vcvtq_f32_s32(vacc5xCDEF); |
| 729 |
vout5xCDEF = vfmaq_f32(vout5xCDEF, vf5xCDEF, vfilter_output_scaleCDEF); |
| 730 |
float32x4_t vf5xGHIJ = vcvtq_f32_s32(vacc5xGHIJ); |
| 731 |
vout5xGHIJ = vfmaq_f32(vout5xGHIJ, vf5xGHIJ, vfilter_output_scaleGHIJ); |
| 732 |
float32x4_t vf5xKLMN = vcvtq_f32_s32(vacc5xKLMN); |
| 733 |
vout5xKLMN = vfmaq_f32(vout5xKLMN, vf5xKLMN, vfilter_output_scaleKLMN); |
| 734 |
float32x4_t vf5xOPQR = vcvtq_f32_s32(vacc5xOPQR); |
| 735 |
vout5xOPQR = vfmaq_f32(vout5xOPQR, vf5xOPQR, vfilter_output_scaleOPQR); |
| 736 |
float32x4_t vf5xSTUV = vcvtq_f32_s32(vacc5xSTUV); |
| 737 |
vout5xSTUV = vfmaq_f32(vout5xSTUV, vf5xSTUV, vfilter_output_scaleSTUV); |
| 738 |
float32x4_t vf6x0123 = vcvtq_f32_s32(vacc6x0123); |
| 739 |
vout6x0123 = vfmaq_f32(vout6x0123, vf6x0123, vfilter_output_scale0123); |
| 740 |
float32x4_t vf6x4567 = vcvtq_f32_s32(vacc6x4567); |
| 741 |
vout6x4567 = vfmaq_f32(vout6x4567, vf6x4567, vfilter_output_scale4567); |
| 742 |
float32x4_t vf6x89AB = vcvtq_f32_s32(vacc6x89AB); |
| 743 |
vout6x89AB = vfmaq_f32(vout6x89AB, vf6x89AB, vfilter_output_scale89AB); |
| 744 |
float32x4_t vf6xCDEF = vcvtq_f32_s32(vacc6xCDEF); |
| 745 |
vout6xCDEF = vfmaq_f32(vout6xCDEF, vf6xCDEF, vfilter_output_scaleCDEF); |
| 746 |
float32x4_t vf6xGHIJ = vcvtq_f32_s32(vacc6xGHIJ); |
| 747 |
vout6xGHIJ = vfmaq_f32(vout6xGHIJ, vf6xGHIJ, vfilter_output_scaleGHIJ); |
| 748 |
float32x4_t vf6xKLMN = vcvtq_f32_s32(vacc6xKLMN); |
| 749 |
vout6xKLMN = vfmaq_f32(vout6xKLMN, vf6xKLMN, vfilter_output_scaleKLMN); |
| 750 |
float32x4_t vf6xOPQR = vcvtq_f32_s32(vacc6xOPQR); |
| 751 |
vout6xOPQR = vfmaq_f32(vout6xOPQR, vf6xOPQR, vfilter_output_scaleOPQR); |
| 752 |
float32x4_t vf6xSTUV = vcvtq_f32_s32(vacc6xSTUV); |
| 753 |
vout6xSTUV = vfmaq_f32(vout6xSTUV, vf6xSTUV, vfilter_output_scaleSTUV); |
| 754 |
float32x4_t vf7x0123 = vcvtq_f32_s32(vacc7x0123); |
| 755 |
vout7x0123 = vfmaq_f32(vout7x0123, vf7x0123, vfilter_output_scale0123); |
| 756 |
float32x4_t vf7x4567 = vcvtq_f32_s32(vacc7x4567); |
| 757 |
vout7x4567 = vfmaq_f32(vout7x4567, vf7x4567, vfilter_output_scale4567); |
| 758 |
float32x4_t vf7x89AB = vcvtq_f32_s32(vacc7x89AB); |
| 759 |
vout7x89AB = vfmaq_f32(vout7x89AB, vf7x89AB, vfilter_output_scale89AB); |
| 760 |
float32x4_t vf7xCDEF = vcvtq_f32_s32(vacc7xCDEF); |
| 761 |
vout7xCDEF = vfmaq_f32(vout7xCDEF, vf7xCDEF, vfilter_output_scaleCDEF); |
| 762 |
float32x4_t vf7xGHIJ = vcvtq_f32_s32(vacc7xGHIJ); |
| 763 |
vout7xGHIJ = vfmaq_f32(vout7xGHIJ, vf7xGHIJ, vfilter_output_scaleGHIJ); |
| 764 |
float32x4_t vf7xKLMN = vcvtq_f32_s32(vacc7xKLMN); |
| 765 |
vout7xKLMN = vfmaq_f32(vout7xKLMN, vf7xKLMN, vfilter_output_scaleKLMN); |
| 766 |
float32x4_t vf7xOPQR = vcvtq_f32_s32(vacc7xOPQR); |
| 767 |
vout7xOPQR = vfmaq_f32(vout7xOPQR, vf7xOPQR, vfilter_output_scaleOPQR); |
| 768 |
float32x4_t vf7xSTUV = vcvtq_f32_s32(vacc7xSTUV); |
| 769 |
vout7xSTUV = vfmaq_f32(vout7xSTUV, vf7xSTUV, vfilter_output_scaleSTUV); |
| 770 |
} |
| 771 |
|
| 772 |
const float32x4_t vinput_scale01 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[0].zero_point)); |
| 773 |
vout0x0123 = vmulq_lane_f32(vout0x0123, vget_low_f32(vinput_scale01), 1); |
| 774 |
vout1x0123 = vmulq_lane_f32(vout1x0123, vget_high_f32(vinput_scale01), 1); |
| 775 |
vout0x4567 = vmulq_lane_f32(vout0x4567, vget_low_f32(vinput_scale01), 1); |
| 776 |
vout1x4567 = vmulq_lane_f32(vout1x4567, vget_high_f32(vinput_scale01), 1); |
| 777 |
vout0x89AB = vmulq_lane_f32(vout0x89AB, vget_low_f32(vinput_scale01), 1); |
| 778 |
vout1x89AB = vmulq_lane_f32(vout1x89AB, vget_high_f32(vinput_scale01), 1); |
| 779 |
vout0xCDEF = vmulq_lane_f32(vout0xCDEF, vget_low_f32(vinput_scale01), 1); |
| 780 |
vout1xCDEF = vmulq_lane_f32(vout1xCDEF, vget_high_f32(vinput_scale01), 1); |
| 781 |
vout0xGHIJ = vmulq_lane_f32(vout0xGHIJ, vget_low_f32(vinput_scale01), 1); |
| 782 |
vout1xGHIJ = vmulq_lane_f32(vout1xGHIJ, vget_high_f32(vinput_scale01), 1); |
| 783 |
vout0xKLMN = vmulq_lane_f32(vout0xKLMN, vget_low_f32(vinput_scale01), 1); |
| 784 |
vout1xKLMN = vmulq_lane_f32(vout1xKLMN, vget_high_f32(vinput_scale01), 1); |
| 785 |
vout0xOPQR = vmulq_lane_f32(vout0xOPQR, vget_low_f32(vinput_scale01), 1); |
| 786 |
vout1xOPQR = vmulq_lane_f32(vout1xOPQR, vget_high_f32(vinput_scale01), 1); |
| 787 |
vout0xSTUV = vmulq_lane_f32(vout0xSTUV, vget_low_f32(vinput_scale01), 1); |
| 788 |
vout1xSTUV = vmulq_lane_f32(vout1xSTUV, vget_high_f32(vinput_scale01), 1); |
| 789 |
const float32x4_t vinput_scale23 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[2].zero_point)); |
| 790 |
vout2x0123 = vmulq_lane_f32(vout2x0123, vget_low_f32(vinput_scale23), 1); |
| 791 |
vout3x0123 = vmulq_lane_f32(vout3x0123, vget_high_f32(vinput_scale23), 1); |
| 792 |
vout2x4567 = vmulq_lane_f32(vout2x4567, vget_low_f32(vinput_scale23), 1); |
| 793 |
vout3x4567 = vmulq_lane_f32(vout3x4567, vget_high_f32(vinput_scale23), 1); |
| 794 |
vout2x89AB = vmulq_lane_f32(vout2x89AB, vget_low_f32(vinput_scale23), 1); |
| 795 |
vout3x89AB = vmulq_lane_f32(vout3x89AB, vget_high_f32(vinput_scale23), 1); |
| 796 |
vout2xCDEF = vmulq_lane_f32(vout2xCDEF, vget_low_f32(vinput_scale23), 1); |
| 797 |
vout3xCDEF = vmulq_lane_f32(vout3xCDEF, vget_high_f32(vinput_scale23), 1); |
| 798 |
vout2xGHIJ = vmulq_lane_f32(vout2xGHIJ, vget_low_f32(vinput_scale23), 1); |
| 799 |
vout3xGHIJ = vmulq_lane_f32(vout3xGHIJ, vget_high_f32(vinput_scale23), 1); |
| 800 |
vout2xKLMN = vmulq_lane_f32(vout2xKLMN, vget_low_f32(vinput_scale23), 1); |
| 801 |
vout3xKLMN = vmulq_lane_f32(vout3xKLMN, vget_high_f32(vinput_scale23), 1); |
| 802 |
vout2xOPQR = vmulq_lane_f32(vout2xOPQR, vget_low_f32(vinput_scale23), 1); |
| 803 |
vout3xOPQR = vmulq_lane_f32(vout3xOPQR, vget_high_f32(vinput_scale23), 1); |
| 804 |
vout2xSTUV = vmulq_lane_f32(vout2xSTUV, vget_low_f32(vinput_scale23), 1); |
| 805 |
vout3xSTUV = vmulq_lane_f32(vout3xSTUV, vget_high_f32(vinput_scale23), 1); |
| 806 |
const float32x4_t vinput_scale45 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[4].zero_point)); |
| 807 |
vout4x0123 = vmulq_lane_f32(vout4x0123, vget_low_f32(vinput_scale45), 1); |
| 808 |
vout5x0123 = vmulq_lane_f32(vout5x0123, vget_high_f32(vinput_scale45), 1); |
| 809 |
vout4x4567 = vmulq_lane_f32(vout4x4567, vget_low_f32(vinput_scale45), 1); |
| 810 |
vout5x4567 = vmulq_lane_f32(vout5x4567, vget_high_f32(vinput_scale45), 1); |
| 811 |
vout4x89AB = vmulq_lane_f32(vout4x89AB, vget_low_f32(vinput_scale45), 1); |
| 812 |
vout5x89AB = vmulq_lane_f32(vout5x89AB, vget_high_f32(vinput_scale45), 1); |
| 813 |
vout4xCDEF = vmulq_lane_f32(vout4xCDEF, vget_low_f32(vinput_scale45), 1); |
| 814 |
vout5xCDEF = vmulq_lane_f32(vout5xCDEF, vget_high_f32(vinput_scale45), 1); |
| 815 |
vout4xGHIJ = vmulq_lane_f32(vout4xGHIJ, vget_low_f32(vinput_scale45), 1); |
| 816 |
vout5xGHIJ = vmulq_lane_f32(vout5xGHIJ, vget_high_f32(vinput_scale45), 1); |
| 817 |
vout4xKLMN = vmulq_lane_f32(vout4xKLMN, vget_low_f32(vinput_scale45), 1); |
| 818 |
vout5xKLMN = vmulq_lane_f32(vout5xKLMN, vget_high_f32(vinput_scale45), 1); |
| 819 |
vout4xOPQR = vmulq_lane_f32(vout4xOPQR, vget_low_f32(vinput_scale45), 1); |
| 820 |
vout5xOPQR = vmulq_lane_f32(vout5xOPQR, vget_high_f32(vinput_scale45), 1); |
| 821 |
vout4xSTUV = vmulq_lane_f32(vout4xSTUV, vget_low_f32(vinput_scale45), 1); |
| 822 |
vout5xSTUV = vmulq_lane_f32(vout5xSTUV, vget_high_f32(vinput_scale45), 1); |
| 823 |
const float32x4_t vinput_scale67 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[6].zero_point)); |
| 824 |
vout6x0123 = vmulq_lane_f32(vout6x0123, vget_low_f32(vinput_scale67), 1); |
| 825 |
vout7x0123 = vmulq_lane_f32(vout7x0123, vget_high_f32(vinput_scale67), 1); |
| 826 |
vout6x4567 = vmulq_lane_f32(vout6x4567, vget_low_f32(vinput_scale67), 1); |
| 827 |
vout7x4567 = vmulq_lane_f32(vout7x4567, vget_high_f32(vinput_scale67), 1); |
| 828 |
vout6x89AB = vmulq_lane_f32(vout6x89AB, vget_low_f32(vinput_scale67), 1); |
| 829 |
vout7x89AB = vmulq_lane_f32(vout7x89AB, vget_high_f32(vinput_scale67), 1); |
| 830 |
vout6xCDEF = vmulq_lane_f32(vout6xCDEF, vget_low_f32(vinput_scale67), 1); |
| 831 |
vout7xCDEF = vmulq_lane_f32(vout7xCDEF, vget_high_f32(vinput_scale67), 1); |
| 832 |
vout6xGHIJ = vmulq_lane_f32(vout6xGHIJ, vget_low_f32(vinput_scale67), 1); |
| 833 |
vout7xGHIJ = vmulq_lane_f32(vout7xGHIJ, vget_high_f32(vinput_scale67), 1); |
| 834 |
vout6xKLMN = vmulq_lane_f32(vout6xKLMN, vget_low_f32(vinput_scale67), 1); |
| 835 |
vout7xKLMN = vmulq_lane_f32(vout7xKLMN, vget_high_f32(vinput_scale67), 1); |
| 836 |
vout6xOPQR = vmulq_lane_f32(vout6xOPQR, vget_low_f32(vinput_scale67), 1); |
| 837 |
vout7xOPQR = vmulq_lane_f32(vout7xOPQR, vget_high_f32(vinput_scale67), 1); |
| 838 |
vout6xSTUV = vmulq_lane_f32(vout6xSTUV, vget_low_f32(vinput_scale67), 1); |
| 839 |
vout7xSTUV = vmulq_lane_f32(vout7xSTUV, vget_high_f32(vinput_scale67), 1); |
| 840 |
|
| 841 |
|
| 842 |
const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4; |
| 843 |
vout0x0123 = vaddq_f32(vbias0123, vout0x0123); |
| 844 |
vout1x0123 = vaddq_f32(vbias0123, vout1x0123); |
| 845 |
vout2x0123 = vaddq_f32(vbias0123, vout2x0123); |
| 846 |
vout3x0123 = vaddq_f32(vbias0123, vout3x0123); |
| 847 |
vout4x0123 = vaddq_f32(vbias0123, vout4x0123); |
| 848 |
vout5x0123 = vaddq_f32(vbias0123, vout5x0123); |
| 849 |
vout6x0123 = vaddq_f32(vbias0123, vout6x0123); |
| 850 |
vout7x0123 = vaddq_f32(vbias0123, vout7x0123); |
| 851 |
const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4; |
| 852 |
vout0x4567 = vaddq_f32(vbias4567, vout0x4567); |
| 853 |
vout1x4567 = vaddq_f32(vbias4567, vout1x4567); |
| 854 |
vout2x4567 = vaddq_f32(vbias4567, vout2x4567); |
| 855 |
vout3x4567 = vaddq_f32(vbias4567, vout3x4567); |
| 856 |
vout4x4567 = vaddq_f32(vbias4567, vout4x4567); |
| 857 |
vout5x4567 = vaddq_f32(vbias4567, vout5x4567); |
| 858 |
vout6x4567 = vaddq_f32(vbias4567, vout6x4567); |
| 859 |
vout7x4567 = vaddq_f32(vbias4567, vout7x4567); |
| 860 |
const float32x4_t vbias89AB = vld1q_f32(w); w = (const float*) w + 4; |
| 861 |
vout0x89AB = vaddq_f32(vbias89AB, vout0x89AB); |
| 862 |
vout1x89AB = vaddq_f32(vbias89AB, vout1x89AB); |
| 863 |
vout2x89AB = vaddq_f32(vbias89AB, vout2x89AB); |
| 864 |
vout3x89AB = vaddq_f32(vbias89AB, vout3x89AB); |
| 865 |
vout4x89AB = vaddq_f32(vbias89AB, vout4x89AB); |
| 866 |
vout5x89AB = vaddq_f32(vbias89AB, vout5x89AB); |
| 867 |
vout6x89AB = vaddq_f32(vbias89AB, vout6x89AB); |
| 868 |
vout7x89AB = vaddq_f32(vbias89AB, vout7x89AB); |
| 869 |
const float32x4_t vbiasCDEF = vld1q_f32(w); w = (const float*) w + 4; |
| 870 |
vout0xCDEF = vaddq_f32(vbiasCDEF, vout0xCDEF); |
| 871 |
vout1xCDEF = vaddq_f32(vbiasCDEF, vout1xCDEF); |
| 872 |
vout2xCDEF = vaddq_f32(vbiasCDEF, vout2xCDEF); |
| 873 |
vout3xCDEF = vaddq_f32(vbiasCDEF, vout3xCDEF); |
| 874 |
vout4xCDEF = vaddq_f32(vbiasCDEF, vout4xCDEF); |
| 875 |
vout5xCDEF = vaddq_f32(vbiasCDEF, vout5xCDEF); |
| 876 |
vout6xCDEF = vaddq_f32(vbiasCDEF, vout6xCDEF); |
| 877 |
vout7xCDEF = vaddq_f32(vbiasCDEF, vout7xCDEF); |
| 878 |
const float32x4_t vbiasGHIJ = vld1q_f32(w); w = (const float*) w + 4; |
| 879 |
vout0xGHIJ = vaddq_f32(vbiasGHIJ, vout0xGHIJ); |
| 880 |
vout1xGHIJ = vaddq_f32(vbiasGHIJ, vout1xGHIJ); |
| 881 |
vout2xGHIJ = vaddq_f32(vbiasGHIJ, vout2xGHIJ); |
| 882 |
vout3xGHIJ = vaddq_f32(vbiasGHIJ, vout3xGHIJ); |
| 883 |
vout4xGHIJ = vaddq_f32(vbiasGHIJ, vout4xGHIJ); |
| 884 |
vout5xGHIJ = vaddq_f32(vbiasGHIJ, vout5xGHIJ); |
| 885 |
vout6xGHIJ = vaddq_f32(vbiasGHIJ, vout6xGHIJ); |
| 886 |
vout7xGHIJ = vaddq_f32(vbiasGHIJ, vout7xGHIJ); |
| 887 |
const float32x4_t vbiasKLMN = vld1q_f32(w); w = (const float*) w + 4; |
| 888 |
vout0xKLMN = vaddq_f32(vbiasKLMN, vout0xKLMN); |
| 889 |
vout1xKLMN = vaddq_f32(vbiasKLMN, vout1xKLMN); |
| 890 |
vout2xKLMN = vaddq_f32(vbiasKLMN, vout2xKLMN); |
| 891 |
vout3xKLMN = vaddq_f32(vbiasKLMN, vout3xKLMN); |
| 892 |
vout4xKLMN = vaddq_f32(vbiasKLMN, vout4xKLMN); |
| 893 |
vout5xKLMN = vaddq_f32(vbiasKLMN, vout5xKLMN); |
| 894 |
vout6xKLMN = vaddq_f32(vbiasKLMN, vout6xKLMN); |
| 895 |
vout7xKLMN = vaddq_f32(vbiasKLMN, vout7xKLMN); |
| 896 |
const float32x4_t vbiasOPQR = vld1q_f32(w); w = (const float*) w + 4; |
| 897 |
vout0xOPQR = vaddq_f32(vbiasOPQR, vout0xOPQR); |
| 898 |
vout1xOPQR = vaddq_f32(vbiasOPQR, vout1xOPQR); |
| 899 |
vout2xOPQR = vaddq_f32(vbiasOPQR, vout2xOPQR); |
| 900 |
vout3xOPQR = vaddq_f32(vbiasOPQR, vout3xOPQR); |
| 901 |
vout4xOPQR = vaddq_f32(vbiasOPQR, vout4xOPQR); |
| 902 |
vout5xOPQR = vaddq_f32(vbiasOPQR, vout5xOPQR); |
| 903 |
vout6xOPQR = vaddq_f32(vbiasOPQR, vout6xOPQR); |
| 904 |
vout7xOPQR = vaddq_f32(vbiasOPQR, vout7xOPQR); |
| 905 |
const float32x4_t vbiasSTUV = vld1q_f32(w); w = (const float*) w + 4; |
| 906 |
vout0xSTUV = vaddq_f32(vbiasSTUV, vout0xSTUV); |
| 907 |
vout1xSTUV = vaddq_f32(vbiasSTUV, vout1xSTUV); |
| 908 |
vout2xSTUV = vaddq_f32(vbiasSTUV, vout2xSTUV); |
| 909 |
vout3xSTUV = vaddq_f32(vbiasSTUV, vout3xSTUV); |
| 910 |
vout4xSTUV = vaddq_f32(vbiasSTUV, vout4xSTUV); |
| 911 |
vout5xSTUV = vaddq_f32(vbiasSTUV, vout5xSTUV); |
| 912 |
vout6xSTUV = vaddq_f32(vbiasSTUV, vout6xSTUV); |
| 913 |
vout7xSTUV = vaddq_f32(vbiasSTUV, vout7xSTUV); |
| 914 |
|
| 915 |
const float32x4_t voutput_min = vld1q_dup_f32(¶ms->scalar.min); |
| 916 |
vout0x0123 = vmaxq_f32(vout0x0123, voutput_min); |
| 917 |
vout0x4567 = vmaxq_f32(vout0x4567, voutput_min); |
| 918 |
vout0x89AB = vmaxq_f32(vout0x89AB, voutput_min); |
| 919 |
vout0xCDEF = vmaxq_f32(vout0xCDEF, voutput_min); |
| 920 |
vout0xGHIJ = vmaxq_f32(vout0xGHIJ, voutput_min); |
| 921 |
vout0xKLMN = vmaxq_f32(vout0xKLMN, voutput_min); |
| 922 |
vout0xOPQR = vmaxq_f32(vout0xOPQR, voutput_min); |
| 923 |
vout0xSTUV = vmaxq_f32(vout0xSTUV, voutput_min); |
| 924 |
vout1x0123 = vmaxq_f32(vout1x0123, voutput_min); |
| 925 |
vout1x4567 = vmaxq_f32(vout1x4567, voutput_min); |
| 926 |
vout1x89AB = vmaxq_f32(vout1x89AB, voutput_min); |
| 927 |
vout1xCDEF = vmaxq_f32(vout1xCDEF, voutput_min); |
| 928 |
vout1xGHIJ = vmaxq_f32(vout1xGHIJ, voutput_min); |
| 929 |
vout1xKLMN = vmaxq_f32(vout1xKLMN, voutput_min); |
| 930 |
vout1xOPQR = vmaxq_f32(vout1xOPQR, voutput_min); |
| 931 |
vout1xSTUV = vmaxq_f32(vout1xSTUV, voutput_min); |
| 932 |
vout2x0123 = vmaxq_f32(vout2x0123, voutput_min); |
| 933 |
vout2x4567 = vmaxq_f32(vout2x4567, voutput_min); |
| 934 |
vout2x89AB = vmaxq_f32(vout2x89AB, voutput_min); |
| 935 |
vout2xCDEF = vmaxq_f32(vout2xCDEF, voutput_min); |
| 936 |
vout2xGHIJ = vmaxq_f32(vout2xGHIJ, voutput_min); |
| 937 |
vout2xKLMN = vmaxq_f32(vout2xKLMN, voutput_min); |
| 938 |
vout2xOPQR = vmaxq_f32(vout2xOPQR, voutput_min); |
| 939 |
vout2xSTUV = vmaxq_f32(vout2xSTUV, voutput_min); |
| 940 |
vout3x0123 = vmaxq_f32(vout3x0123, voutput_min); |
| 941 |
vout3x4567 = vmaxq_f32(vout3x4567, voutput_min); |
| 942 |
vout3x89AB = vmaxq_f32(vout3x89AB, voutput_min); |
| 943 |
vout3xCDEF = vmaxq_f32(vout3xCDEF, voutput_min); |
| 944 |
vout3xGHIJ = vmaxq_f32(vout3xGHIJ, voutput_min); |
| 945 |
vout3xKLMN = vmaxq_f32(vout3xKLMN, voutput_min); |
| 946 |
vout3xOPQR = vmaxq_f32(vout3xOPQR, voutput_min); |
| 947 |
vout3xSTUV = vmaxq_f32(vout3xSTUV, voutput_min); |
| 948 |
vout4x0123 = vmaxq_f32(vout4x0123, voutput_min); |
| 949 |
vout4x4567 = vmaxq_f32(vout4x4567, voutput_min); |
| 950 |
vout4x89AB = vmaxq_f32(vout4x89AB, voutput_min); |
| 951 |
vout4xCDEF = vmaxq_f32(vout4xCDEF, voutput_min); |
| 952 |
vout4xGHIJ = vmaxq_f32(vout4xGHIJ, voutput_min); |
| 953 |
vout4xKLMN = vmaxq_f32(vout4xKLMN, voutput_min); |
| 954 |
vout4xOPQR = vmaxq_f32(vout4xOPQR, voutput_min); |
| 955 |
vout4xSTUV = vmaxq_f32(vout4xSTUV, voutput_min); |
| 956 |
vout5x0123 = vmaxq_f32(vout5x0123, voutput_min); |
| 957 |
vout5x4567 = vmaxq_f32(vout5x4567, voutput_min); |
| 958 |
vout5x89AB = vmaxq_f32(vout5x89AB, voutput_min); |
| 959 |
vout5xCDEF = vmaxq_f32(vout5xCDEF, voutput_min); |
| 960 |
vout5xGHIJ = vmaxq_f32(vout5xGHIJ, voutput_min); |
| 961 |
vout5xKLMN = vmaxq_f32(vout5xKLMN, voutput_min); |
| 962 |
vout5xOPQR = vmaxq_f32(vout5xOPQR, voutput_min); |
| 963 |
vout5xSTUV = vmaxq_f32(vout5xSTUV, voutput_min); |
| 964 |
vout6x0123 = vmaxq_f32(vout6x0123, voutput_min); |
| 965 |
vout6x4567 = vmaxq_f32(vout6x4567, voutput_min); |
| 966 |
vout6x89AB = vmaxq_f32(vout6x89AB, voutput_min); |
| 967 |
vout6xCDEF = vmaxq_f32(vout6xCDEF, voutput_min); |
| 968 |
vout6xGHIJ = vmaxq_f32(vout6xGHIJ, voutput_min); |
| 969 |
vout6xKLMN = vmaxq_f32(vout6xKLMN, voutput_min); |
| 970 |
vout6xOPQR = vmaxq_f32(vout6xOPQR, voutput_min); |
| 971 |
vout6xSTUV = vmaxq_f32(vout6xSTUV, voutput_min); |
| 972 |
vout7x0123 = vmaxq_f32(vout7x0123, voutput_min); |
| 973 |
vout7x4567 = vmaxq_f32(vout7x4567, voutput_min); |
| 974 |
vout7x89AB = vmaxq_f32(vout7x89AB, voutput_min); |
| 975 |
vout7xCDEF = vmaxq_f32(vout7xCDEF, voutput_min); |
| 976 |
vout7xGHIJ = vmaxq_f32(vout7xGHIJ, voutput_min); |
| 977 |
vout7xKLMN = vmaxq_f32(vout7xKLMN, voutput_min); |
| 978 |
vout7xOPQR = vmaxq_f32(vout7xOPQR, voutput_min); |
| 979 |
vout7xSTUV = vmaxq_f32(vout7xSTUV, voutput_min); |
| 980 |
|
| 981 |
const float32x4_t voutput_max = vld1q_dup_f32(¶ms->scalar.max); |
| 982 |
vout0x0123 = vminq_f32(vout0x0123, voutput_max); |
| 983 |
vout0x4567 = vminq_f32(vout0x4567, voutput_max); |
| 984 |
vout0x89AB = vminq_f32(vout0x89AB, voutput_max); |
| 985 |
vout0xCDEF = vminq_f32(vout0xCDEF, voutput_max); |
| 986 |
vout0xGHIJ = vminq_f32(vout0xGHIJ, voutput_max); |
| 987 |
vout0xKLMN = vminq_f32(vout0xKLMN, voutput_max); |
| 988 |
vout0xOPQR = vminq_f32(vout0xOPQR, voutput_max); |
| 989 |
vout0xSTUV = vminq_f32(vout0xSTUV, voutput_max); |
| 990 |
vout1x0123 = vminq_f32(vout1x0123, voutput_max); |
| 991 |
vout1x4567 = vminq_f32(vout1x4567, voutput_max); |
| 992 |
vout1x89AB = vminq_f32(vout1x89AB, voutput_max); |
| 993 |
vout1xCDEF = vminq_f32(vout1xCDEF, voutput_max); |
| 994 |
vout1xGHIJ = vminq_f32(vout1xGHIJ, voutput_max); |
| 995 |
vout1xKLMN = vminq_f32(vout1xKLMN, voutput_max); |
| 996 |
vout1xOPQR = vminq_f32(vout1xOPQR, voutput_max); |
| 997 |
vout1xSTUV = vminq_f32(vout1xSTUV, voutput_max); |
| 998 |
vout2x0123 = vminq_f32(vout2x0123, voutput_max); |
| 999 |
vout2x4567 = vminq_f32(vout2x4567, voutput_max); |
| 1000 |
vout2x89AB = vminq_f32(vout2x89AB, voutput_max); |
| 1001 |
vout2xCDEF = vminq_f32(vout2xCDEF, voutput_max); |
| 1002 |
vout2xGHIJ = vminq_f32(vout2xGHIJ, voutput_max); |
| 1003 |
vout2xKLMN = vminq_f32(vout2xKLMN, voutput_max); |
| 1004 |
vout2xOPQR = vminq_f32(vout2xOPQR, voutput_max); |
| 1005 |
vout2xSTUV = vminq_f32(vout2xSTUV, voutput_max); |
| 1006 |
vout3x0123 = vminq_f32(vout3x0123, voutput_max); |
| 1007 |
vout3x4567 = vminq_f32(vout3x4567, voutput_max); |
| 1008 |
vout3x89AB = vminq_f32(vout3x89AB, voutput_max); |
| 1009 |
vout3xCDEF = vminq_f32(vout3xCDEF, voutput_max); |
| 1010 |
vout3xGHIJ = vminq_f32(vout3xGHIJ, voutput_max); |
| 1011 |
vout3xKLMN = vminq_f32(vout3xKLMN, voutput_max); |
| 1012 |
vout3xOPQR = vminq_f32(vout3xOPQR, voutput_max); |
| 1013 |
vout3xSTUV = vminq_f32(vout3xSTUV, voutput_max); |
| 1014 |
vout4x0123 = vminq_f32(vout4x0123, voutput_max); |
| 1015 |
vout4x4567 = vminq_f32(vout4x4567, voutput_max); |
| 1016 |
vout4x89AB = vminq_f32(vout4x89AB, voutput_max); |
| 1017 |
vout4xCDEF = vminq_f32(vout4xCDEF, voutput_max); |
| 1018 |
vout4xGHIJ = vminq_f32(vout4xGHIJ, voutput_max); |
| 1019 |
vout4xKLMN = vminq_f32(vout4xKLMN, voutput_max); |
| 1020 |
vout4xOPQR = vminq_f32(vout4xOPQR, voutput_max); |
| 1021 |
vout4xSTUV = vminq_f32(vout4xSTUV, voutput_max); |
| 1022 |
vout5x0123 = vminq_f32(vout5x0123, voutput_max); |
| 1023 |
vout5x4567 = vminq_f32(vout5x4567, voutput_max); |
| 1024 |
vout5x89AB = vminq_f32(vout5x89AB, voutput_max); |
| 1025 |
vout5xCDEF = vminq_f32(vout5xCDEF, voutput_max); |
| 1026 |
vout5xGHIJ = vminq_f32(vout5xGHIJ, voutput_max); |
| 1027 |
vout5xKLMN = vminq_f32(vout5xKLMN, voutput_max); |
| 1028 |
vout5xOPQR = vminq_f32(vout5xOPQR, voutput_max); |
| 1029 |
vout5xSTUV = vminq_f32(vout5xSTUV, voutput_max); |
| 1030 |
vout6x0123 = vminq_f32(vout6x0123, voutput_max); |
| 1031 |
vout6x4567 = vminq_f32(vout6x4567, voutput_max); |
| 1032 |
vout6x89AB = vminq_f32(vout6x89AB, voutput_max); |
| 1033 |
vout6xCDEF = vminq_f32(vout6xCDEF, voutput_max); |
| 1034 |
vout6xGHIJ = vminq_f32(vout6xGHIJ, voutput_max); |
| 1035 |
vout6xKLMN = vminq_f32(vout6xKLMN, voutput_max); |
| 1036 |
vout6xOPQR = vminq_f32(vout6xOPQR, voutput_max); |
| 1037 |
vout6xSTUV = vminq_f32(vout6xSTUV, voutput_max); |
| 1038 |
vout7x0123 = vminq_f32(vout7x0123, voutput_max); |
| 1039 |
vout7x4567 = vminq_f32(vout7x4567, voutput_max); |
| 1040 |
vout7x89AB = vminq_f32(vout7x89AB, voutput_max); |
| 1041 |
vout7xCDEF = vminq_f32(vout7xCDEF, voutput_max); |
| 1042 |
vout7xGHIJ = vminq_f32(vout7xGHIJ, voutput_max); |
| 1043 |
vout7xKLMN = vminq_f32(vout7xKLMN, voutput_max); |
| 1044 |
vout7xOPQR = vminq_f32(vout7xOPQR, voutput_max); |
| 1045 |
vout7xSTUV = vminq_f32(vout7xSTUV, voutput_max); |
| 1046 |
|
| 1047 |
if XNN_LIKELY(nc >= 32) { |
| 1048 |
vst1q_f32(c0, vout0x0123); |
| 1049 |
vst1q_f32(c0 + 4, vout0x4567); |
| 1050 |
vst1q_f32(c0 + 8, vout0x89AB); |
| 1051 |
vst1q_f32(c0 + 12, vout0xCDEF); |
| 1052 |
vst1q_f32(c0 + 16, vout0xGHIJ); |
| 1053 |
vst1q_f32(c0 + 20, vout0xKLMN); |
| 1054 |
vst1q_f32(c0 + 24, vout0xOPQR); |
| 1055 |
vst1q_f32(c0 + 28, vout0xSTUV); |
| 1056 |
vst1q_f32(c1, vout1x0123); |
| 1057 |
vst1q_f32(c1 + 4, vout1x4567); |
| 1058 |
vst1q_f32(c1 + 8, vout1x89AB); |
| 1059 |
vst1q_f32(c1 + 12, vout1xCDEF); |
| 1060 |
vst1q_f32(c1 + 16, vout1xGHIJ); |
| 1061 |
vst1q_f32(c1 + 20, vout1xKLMN); |
| 1062 |
vst1q_f32(c1 + 24, vout1xOPQR); |
| 1063 |
vst1q_f32(c1 + 28, vout1xSTUV); |
| 1064 |
vst1q_f32(c2, vout2x0123); |
| 1065 |
vst1q_f32(c2 + 4, vout2x4567); |
| 1066 |
vst1q_f32(c2 + 8, vout2x89AB); |
| 1067 |
vst1q_f32(c2 + 12, vout2xCDEF); |
| 1068 |
vst1q_f32(c2 + 16, vout2xGHIJ); |
| 1069 |
vst1q_f32(c2 + 20, vout2xKLMN); |
| 1070 |
vst1q_f32(c2 + 24, vout2xOPQR); |
| 1071 |
vst1q_f32(c2 + 28, vout2xSTUV); |
| 1072 |
vst1q_f32(c3, vout3x0123); |
| 1073 |
vst1q_f32(c3 + 4, vout3x4567); |
| 1074 |
vst1q_f32(c3 + 8, vout3x89AB); |
| 1075 |
vst1q_f32(c3 + 12, vout3xCDEF); |
| 1076 |
vst1q_f32(c3 + 16, vout3xGHIJ); |
| 1077 |
vst1q_f32(c3 + 20, vout3xKLMN); |
| 1078 |
vst1q_f32(c3 + 24, vout3xOPQR); |
| 1079 |
vst1q_f32(c3 + 28, vout3xSTUV); |
| 1080 |
vst1q_f32(c4, vout4x0123); |
| 1081 |
vst1q_f32(c4 + 4, vout4x4567); |
| 1082 |
vst1q_f32(c4 + 8, vout4x89AB); |
| 1083 |
vst1q_f32(c4 + 12, vout4xCDEF); |
| 1084 |
vst1q_f32(c4 + 16, vout4xGHIJ); |
| 1085 |
vst1q_f32(c4 + 20, vout4xKLMN); |
| 1086 |
vst1q_f32(c4 + 24, vout4xOPQR); |
| 1087 |
vst1q_f32(c4 + 28, vout4xSTUV); |
| 1088 |
vst1q_f32(c5, vout5x0123); |
| 1089 |
vst1q_f32(c5 + 4, vout5x4567); |
| 1090 |
vst1q_f32(c5 + 8, vout5x89AB); |
| 1091 |
vst1q_f32(c5 + 12, vout5xCDEF); |
| 1092 |
vst1q_f32(c5 + 16, vout5xGHIJ); |
| 1093 |
vst1q_f32(c5 + 20, vout5xKLMN); |
| 1094 |
vst1q_f32(c5 + 24, vout5xOPQR); |
| 1095 |
vst1q_f32(c5 + 28, vout5xSTUV); |
| 1096 |
vst1q_f32(c6, vout6x0123); |
| 1097 |
vst1q_f32(c6 + 4, vout6x4567); |
| 1098 |
vst1q_f32(c6 + 8, vout6x89AB); |
| 1099 |
vst1q_f32(c6 + 12, vout6xCDEF); |
| 1100 |
vst1q_f32(c6 + 16, vout6xGHIJ); |
| 1101 |
vst1q_f32(c6 + 20, vout6xKLMN); |
| 1102 |
vst1q_f32(c6 + 24, vout6xOPQR); |
| 1103 |
vst1q_f32(c6 + 28, vout6xSTUV); |
| 1104 |
vst1q_f32(c7, vout7x0123); |
| 1105 |
vst1q_f32(c7 + 4, vout7x4567); |
| 1106 |
vst1q_f32(c7 + 8, vout7x89AB); |
| 1107 |
vst1q_f32(c7 + 12, vout7xCDEF); |
| 1108 |
vst1q_f32(c7 + 16, vout7xGHIJ); |
| 1109 |
vst1q_f32(c7 + 20, vout7xKLMN); |
| 1110 |
vst1q_f32(c7 + 24, vout7xOPQR); |
| 1111 |
vst1q_f32(c7 + 28, vout7xSTUV); |
| 1112 |
|
| 1113 |
a0 = (const int8_t*) ((uintptr_t) a0 - kc); |
| 1114 |
a1 = (const int8_t*) ((uintptr_t) a1 - kc); |
| 1115 |
a2 = (const int8_t*) ((uintptr_t) a2 - kc); |
| 1116 |
a3 = (const int8_t*) ((uintptr_t) a3 - kc); |
| 1117 |
a4 = (const int8_t*) ((uintptr_t) a4 - kc); |
| 1118 |
a5 = (const int8_t*) ((uintptr_t) a5 - kc); |
| 1119 |
a6 = (const int8_t*) ((uintptr_t) a6 - kc); |
| 1120 |
a7 = (const int8_t*) ((uintptr_t) a7 - kc); |
| 1121 |
|
| 1122 |
c0 = (float*) ((uintptr_t) c0 + cn_stride); |
| 1123 |
c1 = (float*) ((uintptr_t) c1 + cn_stride); |
| 1124 |
c2 = (float*) ((uintptr_t) c2 + cn_stride); |
| 1125 |
c3 = (float*) ((uintptr_t) c3 + cn_stride); |
| 1126 |
c4 = (float*) ((uintptr_t) c4 + cn_stride); |
| 1127 |
c5 = (float*) ((uintptr_t) c5 + cn_stride); |
| 1128 |
c6 = (float*) ((uintptr_t) c6 + cn_stride); |
| 1129 |
c7 = (float*) ((uintptr_t) c7 + cn_stride); |
| 1130 |
|
| 1131 |
nc -= 32; |
| 1132 |
} else { |
| 1133 |
if (nc & 16) { |
| 1134 |
vst1q_f32(c0, vout0x0123); c0 += 4; |
| 1135 |
vout0x0123 = vout0xGHIJ; |
| 1136 |
vst1q_f32(c1, vout1x0123); c1 += 4; |
| 1137 |
vout1x0123 = vout1xGHIJ; |
| 1138 |
vst1q_f32(c2, vout2x0123); c2 += 4; |
| 1139 |
vout2x0123 = vout2xGHIJ; |
| 1140 |
vst1q_f32(c3, vout3x0123); c3 += 4; |
| 1141 |
vout3x0123 = vout3xGHIJ; |
| 1142 |
vst1q_f32(c4, vout4x0123); c4 += 4; |
| 1143 |
vout4x0123 = vout4xGHIJ; |
| 1144 |
vst1q_f32(c5, vout5x0123); c5 += 4; |
| 1145 |
vout5x0123 = vout5xGHIJ; |
| 1146 |
vst1q_f32(c6, vout6x0123); c6 += 4; |
| 1147 |
vout6x0123 = vout6xGHIJ; |
| 1148 |
vst1q_f32(c7, vout7x0123); c7 += 4; |
| 1149 |
vout7x0123 = vout7xGHIJ; |
| 1150 |
vst1q_f32(c0, vout0x4567); c0 += 4; |
| 1151 |
vout0x4567 = vout0xKLMN; |
| 1152 |
vst1q_f32(c1, vout1x4567); c1 += 4; |
| 1153 |
vout1x4567 = vout1xKLMN; |
| 1154 |
vst1q_f32(c2, vout2x4567); c2 += 4; |
| 1155 |
vout2x4567 = vout2xKLMN; |
| 1156 |
vst1q_f32(c3, vout3x4567); c3 += 4; |
| 1157 |
vout3x4567 = vout3xKLMN; |
| 1158 |
vst1q_f32(c4, vout4x4567); c4 += 4; |
| 1159 |
vout4x4567 = vout4xKLMN; |
| 1160 |
vst1q_f32(c5, vout5x4567); c5 += 4; |
| 1161 |
vout5x4567 = vout5xKLMN; |
| 1162 |
vst1q_f32(c6, vout6x4567); c6 += 4; |
| 1163 |
vout6x4567 = vout6xKLMN; |
| 1164 |
vst1q_f32(c7, vout7x4567); c7 += 4; |
| 1165 |
vout7x4567 = vout7xKLMN; |
| 1166 |
vst1q_f32(c0, vout0x89AB); c0 += 4; |
| 1167 |
vout0x89AB = vout0xOPQR; |
| 1168 |
vst1q_f32(c1, vout1x89AB); c1 += 4; |
| 1169 |
vout1x89AB = vout1xOPQR; |
| 1170 |
vst1q_f32(c2, vout2x89AB); c2 += 4; |
| 1171 |
vout2x89AB = vout2xOPQR; |
| 1172 |
vst1q_f32(c3, vout3x89AB); c3 += 4; |
| 1173 |
vout3x89AB = vout3xOPQR; |
| 1174 |
vst1q_f32(c4, vout4x89AB); c4 += 4; |
| 1175 |
vout4x89AB = vout4xOPQR; |
| 1176 |
vst1q_f32(c5, vout5x89AB); c5 += 4; |
| 1177 |
vout5x89AB = vout5xOPQR; |
| 1178 |
vst1q_f32(c6, vout6x89AB); c6 += 4; |
| 1179 |
vout6x89AB = vout6xOPQR; |
| 1180 |
vst1q_f32(c7, vout7x89AB); c7 += 4; |
| 1181 |
vout7x89AB = vout7xOPQR; |
| 1182 |
vst1q_f32(c0, vout0xCDEF); c0 += 4; |
| 1183 |
vout0xCDEF = vout0xSTUV; |
| 1184 |
vst1q_f32(c1, vout1xCDEF); c1 += 4; |
| 1185 |
vout1xCDEF = vout1xSTUV; |
| 1186 |
vst1q_f32(c2, vout2xCDEF); c2 += 4; |
| 1187 |
vout2xCDEF = vout2xSTUV; |
| 1188 |
vst1q_f32(c3, vout3xCDEF); c3 += 4; |
| 1189 |
vout3xCDEF = vout3xSTUV; |
| 1190 |
vst1q_f32(c4, vout4xCDEF); c4 += 4; |
| 1191 |
vout4xCDEF = vout4xSTUV; |
| 1192 |
vst1q_f32(c5, vout5xCDEF); c5 += 4; |
| 1193 |
vout5xCDEF = vout5xSTUV; |
| 1194 |
vst1q_f32(c6, vout6xCDEF); c6 += 4; |
| 1195 |
vout6xCDEF = vout6xSTUV; |
| 1196 |
vst1q_f32(c7, vout7xCDEF); c7 += 4; |
| 1197 |
vout7xCDEF = vout7xSTUV; |
| 1198 |
} |
| 1199 |
if (nc & 8) { |
| 1200 |
vst1q_f32(c0, vout0x0123); c0 += 4; |
| 1201 |
vout0x0123 = vout0x89AB; |
| 1202 |
vst1q_f32(c1, vout1x0123); c1 += 4; |
| 1203 |
vout1x0123 = vout1x89AB; |
| 1204 |
vst1q_f32(c2, vout2x0123); c2 += 4; |
| 1205 |
vout2x0123 = vout2x89AB; |
| 1206 |
vst1q_f32(c3, vout3x0123); c3 += 4; |
| 1207 |
vout3x0123 = vout3x89AB; |
| 1208 |
vst1q_f32(c4, vout4x0123); c4 += 4; |
| 1209 |
vout4x0123 = vout4x89AB; |
| 1210 |
vst1q_f32(c5, vout5x0123); c5 += 4; |
| 1211 |
vout5x0123 = vout5x89AB; |
| 1212 |
vst1q_f32(c6, vout6x0123); c6 += 4; |
| 1213 |
vout6x0123 = vout6x89AB; |
| 1214 |
vst1q_f32(c7, vout7x0123); c7 += 4; |
| 1215 |
vout7x0123 = vout7x89AB; |
| 1216 |
vst1q_f32(c0, vout0x4567); c0 += 4; |
| 1217 |
vout0x4567 = vout0xCDEF; |
| 1218 |
vst1q_f32(c1, vout1x4567); c1 += 4; |
| 1219 |
vout1x4567 = vout1xCDEF; |
| 1220 |
vst1q_f32(c2, vout2x4567); c2 += 4; |
| 1221 |
vout2x4567 = vout2xCDEF; |
| 1222 |
vst1q_f32(c3, vout3x4567); c3 += 4; |
| 1223 |
vout3x4567 = vout3xCDEF; |
| 1224 |
vst1q_f32(c4, vout4x4567); c4 += 4; |
| 1225 |
vout4x4567 = vout4xCDEF; |
| 1226 |
vst1q_f32(c5, vout5x4567); c5 += 4; |
| 1227 |
vout5x4567 = vout5xCDEF; |
| 1228 |
vst1q_f32(c6, vout6x4567); c6 += 4; |
| 1229 |
vout6x4567 = vout6xCDEF; |
| 1230 |
vst1q_f32(c7, vout7x4567); c7 += 4; |
| 1231 |
vout7x4567 = vout7xCDEF; |
| 1232 |
} |
| 1233 |
if (nc & 4) { |
| 1234 |
vst1q_f32(c0, vout0x0123); c0 += 4; |
| 1235 |
vout0x0123 = vout0x4567; |
| 1236 |
vst1q_f32(c1, vout1x0123); c1 += 4; |
| 1237 |
vout1x0123 = vout1x4567; |
| 1238 |
vst1q_f32(c2, vout2x0123); c2 += 4; |
| 1239 |
vout2x0123 = vout2x4567; |
| 1240 |
vst1q_f32(c3, vout3x0123); c3 += 4; |
| 1241 |
vout3x0123 = vout3x4567; |
| 1242 |
vst1q_f32(c4, vout4x0123); c4 += 4; |
| 1243 |
vout4x0123 = vout4x4567; |
| 1244 |
vst1q_f32(c5, vout5x0123); c5 += 4; |
| 1245 |
vout5x0123 = vout5x4567; |
| 1246 |
vst1q_f32(c6, vout6x0123); c6 += 4; |
| 1247 |
vout6x0123 = vout6x4567; |
| 1248 |
vst1q_f32(c7, vout7x0123); c7 += 4; |
| 1249 |
vout7x0123 = vout7x4567; |
| 1250 |
} |
| 1251 |
float32x2_t vout0x01 = vget_low_f32(vout0x0123); |
| 1252 |
float32x2_t vout1x01 = vget_low_f32(vout1x0123); |
| 1253 |
float32x2_t vout2x01 = vget_low_f32(vout2x0123); |
| 1254 |
float32x2_t vout3x01 = vget_low_f32(vout3x0123); |
| 1255 |
float32x2_t vout4x01 = vget_low_f32(vout4x0123); |
| 1256 |
float32x2_t vout5x01 = vget_low_f32(vout5x0123); |
| 1257 |
float32x2_t vout6x01 = vget_low_f32(vout6x0123); |
| 1258 |
float32x2_t vout7x01 = vget_low_f32(vout7x0123); |
| 1259 |
if (nc & 2) { |
| 1260 |
vst1_f32(c0, vout0x01); c0 += 2; |
| 1261 |
vst1_f32(c1, vout1x01); c1 += 2; |
| 1262 |
vst1_f32(c2, vout2x01); c2 += 2; |
| 1263 |
vst1_f32(c3, vout3x01); c3 += 2; |
| 1264 |
vst1_f32(c4, vout4x01); c4 += 2; |
| 1265 |
vst1_f32(c5, vout5x01); c5 += 2; |
| 1266 |
vst1_f32(c6, vout6x01); c6 += 2; |
| 1267 |
vst1_f32(c7, vout7x01); c7 += 2; |
| 1268 |
vout0x01 = vget_high_f32(vout0x0123); |
| 1269 |
vout1x01 = vget_high_f32(vout1x0123); |
| 1270 |
vout2x01 = vget_high_f32(vout2x0123); |
| 1271 |
vout3x01 = vget_high_f32(vout3x0123); |
| 1272 |
vout4x01 = vget_high_f32(vout4x0123); |
| 1273 |
vout5x01 = vget_high_f32(vout5x0123); |
| 1274 |
vout6x01 = vget_high_f32(vout6x0123); |
| 1275 |
vout7x01 = vget_high_f32(vout7x0123); |
| 1276 |
} |
| 1277 |
if (nc & 1) { |
| 1278 |
vst1_lane_f32(c0, vout0x01, 0); |
| 1279 |
vst1_lane_f32(c1, vout1x01, 0); |
| 1280 |
vst1_lane_f32(c2, vout2x01, 0); |
| 1281 |
vst1_lane_f32(c3, vout3x01, 0); |
| 1282 |
vst1_lane_f32(c4, vout4x01, 0); |
| 1283 |
vst1_lane_f32(c5, vout5x01, 0); |
| 1284 |
vst1_lane_f32(c6, vout6x01, 0); |
| 1285 |
vst1_lane_f32(c7, vout7x01, 0); |
| 1286 |
} |
| 1287 |
nc = 0; |
| 1288 |
} |
| 1289 |
} while (nc != 0); |
| 1290 |
} |