提交 0d20ed2e authored 作者: Frederic Bastien's avatar Frederic Bastien

skip test if cuda not installed

上级 0dae8f43
......@@ -10,9 +10,8 @@ import theano.tensor as T
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
try:
import theano.sandbox.cuda as cuda_ndarray
except ImportError:
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import theano.sandbox.cuda as tcn
......
......@@ -269,9 +269,8 @@ def test_bench_elemwise(n_iter=1000, **kwargs):
if conf.use_gpu:
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
try:
import cuda_ndarray
except ImportError:
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import theano.sandbox.cuda
theano.sandbox.cuda.use()
......
......@@ -7,9 +7,8 @@ import numpy
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
try:
import theano.sandbox.cuda as cuda_ndarray
except ImportError:
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import theano.sandbox.cuda as tcn
......
import sys, time
import numpy
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
def py_conv_valid_numpy(img, kern):
assert img.shape[1] == kern.shape[1]
outshp = (img.shape[0], kern.shape[0],
......
import time, copy, sys
import theano.sandbox.cuda as cuda_ndarray
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import numpy
def test_host_to_device():
......
......@@ -13,9 +13,8 @@ import numpy
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
try:
import theano.sandbox.cuda as cuda_ndarray
except ImportError:
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import theano.sandbox.cuda as tcn
......
......@@ -7,9 +7,8 @@ import numpy
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
try:
import theano.sandbox.cuda as cuda_ndarray
except ImportError:
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.enable_cuda == False:
raise SkipTest('Optional package cuda_ndarray not available')
import theano.compile.mode
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论