提交 22124f18 authored 作者: Frederic Bastien's avatar Frederic Bastien

Move all the cudnn version check/warning at the same place.

上级 2b07fc48
...@@ -55,12 +55,6 @@ def init_dev(dev, name=None): ...@@ -55,12 +55,6 @@ def init_dev(dev, name=None):
if init_dev.dnn_version is None and dev.startswith('cuda'): if init_dev.dnn_version is None and dev.startswith('cuda'):
try: try:
init_dev.dnn_version = dnn.version() init_dev.dnn_version = dnn.version()
# 5200 should not print warning with cudnn 5.1 final.
if init_dev.dnn_version >= 5200:
warnings.warn("Your cuDNN version is more recent than "
"Theano. If you encounter problems, try "
"updating Theano or downgrading cuDNN to "
"version 5.1.")
if config.print_active_device: if config.print_active_device:
print("Using cuDNN version %d" % init_dev.dnn_version, print("Using cuDNN version %d" % init_dev.dnn_version,
file=sys.stderr) file=sys.stderr)
......
...@@ -131,7 +131,12 @@ def _dnn_check_version(): ...@@ -131,7 +131,12 @@ def _dnn_check_version():
v = version() v = version()
if v < 5000: if v < 5000:
return False, "cuDNN version is too old. Update to v5, was %d." % v return False, "cuDNN version is too old. Update to v5, was %d." % v
# 5200 should not print warning with cudnn 5.1 final.
if version >= 5200:
warnings.warn("Your cuDNN version is more recent than "
"Theano. If you encounter problems, try "
"updating Theano or downgrading cuDNN to "
"version 5.1.")
return True, None return True, None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论