提交 953177d4 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Skip the gpuarray tests is init_gpu_device == gpu*

上级 5c7cf36f
...@@ -5,13 +5,9 @@ import theano.sandbox.gpuarray ...@@ -5,13 +5,9 @@ import theano.sandbox.gpuarray
if theano.sandbox.gpuarray.pygpu is None: if theano.sandbox.gpuarray.pygpu is None:
raise SkipTest("pygpu not installed") raise SkipTest("pygpu not installed")
if not theano.sandbox.gpuarray.pygpu_activated: if (not theano.sandbox.gpuarray.pygpu_activated and
import theano.sandbox.cuda as cuda_ndarray not theano.config.init_gpu_device.startswith('gpu')):
if cuda_ndarray.cuda_available: theano.sandbox.gpuarray.init_dev('cuda')
cuda_ndarray.use('gpu', default_to_move_computation_to_gpu=False,
move_shared_float32_to_gpu=False,
enable_cuda=False)
theano.sandbox.gpuarray.init_dev('cuda')
if not theano.sandbox.gpuarray.pygpu_activated: if not theano.sandbox.gpuarray.pygpu_activated:
raise SkipTest("pygpu disabled") raise SkipTest("pygpu disabled")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论