未验证 提交 d3fac0ea 编写于 作者: C Chengmo 提交者: GitHub

fix int64 bug (#30780)

fix push sparse int64 bug
上级 69875dc4
......@@ -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<uint64_t>(id); });
[&](int64_t id) { return static_cast<uint64_t>(id); });
for (auto i = 0; i < static_cast<int>(sparse_push_keys.size()); ++i) {
push_g_vec.push_back(tensor->mutable_value()->data<float>() + i * dim);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册