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

Commit

Permalink
Limit workspace for cudnnGet results (#14326)
Browse files Browse the repository at this point in the history
* Limit workspace for cudnnGet results

* Retrigger CI
  • Loading branch information
ptrendx authored and szha committed Mar 6, 2019
1 parent d6eafca commit 111b881
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 111b881

Please sign in to comment.