Skip to content

Commit

Permalink
Fix lost of LoD while splitting tensor in parallel executor.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaoshuang committed Apr 10, 2018
1 parent e0babe7 commit 19c1a68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paddle/fluid/framework/parallel_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ void ParallelExecutor::SplitTensorToPlaces(
member_->places_.size(), lod_tensors.size());
for (size_t j = 0; j < member_->places_.size(); ++j) {
// TODO(panxy0718): Do I need to delete this var?
member_->local_scopes_[j]
->Var(it.first)
->GetMutable<LoDTensor>()
->ShareDataWith(lod_tensors[j]);
auto t =
member_->local_scopes_[j]->Var(it.first)->GetMutable<LoDTensor>();
t->ShareDataWith(lod_tensors[j]);
t->set_lod(lod_tensors[j].lod());
}
}
}
Expand Down

0 comments on commit 19c1a68

Please sign in to comment.