Browse Source

[MSLITE][Develop] reopen arm cpu int8 deconv depthwise assembly

tags/v1.1.0
yangruoqi713 5 years ago
parent
commit
6d3e3be524
3 changed files with 8 additions and 8 deletions
  1. +3
    -3
      mindspore/lite/nnacl/assembly/arm32/DeconvDwInt8Center.S
  2. +3
    -3
      mindspore/lite/nnacl/int8/common_func_int8.h
  3. +2
    -2
      mindspore/lite/nnacl/int8/conv_depthwise_int8.c

+ 3
- 3
mindspore/lite/nnacl/assembly/arm32/DeconvDwInt8Center.S View File

@@ -1,4 +1,4 @@
#if 0
#ifdef __arm__
#ifndef __aarch64__

.text
@@ -9,8 +9,8 @@
#endif

// void DeconvDwInt8Center(int32_t *dst, const int16_t *src, const int16_t *weight, size_t height, size_t width,
// size_t kernel_h, size_t kernel_w, size_t out_h_step, size_t block_channel, size_t in_sh_step,
// size_t in_sw_step, size_t in_kh_step, size_t in_kw_step);
// size_t kernel_h, size_t kernel_w, size_t out_h_step, size_t block_channel, size_t in_sh_step,
// size_t in_sw_step, size_t in_kh_step, size_t in_kw_step);
// r0: dst, r1: src, r2: weight, r3: height, r4: width, #52: kernel_h, #56: kernel_w, #60: out_h_step
// #64: block_channel, #68: in_sh_step, #72: in_sw_step, #76: in_kh_step, #80: in_kw_step
DeconvDwInt8Center:


+ 3
- 3
mindspore/lite/nnacl/int8/common_func_int8.h View File

@@ -50,6 +50,9 @@ void ConvDwInt8Center(int8_t *dst, const int8_t *src, const int16_t *weight, con
size_t in_sh_step, size_t in_sw_step, size_t in_kh_step, size_t in_kw_step, int8_t *in_zp,
int32_t *out_zp, int32_t *out_multiplier, int32_t *left_shift, int32_t *right_shift,
int32_t *acc_min, int32_t *acc_max);
void DeconvDwInt8Center(int32_t *dst, const int16_t *src, const int16_t *weight, size_t height, size_t width,
size_t kernel_h, size_t kernel_w, size_t out_h_step, size_t block_channel, size_t in_sh_step,
size_t in_sw_step, size_t in_kh_step, size_t in_kw_step);
void DeconvDwInt8Post(int8_t *dst, int32_t *output_buffer, const int32_t *bias, int block_channel, int pixel_nums,
int out_multiplier, int left_shift, int right_shift, int32_t out_zp, int32_t acc_min,
int32_t acc_max);
@@ -76,9 +79,6 @@ void IndirectGemmInt8_4x4(int8_t *output, const int8_t *input, const int8_t *wei
size_t ic4, size_t oc, size_t offset, const int32_t *input_sum, size_t act_min,
size_t act_max, size_t out_zp, int32_t *out_multiplier, int32_t *shift_before,
int32_t *shift_after, size_t asymmetric, size_t per_channel, size_t per_channel_offset);
void DeconvDwInt8Center(int32_t *dst, const int16_t *src, const int16_t *weight, size_t height, size_t width,
size_t kernel_h, size_t kernel_w, size_t out_h_step, size_t block_channel, size_t in_sh_step,
size_t in_sw_step, size_t in_kh_step, size_t in_kw_step);
void ConvDw3x3Int8Neon64(int8_t *output, const int8_t *input, const int16_t *weight, const int32_t *bias,
int input_col_size, int input_row_size, int channel, int output_h, int output_w, int8_t in_zp,
int32_t out_zp, int out_multiplier, int left_shift, int right_shift, int32_t acc_min,


+ 2
- 2
mindspore/lite/nnacl/int8/conv_depthwise_int8.c View File

@@ -703,7 +703,7 @@ void DeconvDwInt8Border(int32_t *dst, const int16_t *src, const int16_t *weight,
} // height loop
}

#ifndef ENABLE_ARM64
#ifndef ENABLE_ARM
void DeconvDwInt8Center(int32_t *dst, const int16_t *src, const int16_t *weight, int height, int width, int kernel_h,
int kernel_w, int out_h_step, int block_channel, int in_sh_step, int in_sw_step, int in_kh_step,
int in_kw_step) {
@@ -787,7 +787,7 @@ void DeconvDwInt8(int8_t *output_data, int32_t *output_buffer, const int16_t *in
int32_t *out_t = output_buffer + oh_h_start * sliding->in_h_step_ + oh_w_start * sliding->block_channel_;
const int16_t *in_t =
src_data + sliding->top_ * sliding->out_h_step_ + sliding->left_ * sliding->block_channel_;
#ifdef ENABLE_ARM64
#ifdef ENABLE_ARM
DeconvDwInt8Center(out_t, in_t, weight, sliding->bottom_ - sliding->top_, sliding->right_ - sliding->left_,
conv_param->kernel_h_, conv_param->kernel_w_, sliding->out_h_step_ * sizeof(int16_t),
sliding->block_channel_ * sizeof(int16_t), sliding->in_sh_step_ * sizeof(int32_t),


Loading…
Cancel
Save