We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8546815 commit 0acddd6Copy full SHA for 0acddd6
torch/backends/cudnn/__init__.py
@@ -74,12 +74,17 @@ def version():
74
}
75
76
77
+def is_available():
78
+ r"""Returns a bool indicating if CUDNN is currently available."""
79
+ return torch._C.has_cudnn
80
+
81
82
def is_acceptable(tensor):
83
if not torch._C._get_cudnn_enabled():
84
return False
85
if tensor.type() not in CUDNN_TENSOR_TYPES:
86
- if not torch._C.has_cudnn:
87
+ if not is_available():
88
warnings.warn(
89
"PyTorch was compiled without cuDNN support. To use cuDNN, rebuild "
90
"PyTorch making sure the library is visible to the build system.")
0 commit comments