From f0ee1592809a872830020bee0892d85f2c602c63 Mon Sep 17 00:00:00 2001 From: Zhang Ting Date: Thu, 18 Feb 2021 21:49:00 +0800 Subject: [PATCH] enable exhaustive_search for forward and backward algos when dtype is float16 (#30959) * enable exhaustive_search for input_grad when dtype is float16 * enable exhaustive_search for forward algos --- paddle/fluid/operators/conv_cudnn_helper.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/conv_cudnn_helper.h b/paddle/fluid/operators/conv_cudnn_helper.h index 82c8aa50afc..9825fcd8a6a 100644 --- a/paddle/fluid/operators/conv_cudnn_helper.h +++ b/paddle/fluid/operators/conv_cudnn_helper.h @@ -203,7 +203,6 @@ struct SearchAlgorithm { const framework::ExecutionContext& ctx) { auto dtype = platform::CudnnDataType::type; bool has_got_workspace_size = true; - bool exhaustive = (exhaustive_search) & (dtype != CUDNN_DATA_HALF); size_t workspace_size_limit = FLAGS_conv_workspace_size_limit * 1024 * 1024; size_t workspace_size = 0; algo_t algo; @@ -227,7 +226,7 @@ struct SearchAlgorithm { } #endif - if (!exhaustive && !deterministic) { + if (!exhaustive_search && !deterministic) { #if CUDNN_VERSION >= 7001 int perf_count; int best_algo_idx = 0; @@ -337,7 +336,6 @@ struct SearchAlgorithm { bool deterministic, const framework::ExecutionContext& ctx) { auto dtype = platform::CudnnDataType::type; - bool exhaustive = (exhaustive_search) & (dtype != CUDNN_DATA_HALF); size_t workspace_size_limit = FLAGS_conv_workspace_size_limit * 1024 * 1024; size_t workspace_size = 0; bool has_got_workspace_size = true; @@ -361,7 +359,7 @@ struct SearchAlgorithm { } #endif - if (!exhaustive && !deterministic) { + if (!exhaustive_search && !deterministic) { #if CUDNN_VERSION >= 7001 int perf_count; int best_algo_idx = 0; -- GitLab