Skip to content

Commit

Permalink
Merge pull request #9824 from wanghaoshuang/fix_parall_exe
Browse files Browse the repository at this point in the history
Fix lost of LoD while splitting tensor in parallel executor.
  • Loading branch information
panyx0718 authored Apr 11, 2018
2 parents cea3912 + 19c1a68 commit 20f202a
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 20f202a

Please sign in to comment.