diff --git a/mindspore/lite/nnacl/pack.c b/mindspore/lite/nnacl/pack.c index fb103815e08f6f66cff13dcc077a9280bf57db04..4a94118da48fb46f7c8ff171ea1c0434b0437c8c 100644 --- a/mindspore/lite/nnacl/pack.c +++ b/mindspore/lite/nnacl/pack.c @@ -487,9 +487,7 @@ void Im2ColPackUnitInt8Opt(const int8_t *input_data, int8_t *packed_input, int r for (int m = 0; m < ic4; m++) { int channel_block_stride = input_x_stride + m * C4NUM; int channel_block_offset = input_plane_offset + m * tile_num * C4NUM; - for (int k = 0; k < C4NUM; k++) { - (packed_input + channel_block_offset)[k] = (input_data + channel_block_stride)[k]; - } + memcpy(packed_input + channel_block_offset, input_data + channel_block_stride, 4); } // channel_block loop } // kernel_w loop } // kernel_h loop diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc index 39bc0ff65b3fd18f72b67552355456960f4c6793..128c88f3e591471f5a92d620cdcca7b33d855ebf 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc @@ -68,7 +68,6 @@ void Convolution1x1Int8CPUKernel::CheckSupportOptimize() { matmul_func_ = nullptr; } else { support_optimize_ = true; - matmul_func_ = MatMulInt8_8x8_r; } } else { support_optimize_ = false; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc index f0c5f33da554a1df034ef6d874ff95634cf624e2..1c069ce76493dc0b943abb30b22a68aae2727064 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc @@ -400,9 +400,9 @@ kernel::LiteKernel *CpuConvInt8KernelCreator(const std::vectorGetQuantParams().size(); if (kernel_h == 3 && kernel_w == 3 && stride_h == 1 && stride_w == 1 && dilation_h == 1 && dilation_w == 1) { - kernel = new (std::nothrow) kernel::Convolution3x3Int8CPUKernel(opParameter, inputs, outputs, ctx, primitive); + kernel = new (std::nothrow) kernel::ConvolutionInt8CPUKernel(opParameter, inputs, outputs, ctx, primitive); } else if (kernel_h == 1 && kernel_w == 1 && filter_quant_size == 1) { - kernel = new (std::nothrow) kernel::Convolution1x1Int8CPUKernel(opParameter, inputs, outputs, ctx, primitive); + kernel = new (std::nothrow) kernel::ConvolutionInt8CPUKernel(opParameter, inputs, outputs, ctx, primitive); } else { kernel = new (std::nothrow) kernel::ConvolutionInt8CPUKernel(opParameter, inputs, outputs, ctx, primitive); }