diff --git a/mindspore/lite/nnacl/int8/conv_int8.c b/mindspore/lite/nnacl/int8/conv_int8.c index 6f8a2a5c607..4d2e9aadd56 100644 --- a/mindspore/lite/nnacl/int8/conv_int8.c +++ b/mindspore/lite/nnacl/int8/conv_int8.c @@ -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_; diff --git a/mindspore/lite/nnacl/int8/conv_int8.h b/mindspore/lite/nnacl/int8/conv_int8.h index f5a1944fb18..346b140ea47 100644 --- a/mindspore/lite/nnacl/int8/conv_int8.h +++ b/mindspore/lite/nnacl/int8/conv_int8.h @@ -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" { diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/opt_op_handler.cc b/mindspore/lite/src/runtime/kernel/arm/int8/opt_op_handler.cc index 9ee46d6c731..f8527744ba1 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/opt_op_handler.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/opt_op_handler.cc @@ -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); @@ -39,9 +39,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,