From 1cbb282d7774539a809d32f45bb9b443f56485a7 Mon Sep 17 00:00:00 2001 From: Huihuang Zheng Date: Mon, 21 Dec 2020 17:23:19 +0800 Subject: [PATCH] Add Retry Logic to CublasHandlerHolder Add Retry Logic to CublasHandlerHolder to avoid random unittest failure. --- paddle/fluid/platform/cuda_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/platform/cuda_helper.h b/paddle/fluid/platform/cuda_helper.h index 2a1f0b9ac5c..9357d5db17c 100644 --- a/paddle/fluid/platform/cuda_helper.h +++ b/paddle/fluid/platform/cuda_helper.h @@ -86,7 +86,7 @@ class CublasHandleHolder { dynload::cublasSetMathMode(handle_, CUBLAS_TENSOR_OP_MATH)); #if CUDA_VERSION >= 11000 } else if (math_type == CUBLAS_TF32_TENSOR_OP_MATH) { - PADDLE_ENFORCE_CUDA_SUCCESS( + PADDLE_RETRY_CUDA_SUCCESS( dynload::cublasSetMathMode(handle_, CUBLAS_TF32_TENSOR_OP_MATH)); #endif // CUDA_VERSION >= 11000 } -- GitLab