From 7c4efa5a1d09365ab75a908434a2914e2776df42 Mon Sep 17 00:00:00 2001 From: Xinger <34963409+Ningsir@users.noreply.github.com> Date: Wed, 21 Sep 2022 16:48:32 +0800 Subject: [PATCH] fix error: control reaches end of non-void function (#46312) --- paddle/fluid/eager/backward.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/eager/backward.cc b/paddle/fluid/eager/backward.cc index b80d0830660..6b75b8d9e31 100644 --- a/paddle/fluid/eager/backward.cc +++ b/paddle/fluid/eager/backward.cc @@ -387,8 +387,8 @@ std::vector RunBackward( } egr::Controller::Instance().ClearFinalBackwardHooks(); if (!is_general_grad) return {}; - return GeneralGrad::Instance().GetResults(inputs, allow_unused, create_graph); VLOG(3) << "Finish Backward"; + return GeneralGrad::Instance().GetResults(inputs, allow_unused, create_graph); } void Backward( -- GitLab