提交 7d44a89c authored 作者: carriepl's avatar carriepl 提交者: Frederic

Update and standardize error messages

上级 524438b6
......@@ -92,27 +92,13 @@ if ((err = cudnnCreate(&_handle)) != CUDNN_STATUS_SUCCESS) {
" from one version, but we link with"
" a different version %s" % str(v))
raise RuntimeError(dnn_available.msg)
if v == -1:
dnn_available.avail = False
dnn_available.msg = (
"CuDNN v1 detected. This version is no longer "
"supported by Theano. Update your CuDNN installation "
"to v3 or more recent")
raise RuntimeError(dnn_available.msg)
if v[0] < 3000:
dnn_available.avail = False
dnn_available.msg = (
"The detected CuDNN installation is older than CuDNN"
" v3. This isn't supported by Theano anymore. Update"
" your CuDNN installation to v3 or more recent.")
raise RuntimeError(dnn_available.msg)
if 3000 <= v[0] < 3007:
if v == -1 or v[0] < 3007:
# 3007 is the final release of cudnn v3
dnn_available.avail = False
dnn_available.msg = (
"You have installed a release candidate of CuDNN v3."
" This isn't supported anymore."
" Update to CuDNN v3 final version.")
"You have an old release of CuDNN (or a release "
"candidate) that isn't supported. Please update to "
"at least v3 final version.")
raise RuntimeError(dnn_available.msg)
return dnn_available.avail
......
......@@ -75,15 +75,11 @@ if ((err = cudnnCreate(&_handle)) != CUDNN_STATUS_SUCCESS) {
def _dnn_check_version():
v = version()
if v < 3000:
if v < 3007:
return False, (
"You have an old release of CuDNN (or a release candidate) "
"that isn't supported. Please update to at least v3 final "
"version.")
if 3000 <= v < 3007:
return False, (
"You have installed a release candidate of CuDNN v3. This "
"isn't supported. Please update to v3 final version.")
return True, None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论