From d3fac0ea85ba08c8d5465137db9b3f911d8e8157 Mon Sep 17 00:00:00 2001 From: Chengmo Date: Mon, 1 Feb 2021 16:59:29 +0800 Subject: [PATCH] fix int64 bug (#30780) fix push sparse int64 bug --- paddle/fluid/distributed/service/communicator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/distributed/service/communicator.cc b/paddle/fluid/distributed/service/communicator.cc index 6d26e657747..09f8db145a1 100644 --- a/paddle/fluid/distributed/service/communicator.cc +++ b/paddle/fluid/distributed/service/communicator.cc @@ -290,7 +290,7 @@ void Communicator::RpcSendSparse(const std::string &var_name, int table_id, auto dim = tensor->value().dims()[1]; std::transform(tensor->rows().begin(), tensor->rows().end(), std::back_inserter(sparse_push_keys), - [&](int id) { return static_cast(id); }); + [&](int64_t id) { return static_cast(id); }); for (auto i = 0; i < static_cast(sparse_push_keys.size()); ++i) { push_g_vec.push_back(tensor->mutable_value()->data() + i * dim); -- GitLab