提交 1f8b5a6f authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Skip tests that require C++ when there is no compiler.

上级 551efd1e
...@@ -252,6 +252,8 @@ class TestEnumTypes(TestCase): ...@@ -252,6 +252,8 @@ class TestEnumTypes(TestCase):
assert ref == out, (ref, out) assert ref == out, (ref, out)
def test_op_with_cenumtype(self): def test_op_with_cenumtype(self):
if theano.config.cxx == '':
raise SkipTest('need c++')
sizeof_int = MyOpCEnumType('int')() sizeof_int = MyOpCEnumType('int')()
sizeof_float = MyOpCEnumType('float')() sizeof_float = MyOpCEnumType('float')()
sizeof_long_long = MyOpCEnumType('long long')() sizeof_long_long = MyOpCEnumType('long long')()
......
...@@ -441,6 +441,8 @@ def test_reallocation(): ...@@ -441,6 +441,8 @@ def test_reallocation():
def test_no_recycling(): def test_no_recycling():
if theano.config.cxx == '':
raise SkipTest('need c++')
x = theano.tensor.vector() x = theano.tensor.vector()
for lnk in [vm.VM_Linker(use_cloop=True), for lnk in [vm.VM_Linker(use_cloop=True),
vm.VM_Linker(use_cloop=False, lazy=True), vm.VM_Linker(use_cloop=False, lazy=True),
......
...@@ -770,6 +770,10 @@ class TestAbstractConvNoOptim(BaseTestConv2d): ...@@ -770,6 +770,10 @@ class TestAbstractConvNoOptim(BaseTestConv2d):
mode=mode) mode=mode)
def tcase_gi(self, i, f, o, s, b, flip, provide_shape, fd=(1, 1), expect_error=False): def tcase_gi(self, i, f, o, s, b, flip, provide_shape, fd=(1, 1), expect_error=False):
if not theano.config.cxx:
raise SkipTest("Need cxx to test conv2d")
mode = theano.Mode(optimizer=None) mode = theano.Mode(optimizer=None)
if not expect_error: if not expect_error:
self.run_gradinput(inputs_shape=i, filters_shape=f, self.run_gradinput(inputs_shape=i, filters_shape=f,
...@@ -904,6 +908,9 @@ class TestCpuConv2d(BaseTestConv2d): ...@@ -904,6 +908,9 @@ class TestCpuConv2d(BaseTestConv2d):
filter_dilation=fd) filter_dilation=fd)
def tcase_gi(self, i, f, o, s, b, flip, provide_shape, fd=(1, 1), expect_error=False): def tcase_gi(self, i, f, o, s, b, flip, provide_shape, fd=(1, 1), expect_error=False):
if not theano.config.cxx:
raise SkipTest("Need cxx to test conv2d")
if fd != (1, 1): if fd != (1, 1):
raise SkipTest("No dilation implementation for basic cpu ConvOp.") raise SkipTest("No dilation implementation for basic cpu ConvOp.")
mode = self.mode mode = self.mode
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论