Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Limit workspace for cudnnGet results #14326

Merged
merged 2 commits into from
Mar 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/operator/nn/cudnn/cudnn_convolution-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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) ?
Expand Down Expand Up @@ -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) ?
Expand Down Expand Up @@ -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;
}
Expand Down