From 239fafb0d31618a1aee2ac814ed662f18c48cc9c Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Mon, 5 Feb 2018 02:37:52 -0800 Subject: [PATCH] "test on parallel do op" --- paddle/operators/parallel_do_op.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/operators/parallel_do_op.cc b/paddle/operators/parallel_do_op.cc index 67f9854c0..d66287859 100644 --- a/paddle/operators/parallel_do_op.cc +++ b/paddle/operators/parallel_do_op.cc @@ -79,6 +79,7 @@ inline void CopyOrShare(const framework::Variable &src, } else { Copy(src.Get(), dst_place, dst->GetMutable()); } + dst->set_lod(src.lod()); } else if (src.IsType()) { auto &src_sr = src.Get(); auto *dst_sr = dst->GetMutable(); @@ -89,6 +90,7 @@ inline void CopyOrShare(const framework::Variable &src, } else { Copy(src_sr.value(), dst_place, dst_sr->mutable_value()); } + dst_sr->set_rows(src_sr.rows()); } else { PADDLE_THROW("Expect LoDTensor/SelectedRows, get %s", src.Type().name()); } @@ -145,6 +147,7 @@ class ParallelDoOp : public framework::OperatorBase { auto *sub_scope = sub_scopes[i]; auto *dst = sub_scope->Var(param)->GetMutable(); framework::Copy(src, place, dst); + dst->set_lod(src.lod()); } } WaitOnPlaces(places); -- GitLab