Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghuancoder committed Nov 17, 2023
1 parent d0a5cd3 commit 441bba1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddle/fluid/pybind/eager_method.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ static PyObject* tensor_method__is_initialized(TensorObject* self,
static PyObject* tensor_method__is_dense_tensor_hold_allocation(
TensorObject* self, PyObject* args, PyObject* kwargs) {
EAGER_TRY
if (!self->tensor.defined()) {
return ToPyObject(false);
}
if (self->tensor.is_dense_tensor()) {
return ToPyObject(
std::dynamic_pointer_cast<phi::DenseTensor>(self->tensor.impl())
Expand Down

0 comments on commit 441bba1

Please sign in to comment.