提交 a117388e authored 作者: Frederic Bastien's avatar Frederic Bastien

Correctly skip test when cudnn isn't available.

上级 47445fc1
......@@ -171,7 +171,7 @@ def test_pooling():
raise SkipTest(dnn.dnn_available.msg)
# 'average_exc_pad' is disabled for versions < 4004
if dnn.version() < 4004:
if dnn.version(False) < 4004:
modes = ('max', 'average_inc_pad')
else:
modes = ('max', 'average_inc_pad', 'average_exc_pad')
......@@ -464,7 +464,7 @@ class TestDnnInferShapes(utt.InferShapeTester):
[conv_modes[0]])),
testcase_func_name=utt.custom_name_func)
def test_conv(self, algo, border_mode, conv_mode):
if algo == 'winograd' and dnn.version() < 5000:
if algo == 'winograd' and dnn.version(False) < 5000:
raise SkipTest(dnn.dnn_available.msg)
self._test_conv(T.ftensor4('img'),
......@@ -597,7 +597,7 @@ class TestDnnInferShapes(utt.InferShapeTester):
)
# 'average_exc_pad' is disabled for versions < 4004
if dnn.version() < 4004:
if dnn.version(False) < 4004:
modes = ['max', 'average_inc_pad']
else:
modes = ['max', 'average_inc_pad', 'average_exc_pad']
......@@ -895,7 +895,7 @@ class test_SoftMax(test_nnet.test_SoftMax):
def test_log_softmax(self):
# This is a test for an optimization that depends on CuDNN v3 or
# more recent. Don't test if the CuDNN version is too old.
if dnn.version() < 3000:
if dnn.version(False) < 3000:
raise SkipTest("Log-softmax is only in cudnn v3+")
x = T.ftensor4()
......@@ -936,7 +936,7 @@ class test_SoftMax(test_nnet.test_SoftMax):
# This is a test for an optimization that depends on CuDNN v3 or
# more recent. Don't test if the CuDNN version is too old.
if dnn.version() < 3000:
if dnn.version(False) < 3000:
raise SkipTest("Log-softmax is only in cudnn v3+")
# Compile a reference function, on the CPU, to be used to validate the
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论