!7924 [MSLITE] fp16 abort

Merge pull request !7924 from ling/sr
This commit is contained in:
mindspore-ci-bot 2020-10-28 21:51:21 +08:00 committed by Gitee
commit fff8dff071
5 changed files with 14 additions and 4 deletions

View File

@ -264,6 +264,4 @@ kernel::LiteKernel *CpuDeConvFp16KernelCreator(const std::vector<lite::Tensor *>
}
return kernel;
}
REG_KERNEL(kCPU, kNumberTypeFloat16, PrimitiveType_DeConv2D, CpuDeConvFp16KernelCreator)
} // namespace mindspore::kernel

View File

@ -99,6 +99,11 @@ void DeConvWinogradFp16CPUKernel::FreeDeconvParam() {
}
}
if (deconv_param_->compute_units_ != nullptr) {
free(deconv_param_->compute_units_);
deconv_param_->compute_units_ = nullptr;
}
if (deconv_param_ != nullptr) {
delete (deconv_param_);
deconv_param_ = nullptr;

View File

@ -34,6 +34,8 @@ class DeConvWinogradFp16CPUKernel : public ConvolutionBaseFP16CPUKernel {
deconv_param_ = new DeConvParam();
for (auto &wg : deconv_param_->a_buffer_) {
wg.buf_init_ = false;
wg.dest_buffer_ = nullptr;
wg.middle_buffer_ = nullptr;
}
}
~DeConvWinogradFp16CPUKernel() override;

View File

@ -88,6 +88,11 @@ void DeConvolutionWinogradCPUKernel::FreeDeconvParam() {
}
}
if (deconv_param_->compute_units_ != nullptr) {
free(deconv_param_->compute_units_);
deconv_param_->compute_units_ = nullptr;
}
if (deconv_param_ != nullptr) {
delete (deconv_param_);
deconv_param_ = nullptr;

View File

@ -103,13 +103,13 @@ void DeConvInt8CPUKernel::CheckSupportOptimize() {
if (dlopen_error != nullptr) {
MS_LOG(ERROR) << "load matmul func failed! " << dlopen_error << ".";
support_optimize_ = false;
matmul_func_ = nullptr;
matmul_func_ = MatMulR4Int8Neon64;
} else {
support_optimize_ = true;
}
} else {
support_optimize_ = false;
matmul_func_ = nullptr;
matmul_func_ = MatMulR4Int8Neon64;
}
#endif
return;