diff --git a/paddle/fluid/operators/fused/fusion_seqpool_concat_op.cc b/paddle/fluid/operators/fused/fusion_seqpool_concat_op.cc index 7ca02a2541ddf1421f15adb4cf1affad92443d03..c260b28354e85e310dd516a346b4e8a4129e4825 100644 --- a/paddle/fluid/operators/fused/fusion_seqpool_concat_op.cc +++ b/paddle/fluid/operators/fused/fusion_seqpool_concat_op.cc @@ -42,6 +42,12 @@ void FusionSeqPoolConcatOp::InferShape( PADDLE_ENFORCE_EQ(ins_dims[0].size(), 2, "The dims size of first input should be 2."); ctx->SetOutputDim("Out", {-1, ins_dims[0][axis] * static_cast(n)}); + + if (!ctx->IsRuntime()) { + // when compiling, the LodLevel of Out is set to be 1, which is consistent + // with that in running time. + ctx->SetLoDLevel("Out", 1); + } } framework::OpKernelType FusionSeqPoolConcatOp::GetExpectedKernelType( diff --git a/python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py b/python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py index 1958e90ad129626e7fe8b7424871e4000ca8ac80..9aabfb40827a307c9a2272b19db738063a23bd29 100644 --- a/python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py +++ b/python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py @@ -23,8 +23,7 @@ COMPILE_RUN_OP_WHITE_LIST = [ 'sequence_reshape', 'generate_proposals', 'mine_hard_examples', 'retinanet_detection_output', 'ctc_align', 'fusion_seqpool_cvm_concat', 'gru', 'sequence_erase', 'rpn_target_assign', 'retinanet_target_assign', - 'filter_by_instag', 'fusion_seqpool_concat', 'multiclass_nms', - 'multiclass_nms2', 'im2sequence', 'generate_proposal_labels', - 'distribute_fpn_proposals', 'detection_map', 'locality_aware_nms', - 'var_conv_2d' + 'filter_by_instag', 'multiclass_nms', 'multiclass_nms2', 'im2sequence', + 'generate_proposal_labels', 'distribute_fpn_proposals', 'detection_map', + 'locality_aware_nms', 'var_conv_2d' ]