Skip to content

Commit

Permalink
Updated PADDLE_ENFORCE error type
Browse files Browse the repository at this point in the history
  • Loading branch information
veyron95 committed Jan 4, 2022
1 parent bcc419b commit 4e19a2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paddle/fluid/pybind/eager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,28 +541,28 @@ int EagerTensorInit(PyObject* self, PyObject* args, PyObject* kwargs) {

PADDLE_ENFORCE_NOT_NULL(
kw_dims,
paddle::platform::errors::Fatal(
paddle::platform::errors::InvalidArgument(
"Calling __init__ of Eager Tensor with NULL dims is "
"forbidden. Please check your code and make sure you new a "
"dims before calling this constructor."));

PADDLE_ENFORCE_NOT_NULL(
kw_name,
paddle::platform::errors::Fatal(
paddle::platform::errors::InvalidArgument(
"Calling __init__ of Eager Tensor with NULL name is "
"forbidden. Please check your code and make sure you new a "
"name before calling this constructor."));

PADDLE_ENFORCE_NOT_NULL(
kw_dtype,
paddle::platform::errors::Fatal(
paddle::platform::errors::InvalidArgument(
"Calling __init__ of Eager Tensor with NULL dtype is "
"forbidden. Please check your code and make sure you new a "
"dtype before calling this constructor."));

PADDLE_ENFORCE_NOT_NULL(
kw_persistable,
paddle::platform::errors::Fatal(
paddle::platform::errors::InvalidArgument(
"Calling __init__ of Eager Tensor with NULL persistable is "
"forbidden. Please check your code and make sure you new a "
"persistable before calling this constructor."));
Expand Down

1 comment on commit 4e19a2a

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.