提交 5c36eb8b 编写于 作者: Q Qiao Longfei

fix build

上级 4356f186
...@@ -75,8 +75,8 @@ void ParameterSend<T>::operator()(const std::string &var_name, ...@@ -75,8 +75,8 @@ void ParameterSend<T>::operator()(const std::string &var_name,
// create output var in local scope // create output var in local scope
size_t row_offset = 0; size_t row_offset = 0;
for (auto i = 0; i < out_num; ++i) { for (auto i = 0; i < out_num; ++i) {
auto *out = framework::Tensor *out = local_scope->Var(send_varnames[i])
local_scope->Var(send_varnames[i])->GetMutable<framework::Tensor>(); ->GetMutable<framework::LoDTensor>();
*out = send_tensor.Slice(row_offset, row_offset + outs_dims[i][0]); *out = send_tensor.Slice(row_offset, row_offset + outs_dims[i][0]);
row_offset += outs_dims[i][0]; row_offset += outs_dims[i][0];
} }
...@@ -161,7 +161,8 @@ void ParameterSend<T>::operator()(const std::string &var_name, ...@@ -161,7 +161,8 @@ void ParameterSend<T>::operator()(const std::string &var_name,
} }
} }
if (sync) { // note!! only support sync send now
if (true || sync) {
for (size_t i = 0; i < rets.size(); i++) { for (size_t i = 0; i < rets.size(); i++) {
PADDLE_ENFORCE(rets[i]->Wait(), "internal error in RPCClient"); PADDLE_ENFORCE(rets[i]->Wait(), "internal error in RPCClient");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册