From 7e6518e8caea1468d10fcbd20dabe9305028c56f Mon Sep 17 00:00:00 2001 From: Yancey1989 Date: Wed, 20 Jun 2018 12:35:10 +0800 Subject: [PATCH] fix compile warning --- paddle/fluid/framework/parallel_executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index f570d1a6ae3..d478865fa8f 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -164,7 +164,7 @@ void ParallelExecutor::BCastParamsToGPUs( auto place = member_->places_[i]; void *buffer; - if (initialize && i == 0 || !initialize && i == var_dev_id) { + if ((initialize && i == 0) || (!initialize && i == var_dev_id)) { buffer = const_cast(main_tensor.data()); } else { auto local_scope = member_->local_scopes_[i]; -- GitLab