Merge pull request #12392 from typhoonzero/fix_cudnn_enforce

fix cudnn enforce
bugfix/anakin-compile
Wu Yi 7 years ago committed by GitHub
commit 4f10039659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,13 +59,12 @@ inline const char* cudnnGetErrorString(cudnnStatus_t status) {
#define CUDNN_VERSION_MIN(major, minor, patch) \
(CUDNN_VERSION >= ((major)*1000 + (minor)*100 + (patch)))
#define CUDNN_ENFORCE(condition) \
do { \
cudnnStatus_t status = condition; \
if (status != CUDNN_STATUS_SUCCESS) { \
VLOG(1) << ::paddle::platform::cudnnGetErrorString(status); \
PADDLE_THROW("cuDNN call failed"); \
} \
#define CUDNN_ENFORCE(condition) \
do { \
cudnnStatus_t status = condition; \
if (UNLIKELY(status != CUDNN_STATUS_SUCCESS)) { \
PADDLE_THROW(::paddle::platform::cudnnGetErrorString(status)); \
} \
} while (false)
enum class DataLayout { // Not use

Loading…
Cancel
Save