diff --git a/paddle/fluid/operators/math/matrix_inverse.cu.cc b/paddle/fluid/operators/math/matrix_inverse.cu.cc index 950aed0aa497416665d4ebc8b7dfc95f812bfb7d..7f5df114680552b96053418aba7ba6cf3f3a75a3 100644 --- a/paddle/fluid/operators/math/matrix_inverse.cu.cc +++ b/paddle/fluid/operators/math/matrix_inverse.cu.cc @@ -106,8 +106,10 @@ class MatrixInverseFunctor { for (int i = 0; i < batch_size; ++i) { PADDLE_ENFORCE_EQ(info[i], 0, platform::errors::PreconditionNotMet( - "For batch [%d]: U(%d, %d) is zero, singular U.", i, - info[i], info[i])); + "For batch [%d]: U(%d, %d) is zero, singular U. " + "Please check the matrix value and change it to a " + "non-singular matrix", + i, info[i], info[i])); } } }; diff --git a/paddle/fluid/operators/rank_attention_op.cc b/paddle/fluid/operators/rank_attention_op.cc index 460df0333f841953b4f2e506f67c04cb570dc927..7c2b4a8b48927aed2c7f369eb902a20311ecff9e 100644 --- a/paddle/fluid/operators/rank_attention_op.cc +++ b/paddle/fluid/operators/rank_attention_op.cc @@ -58,7 +58,9 @@ class RankAttentionOp : public framework::OperatorWithKernel { PADDLE_ENFORCE_EQ((rank_offset_dims[1] - 1) / 2, max_rank, platform::errors::InvalidArgument( - "Input(RankOffset) has wrong columns.")); + "Input(RankOffset) has wrong columns, " + "except columns to be %d, but got %d", + max_rank, (rank_offset_dims[1] - 1) / 2)); ctx->SetOutputDim("Out", {ins_num, para_col}); ctx->SetOutputDim("InputHelp", {ins_num, block_matrix_row}); diff --git a/paddle/fluid/operators/scatter.h b/paddle/fluid/operators/scatter.h index 97d35061f85176aa69df754806d9c319c6e856cf..7325df85c46ffbfe83131c75da3fa37b7a78f600 100644 --- a/paddle/fluid/operators/scatter.h +++ b/paddle/fluid/operators/scatter.h @@ -128,7 +128,11 @@ void ScatterAssignAdd(const framework::ExecutionContext& ctx, const Tensor& src, PADDLE_ENFORCE_EQ( index.dims().size() == 1 || (index.dims().size() == 2 && index.dims()[1] == 1), - true, platform::errors::InvalidArgument("index's shape is error.")); + true, platform::errors::InvalidArgument( + "index's shape is error, " + "expect index'dims shape is 1 or 2 and index.dims[1] is 1" + "but got index'dims shape is %d", + index.dims().size())); int index_size = index.dims()[0]; auto src_dims = src.dims();