提交 8911a6b7 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Skip test if cuda not available

上级 497822cb
...@@ -2649,6 +2649,11 @@ class test_shapeoptimizer(unittest.TestCase): ...@@ -2649,6 +2649,11 @@ class test_shapeoptimizer(unittest.TestCase):
def test_no_cycle(self): def test_no_cycle(self):
# Optimizing this graph resulted in a cycle, see gh-1549 # Optimizing this graph resulted in a cycle, see gh-1549
# This test depends on cuda
import theano.sandbox.cuda as cuda
if not cuda.cuda_available:
raise SkipTest("cuda not available")
pkl_filename = os.path.join(os.path.dirname(theano.__file__), pkl_filename = os.path.join(os.path.dirname(theano.__file__),
'tensor', 'tests', 'shape_opt_cycle.pkl') 'tensor', 'tests', 'shape_opt_cycle.pkl')
fn_args = pickle.load(open(pkl_filename, "rb")) fn_args = pickle.load(open(pkl_filename, "rb"))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论