提交 1b24376f authored 作者: Josh Bleecher Snyder's avatar Josh Bleecher Snyder

issue a warning on import failure

上级 26282f7f
...@@ -22,4 +22,7 @@ try: ...@@ -22,4 +22,7 @@ try:
import pycuda.autoinit import pycuda.autoinit
pycuda_available = True pycuda_available = True
except ImportError: except ImportError:
pass # presumably, the user wanted to use pycuda, else they wouldn't have
# imported this module, so issue a warning that the import failed.
import warnings
warnings.warn("PyCUDA import failed in theano.misc.pycuda_init")
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论