Skip to content

Commit

Permalink
Fixed ResetHolder() issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jim19930609 committed Jan 5, 2022
1 parent de06d82 commit 7c6b10f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/pten/core/dense_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void DenseTensor::ResetHolder(
if (storage_ != nullptr && storage_->data_shared()) {
PADDLE_ENFORCE_LE(
numel() * SizeOf(dtype()) + meta_.offset,
storage_->data_shared()->size(),
holder->size(),
paddle::platform::errors::InvalidArgument(
"The size of Holder is not enough to store the Tensor."));
}
Expand Down

0 comments on commit 7c6b10f

Please sign in to comment.