From 23e96bdec0484a34a5b1b325932bac0a9b733360 Mon Sep 17 00:00:00 2001 From: engineer1109 Date: Wed, 26 Apr 2023 11:46:37 +0800 Subject: [PATCH] [Debug][Werror]error: control reaches end of non-void function [-Werror=return-type](#53326) --- .../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 eb13902be20..1ef5161dc07 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( -- GitLab