提交 19c1a68e 编写于 作者: W wanghaoshuang

Fix lost of LoD while splitting tensor in parallel executor.

上级 e0babe7c
...@@ -181,10 +181,10 @@ void ParallelExecutor::SplitTensorToPlaces( ...@@ -181,10 +181,10 @@ void ParallelExecutor::SplitTensorToPlaces(
member_->places_.size(), lod_tensors.size()); member_->places_.size(), lod_tensors.size());
for (size_t j = 0; j < member_->places_.size(); ++j) { for (size_t j = 0; j < member_->places_.size(); ++j) {
// TODO(panxy0718): Do I need to delete this var? // TODO(panxy0718): Do I need to delete this var?
member_->local_scopes_[j] auto t =
->Var(it.first) member_->local_scopes_[j]->Var(it.first)->GetMutable<LoDTensor>();
->GetMutable<LoDTensor>() t->ShareDataWith(lod_tensors[j]);
->ShareDataWith(lod_tensors[j]); t->set_lod(lod_tensors[j].lod());
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册