提交 6e83c757 authored 作者: Frederic Bastien's avatar Frederic Bastien

Raise an error for Volta GPU and cuDNN lower then 7.0.2

上级 111b156e
...@@ -99,6 +99,17 @@ def init_dev(dev, name=None, preallocate=None): ...@@ -99,6 +99,17 @@ def init_dev(dev, name=None, preallocate=None):
MB = (1024 * 1024) MB = (1024 * 1024)
if dev.startswith('cuda'): if dev.startswith('cuda'):
avail = dnn.dnn_available(name) avail = dnn.dnn_available(name)
# On V100, cuDNN lower then 7002 don't raise error but
# takes hours to load! So raise a good user error.
if avail and dnn.version() < 7002:
bin_id = context.bin_id
assert bin_id.startswith("compute_"), context_bin_id
if int(bin_id[8:]) >= 70:
raise RuntimeError(
"You have cuDNN version %d, while the GPU is a Volta"
" genaration or more recent. This cause extreme"
" slowness, so we disable it."
" Use cuDNN 7.0.2 or higher." % (dnn.version()))
# If we try to enable cudnn and there isn't enough GPU # If we try to enable cudnn and there isn't enough GPU
# memory, there will be an unclear error message. So do # memory, there will be an unclear error message. So do
# not even try a clear error. # not even try a clear error.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论