Change ShareDataWith() to TensorCopy() in ref_by_trainer_id (#22717)

As the title
revert-22710-feature/integrated_ps_api
guofei 6 years ago committed by GitHub
parent 71ab0458e1
commit ae8b5f11a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,7 +40,8 @@ class RefByTrainerIdKernel : public framework::OpKernel<T> {
}
PADDLE_ENFORCE_LT((size_t)trainer_id, in_list.size());
out->mutable_data<T>(context.GetPlace());
out->ShareDataWith(*(in_list[trainer_id]));
framework::TensorCopy(*(in_list[trainer_id]), in_list[trainer_id]->place(),
out);
}
};

Loading…
Cancel
Save