|
|
|
@ -167,6 +167,11 @@ int DeConvolutionFp16CPUKernel::DoDeconv(int task_id) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int DeConvolutionFp16CPUKernel::Init() {
|
|
|
|
|
matmul_param_ = new (std::nothrow) MatMulParameter();
|
|
|
|
|
if (matmul_param_ == nullptr) {
|
|
|
|
|
MS_LOG(ERROR) << "Memory allocation failed";
|
|
|
|
|
return RET_ERROR;
|
|
|
|
|
}
|
|
|
|
|
int ret = InitWeightBias();
|
|
|
|
|
if (ret != RET_OK) {
|
|
|
|
|
MS_LOG(ERROR) << "deconv InitWeightBias error!";
|
|
|
|
@ -251,7 +256,6 @@ kernel::LiteKernel *CpuDeConvFp16KernelCreator(const std::vector<lite::Tensor *>
|
|
|
|
|
}
|
|
|
|
|
auto ret = kernel->Init();
|
|
|
|
|
if (ret != RET_OK) {
|
|
|
|
|
delete kernel;
|
|
|
|
|
MS_LOG(ERROR) << "Init kernel failed, name: " << opParameter->name_ << ", type: "
|
|
|
|
|
<< schema::EnumNamePrimitiveType(static_cast<schema::PrimitiveType>(opParameter->type_));
|
|
|
|
|
if (dequant_flag) {
|
|
|
|
@ -259,6 +263,7 @@ kernel::LiteKernel *CpuDeConvFp16KernelCreator(const std::vector<lite::Tensor *>
|
|
|
|
|
weight_tensor->set_data(restore_data);
|
|
|
|
|
weight_tensor->set_data_type(restore_type);
|
|
|
|
|
}
|
|
|
|
|
delete kernel;
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
if (dequant_flag) {
|
|
|
|
|