提交 7010a5da 编写于 作者: L liaogang

FIX: throw_on_error on cuda

上级 90c4cd83
...@@ -78,7 +78,7 @@ class EnforceNotMet : public std::exception { ...@@ -78,7 +78,7 @@ class EnforceNotMet : public std::exception {
template <typename... Args> template <typename... Args>
inline void throw_on_error(cudaError_t e, const Args&... args) { inline void throw_on_error(cudaError_t e, const Args&... args) {
if (UNLIKELY(!(e))) { if (e) {
std::stringstream ss; std::stringstream ss;
ss << ::paddle::string::Sprintf(args...); ss << ::paddle::string::Sprintf(args...);
ss << ::paddle::string::Sprintf(" at [%s:%s];", __FILE__, __LINE__); ss << ::paddle::string::Sprintf(" at [%s:%s];", __FILE__, __LINE__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册