diff --git a/paddle/fluid/prim/utils/static/composite_grad_desc_maker.h b/paddle/fluid/prim/utils/static/composite_grad_desc_maker.h index b1b24af231f68..904e6ab041098 100644 --- a/paddle/fluid/prim/utils/static/composite_grad_desc_maker.h +++ b/paddle/fluid/prim/utils/static/composite_grad_desc_maker.h @@ -405,15 +405,6 @@ class CompositeGradOpMakerBase { } } return input_grads; - PADDLE_ENFORCE_LE( - var_names.size(), - 1UL, - platform::errors::Unavailable( - "BUG from operator developer:" - " for input argument with a list of variables, " - " drop_empty_grad is not allowed because it makes" - " the correspondence bewteen a variable and its gradient" - " ambiguous.")); } std::vector MultiOutputGrad(