From e5534bd2e0a2fdcccd2e348a1b510fdb7eccd556 Mon Sep 17 00:00:00 2001 From: wangjialiang Date: Tue, 25 Apr 2023 15:37:38 +0800 Subject: [PATCH] fix -Werror=return-type --- .../fluid/prim/utils/static/composite_grad_desc_maker.h | 9 --------- 1 file changed, 9 deletions(-) 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(