diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index be25f2d014f3230d94a2e91d29fbca5f5461c6b3..c08ec4fe413f9ccf1164751a52fd0bc297e941de 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -433,23 +433,23 @@ inline std::string build_ex_string(cublasStatus_t stat, const std::string& msg) { std::string err; if (stat == CUBLAS_STATUS_NOT_INITIALIZED) { - err = "CUBLAS: not initialized."; + err = "CUBLAS_STATUS_NOT_INITIALIZED"; } else if (stat == CUBLAS_STATUS_ALLOC_FAILED) { - err = "CUBLAS: alloc failed."; + err = "CUBLAS_STATUS_ALLOC_FAILED"; } else if (stat == CUBLAS_STATUS_INVALID_VALUE) { - err = "CUBLAS: invalid value."; + err = "CUBLAS_STATUS_INVALID_VALUE"; } else if (stat == CUBLAS_STATUS_ARCH_MISMATCH) { - err = "CUBLAS: arch mismatch."; + err = "CUBLAS_STATUS_ARCH_MISMATCH"; } else if (stat == CUBLAS_STATUS_MAPPING_ERROR) { - err = "CUBLAS: mapping error."; + err = "CUBLAS_STATUS_MAPPING_ERROR"; } else if (stat == CUBLAS_STATUS_EXECUTION_FAILED) { - err = "CUBLAS: execution failed."; + err = "CUBLAS_STATUS_EXECUTION_FAILED"; } else if (stat == CUBLAS_STATUS_INTERNAL_ERROR) { - err = "CUBLAS: internal error."; + err = "CUBLAS_STATUS_INTERNAL_ERROR"; } else if (stat == CUBLAS_STATUS_NOT_SUPPORTED) { - err = "CUBLAS: not supported, "; + err = "CUBLAS_STATUS_NOT_SUPPORTED"; } else if (stat == CUBLAS_STATUS_LICENSE_ERROR) { - err = "CUBLAS: license error."; + err = "CUBLAS_STATUS_LICENSE_ERROR"; } return msg + "\n [Hint: " + err + "]"; } diff --git a/paddle/fluid/platform/errors.h b/paddle/fluid/platform/errors.h index c4184df9eff776d96d0fafaaf10f003d314648b5..5c145845fa6572ad82e745caddb6c85275582f51 100644 --- a/paddle/fluid/platform/errors.h +++ b/paddle/fluid/platform/errors.h @@ -36,9 +36,14 @@ class ErrorSummary { ErrorSummary() { code_ = paddle::platform::error::LEGACY; msg_ = - "Paddle internal Check failed. (Please help us create a new issue, " - "here we need to find the developer to add a user friendly error " - "message)"; + "An error occurred here. There is no accurate error hint for this " + "error yet. We are continuously in the process of increasing hint for " + "this kind of error check. It would be helpful if you could inform us " + "of how this conversion went by opening a github issue. And we will " + "resolve it with high priority.\n" + " - New issue link: " + "https://github.com/PaddlePaddle/Paddle/issues/new\n" + " - Recommended issue content: all error stack information"; } // Note(chenweihang): Final deprecated constructor