未验证 提交 2e908225 编写于 作者: C Chen Weihang 提交者: GitHub

polish default error msg & cublas error hint, test=develop (#22032)

上级 9a2204ee
...@@ -433,23 +433,23 @@ inline std::string build_ex_string(cublasStatus_t stat, ...@@ -433,23 +433,23 @@ inline std::string build_ex_string(cublasStatus_t stat,
const std::string& msg) { const std::string& msg) {
std::string err; std::string err;
if (stat == CUBLAS_STATUS_NOT_INITIALIZED) { if (stat == CUBLAS_STATUS_NOT_INITIALIZED) {
err = "CUBLAS: not initialized."; err = "CUBLAS_STATUS_NOT_INITIALIZED";
} else if (stat == CUBLAS_STATUS_ALLOC_FAILED) { } else if (stat == CUBLAS_STATUS_ALLOC_FAILED) {
err = "CUBLAS: alloc failed."; err = "CUBLAS_STATUS_ALLOC_FAILED";
} else if (stat == CUBLAS_STATUS_INVALID_VALUE) { } else if (stat == CUBLAS_STATUS_INVALID_VALUE) {
err = "CUBLAS: invalid value."; err = "CUBLAS_STATUS_INVALID_VALUE";
} else if (stat == CUBLAS_STATUS_ARCH_MISMATCH) { } else if (stat == CUBLAS_STATUS_ARCH_MISMATCH) {
err = "CUBLAS: arch mismatch."; err = "CUBLAS_STATUS_ARCH_MISMATCH";
} else if (stat == CUBLAS_STATUS_MAPPING_ERROR) { } else if (stat == CUBLAS_STATUS_MAPPING_ERROR) {
err = "CUBLAS: mapping error."; err = "CUBLAS_STATUS_MAPPING_ERROR";
} else if (stat == CUBLAS_STATUS_EXECUTION_FAILED) { } else if (stat == CUBLAS_STATUS_EXECUTION_FAILED) {
err = "CUBLAS: execution failed."; err = "CUBLAS_STATUS_EXECUTION_FAILED";
} else if (stat == CUBLAS_STATUS_INTERNAL_ERROR) { } else if (stat == CUBLAS_STATUS_INTERNAL_ERROR) {
err = "CUBLAS: internal error."; err = "CUBLAS_STATUS_INTERNAL_ERROR";
} else if (stat == CUBLAS_STATUS_NOT_SUPPORTED) { } else if (stat == CUBLAS_STATUS_NOT_SUPPORTED) {
err = "CUBLAS: not supported, "; err = "CUBLAS_STATUS_NOT_SUPPORTED";
} else if (stat == CUBLAS_STATUS_LICENSE_ERROR) { } else if (stat == CUBLAS_STATUS_LICENSE_ERROR) {
err = "CUBLAS: license error."; err = "CUBLAS_STATUS_LICENSE_ERROR";
} }
return msg + "\n [Hint: " + err + "]"; return msg + "\n [Hint: " + err + "]";
} }
......
...@@ -36,9 +36,14 @@ class ErrorSummary { ...@@ -36,9 +36,14 @@ class ErrorSummary {
ErrorSummary() { ErrorSummary() {
code_ = paddle::platform::error::LEGACY; code_ = paddle::platform::error::LEGACY;
msg_ = msg_ =
"Paddle internal Check failed. (Please help us create a new issue, " "An error occurred here. There is no accurate error hint for this "
"here we need to find the developer to add a user friendly error " "error yet. We are continuously in the process of increasing hint for "
"message)"; "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 // Note(chenweihang): Final deprecated constructor
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册