From 57eacfc1a47107b0cdf689ac0ddabe098686eabd Mon Sep 17 00:00:00 2001 From: Baibaifan Date: Thu, 23 Dec 2021 14:46:42 +0000 Subject: [PATCH] fix share buffer to --- paddle/fluid/pybind/imperative.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/pybind/imperative.cc b/paddle/fluid/pybind/imperative.cc index e981de44c5ac9..c4ef22b89678d 100644 --- a/paddle/fluid/pybind/imperative.cc +++ b/paddle/fluid/pybind/imperative.cc @@ -1984,6 +1984,7 @@ void BindImperative(py::module *m_ptr) { platform::errors::InvalidArgument( "Tensor %s has not been initialized!", self->Name())); dst_->ShareBufferWith(*src); + dst_->ShareDataTypeWith(*src); }) .def("_is_shared_buffer_with", [](const std::shared_ptr &self,