提交 b9daa6b9 authored 作者: Frederic's avatar Frederic

skip cuda tests with opencl back-end.

上级 6131797e
import theano
from theano import scalar, gof from theano import scalar, gof
from theano.gof.python25 import all, any from theano.gof.python25 import all, any
from theano.tests.unittest_tools import SkipTest
from theano.tensor.tests.test_elemwise import (test_Broadcast, test_DimShuffle, from theano.tensor.tests.test_elemwise import (test_Broadcast, test_DimShuffle,
test_CAReduce, T_reduce_dtype) test_CAReduce, T_reduce_dtype)
...@@ -161,6 +163,11 @@ class test_GpuCAReduceCuda(test_GpuCAReduceCPY): ...@@ -161,6 +163,11 @@ class test_GpuCAReduceCuda(test_GpuCAReduceCPY):
def test_perform_nan(self): def test_perform_nan(self):
return return
def setUp(self):
dev = theano.sandbox.gpuarray.init_dev.device
if not dev.startswith('cuda'):
raise SkipTest("Cuda specific tests")
class T_gpureduce_dtype(T_reduce_dtype): class T_gpureduce_dtype(T_reduce_dtype):
mode = mode_with_gpu.excluding('local_cut_useless_reduce') mode = mode_with_gpu.excluding('local_cut_useless_reduce')
...@@ -172,6 +179,11 @@ class T_gpureduce_dtype(T_reduce_dtype): ...@@ -172,6 +179,11 @@ class T_gpureduce_dtype(T_reduce_dtype):
'uint8', 'uint16', 'uint32', 'uint64', 'uint8', 'uint16', 'uint32', 'uint64',
'float32', 'float64'] 'float32', 'float64']
def setUp(self):
dev = theano.sandbox.gpuarray.init_dev.device
if not dev.startswith('cuda'):
raise SkipTest("Cuda specific tests")
def speed_reduce10(): def speed_reduce10():
import numpy import numpy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论