emailweixu-patch-1
Yang Yang 7 years ago
parent b64dde2a03
commit ed14528188

@ -65,9 +65,9 @@ static void SplitTensorAndMoveTensorToScopes(
} }
} }
inline void CopyOrShare(const framework::Variable& src, inline void CopyOrShare(const framework::Variable &src,
const platform::Place& dst_place, const platform::Place &dst_place,
framework::Variable* dst) { framework::Variable *dst) {
if (src.IsType<LoDTensor>()) { if (src.IsType<LoDTensor>()) {
if (src.Get<LoDTensor>().place() == dst_place) { if (src.Get<LoDTensor>().place() == dst_place) {
dst->GetMutable<LoDTensor>()->ShareDataWith(src.Get<LoDTensor>()); dst->GetMutable<LoDTensor>()->ShareDataWith(src.Get<LoDTensor>());

Loading…
Cancel
Save