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

Give more information why we skipped a test.

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