From 8c5b9cf89c5e69a239ad89a42268f0c335be80c0 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 28 Sep 2022 14:11:52 +0800 Subject: [PATCH] remove const qualifier in function return (#46546) --- paddle/fluid/framework/details/nccl_op_handle.h | 2 +- paddle/fluid/framework/ir/coalesce_grad_tensor_pass.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/details/nccl_op_handle.h b/paddle/fluid/framework/details/nccl_op_handle.h index 7aa200fc91..03e2ee1b9d 100644 --- a/paddle/fluid/framework/details/nccl_op_handle.h +++ b/paddle/fluid/framework/details/nccl_op_handle.h @@ -71,7 +71,7 @@ class NCCLOpHandleBase : public OpHandleBase { return nccl_ctxs_; } - const ncclComm_t GetComm() const { + ncclComm_t GetComm() const { PADDLE_ENFORCE_EQ( places_.size(), 1, diff --git a/paddle/fluid/framework/ir/coalesce_grad_tensor_pass.cc b/paddle/fluid/framework/ir/coalesce_grad_tensor_pass.cc index a7a5a21b32..b9915d57a1 100644 --- a/paddle/fluid/framework/ir/coalesce_grad_tensor_pass.cc +++ b/paddle/fluid/framework/ir/coalesce_grad_tensor_pass.cc @@ -560,7 +560,7 @@ class CoalesceGradTensorPass : public ir::Pass { } } VLOG(4) << "all_persistable:" << all_persistable; - VLOG(4) << "any_persistable:" << all_persistable; + VLOG(4) << "any_persistable:" << any_persistable; // NOTE. In scope_buffered_ssa_graph_executor, after each execution of // DropScope(), non persistable vars will be Erase or Clear. So // coalesce_tensor op needs to be executed again after the execution -- GitLab