提交 97c2a9a9 编写于 作者: L liaogang

Fix: compiler error under gpu

上级 fab896c5
...@@ -76,7 +76,7 @@ inline void throw_on_error(cudnnStatus_t stat, const Args&... args) { ...@@ -76,7 +76,7 @@ inline void throw_on_error(cudnnStatus_t stat, const Args&... args) {
} else { } else {
// clang-format off // clang-format off
throw std::runtime_error( throw std::runtime_error(
platform::dynload::cudnnGetErrorString(stat) + ", " + platform::dynload::cudnnGetErrorString(stat) +
string::Sprintf(args...) + string::Sprintf(args...) +
string::Sprintf(" at [%s:%s];", __FILE__, __LINE__)); string::Sprintf(" at [%s:%s];", __FILE__, __LINE__));
// clang-format on // clang-format on
...@@ -107,7 +107,8 @@ inline void throw_on_error(cublasStatus_t stat, const Args&... args) { ...@@ -107,7 +107,8 @@ inline void throw_on_error(cublasStatus_t stat, const Args&... args) {
} else if (stat == CUBLAS_STATUS_LICENSE_ERROR) { } else if (stat == CUBLAS_STATUS_LICENSE_ERROR) {
ss << "CUBLAS: license error"; ss << "CUBLAS: license error";
} }
throw std::runtime_error(ss + ", " + string::Sprintf(args...) + ss << ", ";
throw std::runtime_error(ss + string::Sprintf(args...) +
string::Sprintf(" at [%s:%s];", __FILE__, __LINE__)); string::Sprintf(" at [%s:%s];", __FILE__, __LINE__));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册