提交 79582f25 authored 作者: Frederic Bastien's avatar Frederic Bastien

Give more information why we skipped a test.

上级 484a4576
......@@ -7,15 +7,20 @@ import theano.gpuarray
if theano.gpuarray.pygpu is None:
raise SkipTest("pygpu not installed")
init_error = None
if (not theano.gpuarray.pygpu_activated and
not theano.config.force_device):
try:
theano.gpuarray.init_dev('cuda')
except Exception:
pass
except Exception as e:
init_error = e
if not theano.gpuarray.pygpu_activated:
raise SkipTest("pygpu disabled")
if init_error:
raise SkipTest(e)
else:
raise SkipTest("pygpu disabled")
test_ctx_name = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论