diff --git a/lite/kernels/mlu/bridges/paddle_use_bridges.h b/lite/kernels/mlu/bridges/paddle_use_bridges.h index 9bd2f3357f501883a1461afc20967fcb755f5b34..be5c64b3b7056d0b8de1589d198db541b5a3777b 100644 --- a/lite/kernels/mlu/bridges/paddle_use_bridges.h +++ b/lite/kernels/mlu/bridges/paddle_use_bridges.h @@ -39,6 +39,10 @@ USE_SUBGRAPH_BRIDGE(layout, kMLU); USE_SUBGRAPH_BRIDGE(slice, kMLU); USE_SUBGRAPH_BRIDGE(squeeze, kMLU); USE_SUBGRAPH_BRIDGE(squeeze2, kMLU); +USE_SUBGRAPH_BRIDGE(flatten, kMLU); +USE_SUBGRAPH_BRIDGE(flatten2, kMLU); +USE_SUBGRAPH_BRIDGE(reshape, kMLU); +USE_SUBGRAPH_BRIDGE(reshape2, kMLU); #ifdef LITE_BUILD_EXTRA USE_SUBGRAPH_BRIDGE(gather, kMLU); USE_SUBGRAPH_BRIDGE(lrn, kMLU) diff --git a/lite/kernels/mlu/bridges/reshape_op.cc b/lite/kernels/mlu/bridges/reshape_op.cc index 0b47322b3462525be64e42b608d052719d7c5f0b..4f55e5542b700673d2fec61a674ec2399f73c56a 100644 --- a/lite/kernels/mlu/bridges/reshape_op.cc +++ b/lite/kernels/mlu/bridges/reshape_op.cc @@ -67,8 +67,8 @@ int ReshapeConverter(void* ctx, OpLite* op, KernelBase* kernel) { int cnml_trans2_input_shape[4]; CNML_CALL( cnmlGetTensorShape(trans2_input->mlu_tensor(), cnml_trans2_input_shape)); - CNML_CALL( - cnmlCreateNdReshapeOpParam(&reshape_param, cnml_trans2_input_shape, 4)); + CNML_CALL(cnmlCreateNdReshapeOpParam( + &reshape_param, cnml_trans2_input_shape, output_dims.size())); // Use cnmlCreatexxxOpForward to create op. CNML_CALL(cnmlCreateReshapeOp(&reshape_op,