提交 7d6647dd authored 作者: Frederic's avatar Frederic

Fix crash at import

上级 8ae6abce
...@@ -1337,8 +1337,10 @@ conv_groupopt.register('conv_fft_full', local_conv_fft_full, 10, ...@@ -1337,8 +1337,10 @@ conv_groupopt.register('conv_fft_full', local_conv_fft_full, 10,
# cuDNN is the second, but only registered if cuDNN is available. # cuDNN is the second, but only registered if cuDNN is available.
# It can be disabled by excluding 'conv_dnn' or 'cudnn'. # It can be disabled by excluding 'conv_dnn' or 'cudnn'.
from . import dnn from . import dnn
if dnn.dnn_available(): # We can't check at import if dnn is available, so we must always
conv_groupopt.register('local_conv_dnn', dnn.local_conv_dnn, 20, # register it. This do not cause problem as if it is not avail, the
# opt will do nothing.
conv_groupopt.register('local_conv_dnn', dnn.local_conv_dnn, 20,
'conv_dnn', 'conv_dnn',
'fast_compile', 'fast_run', 'cudnn') 'fast_compile', 'fast_run', 'cudnn')
# The GEMM-based convolution comes last to catch all remaining cases. # The GEMM-based convolution comes last to catch all remaining cases.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论