diff --git a/paddle/fluid/operators/detection/generate_mask_labels_op.cc b/paddle/fluid/operators/detection/generate_mask_labels_op.cc index 16753c429455a38e3a0ccd158ebd73559b8bf136..b2e9e705fa9f5e3786325784dc2bd4045fd87aaf 100644 --- a/paddle/fluid/operators/detection/generate_mask_labels_op.cc +++ b/paddle/fluid/operators/detection/generate_mask_labels_op.cc @@ -75,6 +75,11 @@ class GenerateMaskLabelsOp : public framework::OperatorWithKernel { ctx->SetOutputDim("MaskRois", {-1, 4}); ctx->SetOutputDim("RoiHasMaskInt32", {-1, 1}); ctx->SetOutputDim("MaskInt32", {-1, num_classes * resolution * resolution}); + if (!ctx->IsRuntime()) { + ctx->SetLoDLevel("MaskRois", ctx->GetLoDLevel("Rois")); + ctx->SetLoDLevel("RoiHasMaskInt32", ctx->GetLoDLevel("Rois")); + ctx->SetLoDLevel("MaskInt32", ctx->GetLoDLevel("Rois")); + } } protected: 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 da906f2c0e7e832d106b5a52bae84caaa447db63..39db9f5476b40c5e05ee7e725b7db40025f29c2a 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 @@ -21,7 +21,6 @@ COMPILE_RUN_OP_WHITE_LIST = [ 'sequence_pool', \ 'sequence_slice', \ - 'generate_mask_labels', \ 'generate_proposals', \ 'mine_hard_examples', \ 'retinanet_detection_output', \