提交 ecdfbb8c authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: GitHub

Merge pull request #6173 from abergeron/fix_nogpp

Fix tests that always expect a C compiler
......@@ -455,7 +455,7 @@ if param and os.name == 'nt':
def warn_cxx(val):
"""We only support clang++ as otherwise we hit strange g++/OSX bugs."""
if sys.platform == 'darwin' and 'clang++' not in val:
if sys.platform == 'darwin' and val and 'clang++' not in val:
_logger.warning("Only clang++ is supported. With g++,"
" we end up with strange g++/OSX bugs.")
return True
......
......@@ -252,6 +252,8 @@ class TestEnumTypes(TestCase):
assert ref == out, (ref, out)
def test_op_with_cenumtype(self):
if theano.config.cxx == '':
raise SkipTest('need c++')
sizeof_int = MyOpCEnumType('int')()
sizeof_float = MyOpCEnumType('float')()
sizeof_long_long = MyOpCEnumType('long long')()
......
......@@ -441,6 +441,8 @@ def test_reallocation():
def test_no_recycling():
if theano.config.cxx == '':
raise SkipTest('need c++')
x = theano.tensor.vector()
for lnk in [vm.VM_Linker(use_cloop=True),
vm.VM_Linker(use_cloop=False, lazy=True),
......
......@@ -771,6 +771,10 @@ class TestAbstractConvNoOptim(BaseTestConv2d):
mode=mode)
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)
if not expect_error:
self.run_gradinput(inputs_shape=i, filters_shape=f,
......@@ -905,6 +909,9 @@ class TestCpuConv2d(BaseTestConv2d):
filter_dilation=fd)
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):
raise SkipTest("No dilation implementation for basic cpu ConvOp.")
mode = self.mode
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论