From e941914a3377b00400b0a096aa64f544e9311364 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 3 Apr 2018 13:37:34 -0700 Subject: [PATCH] Fix compilation warnings in variable_response.cc --- paddle/fluid/operators/detail/variable_response.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/detail/variable_response.cc b/paddle/fluid/operators/detail/variable_response.cc index f59c9b50bb3..01eb8acc558 100644 --- a/paddle/fluid/operators/detail/variable_response.cc +++ b/paddle/fluid/operators/detail/variable_response.cc @@ -13,7 +13,11 @@ // limitations under the License. #include "paddle/fluid/operators/detail/variable_response.h" -#include + +#include +#include +#include + #include "paddle/fluid/operators/detail/send_recv.pb.h" #include "paddle/fluid/operators/detail/sendrecvop_utils.h" @@ -151,7 +155,7 @@ bool VariableResponse::CopySelectRowsTensorData( auto* tensor = slr->mutable_value(); tensor->Resize(dims); PADDLE_ENFORCE_EQ( - tensor->numel(), + static_cast(tensor->numel()), length / framework::SizeOfType( paddle::operators::detail::ToTypeIndex(meta_.data_type()))); void* tensor_data = tensor->mutable_data( -- GitLab