Skip to content

Commit b0a8325

Browse files
committed
fix conflit with develop
1 parent d213509 commit b0a8325

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/pten/api/lib/tensor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ void Tensor::reshape(const std::vector<int64_t> &shape) {
114114
"touching underlying data, this requires the total size of "
115115
"the tensor to remain constant.";
116116
if (detail::IsDenseTensor(impl_)) {
117-
std::dynamic_pointer_cast<pten::DenseTensor>(impl_)->Resize(
118-
framework::make_ddim(shape));
117+
std::dynamic_pointer_cast<pten::DenseTensor>(impl_)->set_meta(
118+
pten::DenseTensorMeta(dtype(), framework::make_ddim(shape)));
119119
} else {
120120
PADDLE_THROW(platform::errors::Unimplemented(
121121
"Only support reshape operation on DenseTensor now."));

0 commit comments

Comments
 (0)