/cmsis-nn-3.6.0-3.5.0/Source/ConvolutionFunctions/ |
D | arm_depthwise_conv_3x3_s8.c | 69 const int32_t input_ch = input_dims->c; in arm_depthwise_conv_3x3_s8() local 85 if (input_ch != output_ch) in arm_depthwise_conv_3x3_s8() 103 for (; in_ch <= (input_ch - 4); in_ch += 4) in arm_depthwise_conv_3x3_s8() 117 …const int8_t *input_ptr = input + (in_h + ker_h_start) * (input_ch * input_x) + in_w * input_ch + … in arm_depthwise_conv_3x3_s8() 118 const int8_t *kernel_ptr = kernel + ker_h_start * (input_ch * 3) + in_ch; in arm_depthwise_conv_3x3_s8() 145 in_val = arm_nn_read_s8x4(input_ptr + input_ch); in arm_depthwise_conv_3x3_s8() 146 ker_val = arm_nn_read_s8x4(kernel_ptr + input_ch); in arm_depthwise_conv_3x3_s8() 159 in_val = arm_nn_read_s8x4(input_ptr + (input_ch << 1)); in arm_depthwise_conv_3x3_s8() 160 ker_val = arm_nn_read_s8x4(kernel_ptr + (input_ch << 1)); in arm_depthwise_conv_3x3_s8() 172 input_ptr += (input_ch * input_x); in arm_depthwise_conv_3x3_s8() [all …]
|
D | arm_depthwise_conv_fast_s16.c | 63 const int32_t input_ch = input_dims->c; in arm_depthwise_conv_fast_s16() local 67 if (input_ch != output_ch) in arm_depthwise_conv_fast_s16() 120 memset(lhs_buffer, (int16_t)0, (uint32_t)(input_ch * sizeof(int16_t))); in arm_depthwise_conv_fast_s16() 125 … (int16_t *)(input + (i_ker_y * input_x + i_ker_x) * input_ch), in arm_depthwise_conv_fast_s16() 126 (uint32_t)(input_ch * sizeof(int16_t))); in arm_depthwise_conv_fast_s16() 128 lhs_buffer += input_ch; in arm_depthwise_conv_fast_s16() 138 input_ch, in arm_depthwise_conv_fast_s16() 150 input += input_x * input_y * input_ch; in arm_depthwise_conv_fast_s16() 157 int32_t loop_count = (input_ch + 3) / 4; in arm_depthwise_conv_fast_s16() 158 int32_t num_ch_to_process = input_ch; in arm_depthwise_conv_fast_s16() [all …]
|
D | arm_convolve_1_x_n_s8.c | 78 const uint16_t input_ch = input_dims->c; in arm_convolve_1_x_n_s8() local 105 const int32_t lhs_offset = input_ch * stride_x; in arm_convolve_1_x_n_s8() 116 status = arm_nn_mat_mul_core_1x_s8(actual_kernel_len * input_ch, in arm_convolve_1_x_n_s8() 117 ker_begin_idx * input_ch, in arm_convolve_1_x_n_s8() 119 filter_data + (ker_begin_idx * input_ch), in arm_convolve_1_x_n_s8() 136 input_start *= input_ch; in arm_convolve_1_x_n_s8() 170 status = arm_nn_mat_mul_core_1x_s8(ker_end_idx * input_ch, in arm_convolve_1_x_n_s8() 171 (kernel_x - ker_end_idx) * input_ch, in arm_convolve_1_x_n_s8() 172 input_data + est_input_x_idx * input_ch, in arm_convolve_1_x_n_s8() 182 input_data += (input_x * input_ch); in arm_convolve_1_x_n_s8()
|
D | arm_depthwise_conv_s8_opt.c | 63 const int32_t input_ch = input_dims->c; in arm_depthwise_conv_s8_opt() local 67 if (input_ch != output_ch) in arm_depthwise_conv_s8_opt() 103 const int32_t ch_loop = (input_ch + (CH_IN_BLOCK_MVE - 1)) / CH_IN_BLOCK_MVE; in arm_depthwise_conv_s8_opt() 128 input_slice + (i_ker_y * input_x + i_ker_x) * input_ch, in arm_depthwise_conv_s8_opt() 145 input_ch, in arm_depthwise_conv_s8_opt() 155 out += (4 * input_ch); in arm_depthwise_conv_s8_opt() 168 out = out_base + (i_buf * input_ch); in arm_depthwise_conv_s8_opt() 188 row_0 += input_ch; in arm_depthwise_conv_s8_opt() 236 … memset(&col_buffer[index], 0, (kernel_x * input_ch) * ker_y_start * sizeof(int16_t)); in arm_depthwise_conv_s8_opt() 237 index += (kernel_x * input_ch) * ker_y_start; in arm_depthwise_conv_s8_opt() [all …]
|
D | arm_convolve_fast_s16.c | 78 const int32_t input_ch = input_dims->c; in arm_convolve_fast_s16() local 84 const int32_t rhs_cols = input_ch * kernel_y * kernel_x; in arm_convolve_fast_s16() 116 arm_memset_s8((int8_t *)two_column_buf, 0, sizeof(int16_t) * input_ch); in arm_convolve_fast_s16() 121 … (const int8_t *)(input_data + (i_ker_y * input_x + i_ker_x) * input_ch), in arm_convolve_fast_s16() 122 input_ch * sizeof(int16_t)); in arm_convolve_fast_s16() 124 two_column_buf += input_ch; in arm_convolve_fast_s16() 222 input_data += (input_x * input_y * input_ch); in arm_convolve_fast_s16()
|
D | arm_convolve_s16.c | 69 const int32_t input_ch = input_dims->c; in arm_convolve_s16() local 117 for (int32_t i_input_ch = 0; i_input_ch < input_ch; i_input_ch++) in arm_convolve_s16() 119 … conv_out_acc += input_data[(in_row * input_x + in_col) * input_ch + i_input_ch] * in arm_convolve_s16() 120 filter_data[i_out_ch * input_ch * kernel_y * kernel_x + in arm_convolve_s16() 121 … (i_ker_y * kernel_x + i_ker_x) * input_ch + i_input_ch]; in arm_convolve_s16() 139 input_data += (input_x * input_y * input_ch); in arm_convolve_s16()
|
D | arm_convolve_s8.c | 73 const uint16_t input_ch = input_dims->c; in arm_convolve_s8() local 89 const int32_t rhs_cols = kernel_x * kernel_y * input_ch; in arm_convolve_s8() 128 … arm_memset_s8(im2col_buf, (int8_t)-input_offset, sizeof(int8_t) * input_ch); in arm_convolve_s8() 132 … arm_memcpy_s8(im2col_buf, input_data + (k_y * input_x + k_x) * input_ch, input_ch); in arm_convolve_s8() 134 im2col_buf += input_ch; in arm_convolve_s8() 277 input_data += (input_x * input_y * input_ch); in arm_convolve_s8()
|
D | arm_depthwise_conv_s16.c | 46 const int32_t input_ch, in depthwise_conv_s16_mult_4_s16() argument 92 … int32_t in_idx = (in_h + ker_h) * (input_ch * input_x) + in_w * input_ch + in_ch; in depthwise_conv_s16_mult_4_s16() 101 int32_t in_val = input[in_idx + ker_w * input_ch]; in depthwise_conv_s16_mult_4_s16() 137 const uint16_t input_ch, in depthwise_conv_s16_generic_s16() argument 166 for (int i_input_ch = 0; i_input_ch < input_ch; i_input_ch++) in depthwise_conv_s16_generic_s16() 217 int32_t idx_0 = (idx_y * input_x + idx_x) * input_ch + i_input_ch; in depthwise_conv_s16_generic_s16() 218 … int32_t ker_idx_0 = (i_ker_y * kernel_x + i_ker_x) * (input_ch * ch_mult) + idx_out_ch; in depthwise_conv_s16_generic_s16() 234 input += (input_x * input_y * input_ch); in depthwise_conv_s16_generic_s16()
|
D | arm_depthwise_conv_s8.c | 50 const int32_t input_ch, in depthwise_conv_s8_mult_4() argument 101 … int32_t in_idx = (in_h + ker_h) * (input_ch * input_x) + in_w * input_ch + in_ch; in depthwise_conv_s8_mult_4() 108 int32_t in_val = input[in_idx + ker_w * input_ch] + input_offset; in depthwise_conv_s8_mult_4() 158 const uint16_t input_ch, in depthwise_conv_s8_generic() argument 194 for (int i_input_ch = 0; i_input_ch < input_ch; i_input_ch++) in depthwise_conv_s8_generic() 243 int32_t idx_0 = (idx_y * input_x + idx_x) * input_ch + i_input_ch; in depthwise_conv_s8_generic() 244 … int32_t ker_idx_0 = (i_ker_y * kernel_x + i_ker_x) * (input_ch * ch_mult) + idx_out_ch; in depthwise_conv_s8_generic() 262 input += (input_x * input_y * input_ch); in depthwise_conv_s8_generic()
|
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/ |
D | model_extractor.py | 100 f.write("#define {}_IN_CH {}\n".format(prefix, self.input_ch)) 128 … f.write("#define {}_INPUT_SIZE {}\n".format(prefix, self.x_input * self.y_input * self.input_ch)) 144 … self.input_ch * self.x_input * self.y_input)) 153 [self.batches, self.y_input, self.x_input, self.input_ch] = input_shape 154 [output_ch, self.filter_y, self.filter_x, self.input_ch] = filter_shape 157 [self.batches, self.input_ch] = input_shape 158 [self.input_ch, self.output_ch] = filter_shape
|
D | generate_test_data.py | 157 self.input_ch = in_ch 286 input_shape = [self.batches, self.y_input, self.x_input, self.input_ch] 361 f.write("#define {}_IN_CH {}\n".format(prefix, self.input_ch)) 366 … f.write("#define {}_INPUT_SIZE {}\n".format(prefix, self.x_input * self.y_input * self.input_ch)) 462 representative_dataset_shape = (self.batches, self.y_input, self.x_input, self.input_ch) 630 self.channel_multiplier = self.output_ch // self.input_ch 631 if self.output_ch % self.input_ch != 0: 685 … weights = tf.reshape(weights, [self.filter_y, self.filter_x, self.input_ch, out_channel]) 687 … weights = self.get_randomized_data([self.filter_y, self.filter_x, self.input_ch, out_channel], 698 input_shape = (self.batches, self.y_input, self.x_input, self.input_ch) [all …]
|