From 4d411f4d0afde78422288f8a995df4518d812315 Mon Sep 17 00:00:00 2001 From: Przemek Tredak Date: Fri, 1 Mar 2019 13:06:54 -0800 Subject: [PATCH 1/2] Limit workspace for cudnnGet results --- src/operator/nn/cudnn/cudnn_convolution-inl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/operator/nn/cudnn/cudnn_convolution-inl.h b/src/operator/nn/cudnn/cudnn_convolution-inl.h index e11f7cc81d25..66df82e4395e 100644 --- a/src/operator/nn/cudnn/cudnn_convolution-inl.h +++ b/src/operator/nn/cudnn/cudnn_convolution-inl.h @@ -750,7 +750,7 @@ class CuDNNConvolutionOp { i = 0; while (i < nalgo && (fwd_algo[i].status != CUDNN_STATUS_SUCCESS - || (param_.cudnn_tune.value() == conv::kLimited + || (param_.cudnn_tune.value() != conv::kFastest && fwd_algo[i].memory > workspace_byte))) { ++i; min_memory_needs = @@ -787,7 +787,7 @@ class CuDNNConvolutionOp { i = 0; while (i < nalgo && (bwd_filter_algo[i].status != CUDNN_STATUS_SUCCESS - || (param_.cudnn_tune.value() == conv::kLimited + || (param_.cudnn_tune.value() != conv::kFastest && bwd_filter_algo[i].memory > workspace_byte))) { ++i; min_memory_needs = (i == 0) ? @@ -825,7 +825,7 @@ class CuDNNConvolutionOp { i = 0; while (i < nalgo && (bwd_data_algo[i].status != CUDNN_STATUS_SUCCESS - || (param_.cudnn_tune.value() == conv::kLimited + || (param_.cudnn_tune.value() != conv::kFastest && bwd_data_algo[i].memory > workspace_byte))) { ++i; min_memory_needs = (i == 0) ? @@ -924,7 +924,7 @@ class CuDNNConvolutionOp { #if CUDNN_MAJOR >= 7 (!enforce_determinism || result.determinism == cudnnDeterminism_t::CUDNN_DETERMINISTIC) && #endif - (param_.cudnn_tune.value() != conv::kLimited || result.memory <= workspace_byte)) { + (param_.cudnn_tune.value() == conv::kFastest || result.memory <= workspace_byte)) { algo->Set(result.algo, algo_is_tensor_core); return; } From 7ef11e6ec12574b1dac66415a191032dbe4bb24f Mon Sep 17 00:00:00 2001 From: Przemek Tredak Date: Tue, 5 Mar 2019 08:41:11 -0800 Subject: [PATCH 2/2] Retrigger CI