From b2ba830eebe6ac2b5251cd8d1eabb9024879ae36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Gallus?= Date: Wed, 3 Jun 2020 07:24:20 +0200 Subject: [PATCH] Fix bug in ShareBufferWith causing eltwise_add inplace ut to fail (#24853) --- paddle/fluid/framework/tensor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index 0b95e585d7..d9fddc4c77 100644 --- a/paddle/fluid/framework/tensor.h +++ b/paddle/fluid/framework/tensor.h @@ -158,6 +158,7 @@ class Tensor { void ShareBufferWith(const Tensor& tensor) { holder_ = tensor.holder_; offset_ = tensor.offset_; + type_ = tensor.type_; } bool IsSharedBufferWith(const Tensor& src) const { -- GitLab