未验证 提交 4f100396 编写于 作者: W Wu Yi 提交者: GitHub

Merge pull request #12392 from typhoonzero/fix_cudnn_enforce

fix cudnn enforce
...@@ -59,13 +59,12 @@ inline const char* cudnnGetErrorString(cudnnStatus_t status) { ...@@ -59,13 +59,12 @@ inline const char* cudnnGetErrorString(cudnnStatus_t status) {
#define CUDNN_VERSION_MIN(major, minor, patch) \ #define CUDNN_VERSION_MIN(major, minor, patch) \
(CUDNN_VERSION >= ((major)*1000 + (minor)*100 + (patch))) (CUDNN_VERSION >= ((major)*1000 + (minor)*100 + (patch)))
#define CUDNN_ENFORCE(condition) \ #define CUDNN_ENFORCE(condition) \
do { \ do { \
cudnnStatus_t status = condition; \ cudnnStatus_t status = condition; \
if (status != CUDNN_STATUS_SUCCESS) { \ if (UNLIKELY(status != CUDNN_STATUS_SUCCESS)) { \
VLOG(1) << ::paddle::platform::cudnnGetErrorString(status); \ PADDLE_THROW(::paddle::platform::cudnnGetErrorString(status)); \
PADDLE_THROW("cuDNN call failed"); \ } \
} \
} while (false) } while (false)
enum class DataLayout { // Not use enum class DataLayout { // Not use
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册