Browse Source

fix function call of liboptimize

tags/v1.0.0
lixian 5 years ago
parent
commit
1ff44aec02
3 changed files with 7 additions and 5 deletions
  1. +2
    -1
      mindspore/lite/nnacl/int8/conv_int8.c
  2. +1
    -1
      mindspore/lite/nnacl/int8/conv_int8.h
  3. +4
    -3
      mindspore/lite/nnacl/opt_op_handler.c

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

@@ -132,7 +132,8 @@ void IndirectGemmInt8Opt(int8_t *dst, int32_t *tmp_dst, const int8_t *src, const
size_t asymmetric = conv_param->conv_quant_arg_.asymmetric_ & FILTER_ASYMMETRIC;
size_t per_channel = conv_param->conv_quant_arg_.per_channel_ & FILTER_PER_CHANNEL;
gemm_func(dst, src, weight, bias, kernel_plane, ic4, output_channel, output_channel * sizeof(int8_t), input_sum,
act_min, act_max, out_zp, out_multiplier, shift_before, shift_after, asymmetric, per_channel);
act_min, act_max, out_zp, out_multiplier, shift_before, shift_after, asymmetric, per_channel,
oc4 * C4NUM * sizeof(int32_t));
#endif
} else {
int tile_num = conv_param->tile_num_;


+ 1
- 1
mindspore/lite/nnacl/int8/conv_int8.h View File

@@ -31,7 +31,7 @@
typedef void (*GEMM_FUNC)(int8_t *dst, const int8_t *src, const int8_t *weight, const int32_t *bias, size_t ksize,
size_t ic4, size_t output_channel, 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);
int32_t *shift_after, size_t asymmetric, size_t per_channel, size_t per_channel_offset);

#ifdef __cplusplus
extern "C" {


+ 4
- 3
mindspore/lite/nnacl/opt_op_handler.c View File

@@ -25,7 +25,7 @@ extern void IndirectGemmInt8_24x4_dp(int8_t *dst, const int8_t *src, const int8_
size_t ksize, size_t ic4, size_t output_channel, 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 asymmetric, size_t per_channel, size_t per_channel_offset);

extern void MatMulOptR4Int8Neon64(const int8_t *a, const int8_t *b, int *dst, int row4, int col4, int deep16,
const int *input_sum, const int *bias);
@@ -43,9 +43,10 @@ void IndirectGemmInt8_optimize_handler(int8_t *dst, const int8_t *src, const int
size_t ksize, size_t ic4, size_t output_channel, 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 asymmetric, size_t per_channel, size_t per_channel_offset) {
return IndirectGemmInt8_24x4_dp(dst, src, weight, bias, ksize, ic4, output_channel, offset, input_sum, act_min,
act_max, out_zp, out_multiplier, shift_before, shift_after, asymmetric, per_channel);
act_max, out_zp, out_multiplier, shift_before, shift_after, asymmetric, per_channel,
per_channel_offset);
}

void MatMulR4Int8_optimize_handler(const int8_t *a, const int8_t *b, int *dst, int row4, int col4, int deep16,


Loading…
Cancel
Save