Browse Source

!15794 [MSLITE] Fix bug of deconvolution fp16 initialization.

From: @wang_shaocong
Reviewed-by: @zhang_xue_tong,@zhanghaibo5
Signed-off-by: @zhang_xue_tong
pull/15794/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
6f59321206
2 changed files with 6 additions and 10 deletions
  1. +0
    -4
      mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
  2. +6
    -6
      mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.h

+ 0
- 4
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc View File

@@ -70,10 +70,6 @@ int DeConvolutionFp16CPUKernel::InitWeightBias() {
MS_LOG(ERROR) << "DeConv fp16 only support fp16 weight";
return RET_ERROR;
}
if (bias_size != in_tensors_.at(2)->Size()) {
MS_LOG(ERROR) << "input bias size not match : " << bias_size << " vs " << in_tensors_.at(2)->Size();
return RET_ERROR;
}
memcpy(bias_data_, in_tensors_.at(2)->data_c(), bias_size);
}



+ 6
- 6
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.h View File

@@ -50,12 +50,12 @@ class DeConvolutionFp16CPUKernel : public ConvolutionBaseCPUKernel {
int output_plane_;
int thread_count_;
int thread_stride_;
float16_t *pack_input_;
float16_t *pack_weight_;
float16_t *pack_output_;
float16_t *tmp_buffer_;
float16_t *batch_input_;
float16_t *batch_output_;
float16_t *pack_input_ = nullptr;
float16_t *pack_weight_ = nullptr;
float16_t *pack_output_ = nullptr;
float16_t *tmp_buffer_ = nullptr;
float16_t *batch_input_ = nullptr;
float16_t *batch_output_ = nullptr;
};
} // namespace mindspore::kernel
#endif // MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP16_DECONVOLUTION_H_

Loading…
Cancel
Save