forked from mindspore-Ecosystem/mindspore
commit
fff8dff071
|
@ -264,6 +264,4 @@ kernel::LiteKernel *CpuDeConvFp16KernelCreator(const std::vector<lite::Tensor *>
|
|||
}
|
||||
return kernel;
|
||||
}
|
||||
|
||||
REG_KERNEL(kCPU, kNumberTypeFloat16, PrimitiveType_DeConv2D, CpuDeConvFp16KernelCreator)
|
||||
} // namespace mindspore::kernel
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue