!7831 [MSLITE][Develop] fix bug of arm cpu int8 op deconv depthwise

Merge pull request !7831 from yangruoqi713/fix_bug
This commit is contained in:
mindspore-ci-bot 2020-10-27 19:35:44 +08:00 committed by Gitee
commit fbad1e4de8
1 changed files with 4 additions and 3 deletions

View File

@ -111,8 +111,8 @@ int DeconvolutionDepthwiseInt8CPUKernel::InitBuffer() {
memset(packed_output_, 0, pack_output_size * sizeof(int8_t));
}
output_buffer_ = reinterpret_cast<int32_t *>(
context_->allocator->Malloc(conv_param_->output_h_ * conv_param_->output_w_ * C4NUM * sizeof(int32_t)));
output_buffer_ = reinterpret_cast<int32_t *>(context_->allocator->Malloc(
conv_param_->output_h_ * conv_param_->output_w_ * C4NUM * conv_param_->thread_num_ * sizeof(int32_t)));
if (output_buffer_ == nullptr) {
MS_LOG(ERROR) << "Malloc buffer failed.";
return RET_ERROR;
@ -153,7 +153,8 @@ int DeconvolutionDepthwiseInt8CPUKernel::ReSize() {
}
int DeconvolutionDepthwiseInt8CPUKernel::Execute(int task_id) {
DeconvDwInt8(packed_output_, output_buffer_, packed_input_, packed_weight_, reinterpret_cast<int32_t *>(bias_data_),
auto buffer = output_buffer_ + conv_param_->output_h_ * conv_param_->output_w_ * C4NUM * task_id;
DeconvDwInt8(packed_output_, buffer, packed_input_, packed_weight_, reinterpret_cast<int32_t *>(bias_data_),
conv_param_, sliding, task_id);
return RET_OK;
}