From 120deff58e11907e75e0178939ae91f748ceed5b Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 1 Apr 2020 14:18:23 +0800 Subject: [PATCH] (ref):CHECK fc_op and conv2d_op mlu kernel should not have act type --- lite/kernels/mlu/bridges/conv_op.cc | 1 + lite/kernels/mlu/bridges/fc_op.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lite/kernels/mlu/bridges/conv_op.cc b/lite/kernels/mlu/bridges/conv_op.cc index 67682c5d6c..b32452180d 100644 --- a/lite/kernels/mlu/bridges/conv_op.cc +++ b/lite/kernels/mlu/bridges/conv_op.cc @@ -32,6 +32,7 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { const auto* op_info = op->op_info(); const auto* scope = op->scope(); VLOG(3) << "[MLU] Converting " << op_info->Type() << "... "; + CHECK(!op_info->HasAttr("act_type")); // get input, filter and op attributes const auto input_var_name = op_info->Input("Input").front(); diff --git a/lite/kernels/mlu/bridges/fc_op.cc b/lite/kernels/mlu/bridges/fc_op.cc index b74b18bdbc..b319374935 100644 --- a/lite/kernels/mlu/bridges/fc_op.cc +++ b/lite/kernels/mlu/bridges/fc_op.cc @@ -34,7 +34,7 @@ int FCConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto w_var_name = op_info->Input("W").front(); auto output_var_name = op_info->Output("Out").front(); - // int in_num_col_dims = op_info->GetAttr("in_num_col_dims"); + CHECK(!op_info->HasAttr("activation_type")); auto x = scope->FindVar(x_var_name)->GetMutable(); auto w = scope->FindVar(w_var_name)->GetMutable(); auto output = scope->FindVar(output_var_name)->GetMutable(); -- GitLab