forked from OSSInnovation/mindspore
!6351 [MS][LITE][CPU]fix int8 function call of liboptimize
Merge pull request !6351 from lixian/master
This commit is contained in:
commit
0e60ed8927
|
@ -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_;
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue