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

Fix test when there is no c++ compiler

上级 8300633a
...@@ -44,7 +44,7 @@ def test_inter_process_cache(): ...@@ -44,7 +44,7 @@ def test_inter_process_cache():
x, y = theano.tensor.dvectors('xy') x, y = theano.tensor.dvectors('xy')
f = theano.function([x, y], [MyOp()(x), MyOp()(y)]) f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
f(numpy.arange(60), numpy.arange(60)) f(numpy.arange(60), numpy.arange(60))
if theano.config.mode == 'FAST_COMPILE': if theano.config.mode == 'FAST_COMPILE' or theano.config.cxx == "":
assert MyOp.nb_called == 0 assert MyOp.nb_called == 0
else: else:
assert MyOp.nb_called == 1 assert MyOp.nb_called == 1
...@@ -53,7 +53,7 @@ def test_inter_process_cache(): ...@@ -53,7 +53,7 @@ def test_inter_process_cache():
x, y = theano.tensor.dvectors('xy') x, y = theano.tensor.dvectors('xy')
f = theano.function([x, y], [MyOp()(x), MyOp()(y)]) f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
f(numpy.arange(60), numpy.arange(60)) f(numpy.arange(60), numpy.arange(60))
if theano.config.mode == 'FAST_COMPILE': if theano.config.mode == 'FAST_COMPILE' or theano.config.cxx == "":
assert MyOp.nb_called == 0 assert MyOp.nb_called == 0
else: else:
assert MyOp.nb_called == 1 assert MyOp.nb_called == 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论