Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3c70a1

Browse files
reedwmtensorflower-gardener
authored andcommitted
Remove environmental variable TF_USE_CUDNN.
This environmental variable was deprecated and useless. cuDNN was still required to run TensorFlow even if the variable was set to 0. I will remove code dead code that uses the CanUseCudnn in a subsequent change. PiperOrigin-RevId: 326851365 Change-Id: Ie2cde09a8a4913125b6c0bfe8ae52da816f80887
1 parent 26c4ee0 commit d3c70a1

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ stjohnso98, <NAME>, <HERE>, <USING>, <GITHUB>, <HANDLE>
261261
* Mutable tables now restore checkpointed values when loaded from SavedModel.
262262
* GPU
263263
* TF 2.3 includes PTX kernels only for [compute capability](https://developer.nvidia.com/cuda-gpus) 7.0 to reduce the TF pip binary size. Earlier releases included PTX for a variety of older compute capabilities.
264+
* Remove environmental variable `TF_USE_CUDNN`.
264265
* Others
265266
* Retain parent namescope for ops added inside `tf.while_loop`/`tf.cond`/`tf.switch_case`.
266267
* Update `tf.vectorized_map` to support vectorizing `tf.while_loop` and TensorList operations.

tensorflow/core/util/use_cudnn.cc

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,8 @@ limitations under the License.
2222

2323
namespace tensorflow {
2424

25-
bool CanUseCudnn() {
26-
static bool is_enabled = [] {
27-
bool is_enabled = true;
28-
// TODO(b/155239286): Remove TF_USE_CUDNN after TF 2.3 is released.
29-
Status status =
30-
ReadBoolFromEnvVar("TF_USE_CUDNN", /*default_val=*/true, &is_enabled);
31-
if (!status.ok()) {
32-
LOG(ERROR) << status;
33-
}
34-
if (!is_enabled) {
35-
LOG(WARNING) << "The environmental variable TF_USE_CUDNN is deprecated "
36-
"and will be ignored in the future";
37-
}
38-
return is_enabled;
39-
}();
40-
return is_enabled;
41-
}
25+
// TODO(b/155239286): Remove this function
26+
bool CanUseCudnn() { return true; }
4227

4328
#define ADD_BOOL_CUDNN_FLAG(func_name, flag_name, default_value) \
4429
bool func_name() { \

0 commit comments

Comments
 (0)