提交 120deff5 编写于 作者: Z zhaoying 提交者: jackzhang235

(ref):CHECK fc_op and conv2d_op mlu kernel should not have act type

上级 ef5c0165
...@@ -32,6 +32,7 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { ...@@ -32,6 +32,7 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) {
const auto* op_info = op->op_info(); const auto* op_info = op->op_info();
const auto* scope = op->scope(); const auto* scope = op->scope();
VLOG(3) << "[MLU] Converting " << op_info->Type() << "... "; VLOG(3) << "[MLU] Converting " << op_info->Type() << "... ";
CHECK(!op_info->HasAttr("act_type"));
// get input, filter and op attributes // get input, filter and op attributes
const auto input_var_name = op_info->Input("Input").front(); const auto input_var_name = op_info->Input("Input").front();
......
...@@ -34,7 +34,7 @@ int FCConverter(void* ctx, OpLite* op, KernelBase* kernel) { ...@@ -34,7 +34,7 @@ int FCConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto w_var_name = op_info->Input("W").front(); auto w_var_name = op_info->Input("W").front();
auto output_var_name = op_info->Output("Out").front(); auto output_var_name = op_info->Output("Out").front();
// int in_num_col_dims = op_info->GetAttr<int>("in_num_col_dims"); CHECK(!op_info->HasAttr("activation_type"));
auto x = scope->FindVar(x_var_name)->GetMutable<Tensor>(); auto x = scope->FindVar(x_var_name)->GetMutable<Tensor>();
auto w = scope->FindVar(w_var_name)->GetMutable<Tensor>(); auto w = scope->FindVar(w_var_name)->GetMutable<Tensor>();
auto output = scope->FindVar(output_var_name)->GetMutable<Tensor>(); auto output = scope->FindVar(output_var_name)->GetMutable<Tensor>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册