From 97c2a9a9698b8e8364ed99b66ea4232c527ed042 Mon Sep 17 00:00:00 2001 From: liaogang Date: Wed, 19 Jul 2017 16:43:56 +0800 Subject: [PATCH] Fix: compiler error under gpu --- paddle/platform/enforce.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/platform/enforce.h b/paddle/platform/enforce.h index b6707659f2..6c1cd443c9 100644 --- a/paddle/platform/enforce.h +++ b/paddle/platform/enforce.h @@ -76,7 +76,7 @@ inline void throw_on_error(cudnnStatus_t stat, const Args&... args) { } else { // clang-format off throw std::runtime_error( - platform::dynload::cudnnGetErrorString(stat) + ", " + + platform::dynload::cudnnGetErrorString(stat) + string::Sprintf(args...) + string::Sprintf(" at [%s:%s];", __FILE__, __LINE__)); // clang-format on @@ -107,7 +107,8 @@ inline void throw_on_error(cublasStatus_t stat, const Args&... args) { } else if (stat == CUBLAS_STATUS_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__)); } -- GitLab