We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a5d858 commit 39ec9bfCopy full SHA for 39ec9bf
paddle/pten/core/dense_tensor_impl.cc
@@ -85,7 +85,8 @@ void DenseTensor::ResetHolder(const std::shared_ptr<pten::Allocation>& holder) {
85
// compare with a data with unsigned long type, this will make checking
86
// failed, so it's a temporary solution to deal with this problem.
87
PADDLE_ENFORCE_LE(
88
- numel() * static_cast<int64_t>(SizeOf(dtype())) + meta_.offset,
+ numel() * static_cast<int64_t>(SizeOf(dtype())) +
89
+ static_cast<int64_t>(meta_.offset),
90
static_cast<int64_t>(holder->size()),
91
paddle::platform::errors::InvalidArgument(
92
"The size of Holder is not enough to store the Tensor."));
0 commit comments