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

Fix problems when it is cudnn v5 that is installed.

上级 53a1ebd9
...@@ -88,6 +88,9 @@ class CuDNNV51(object): ...@@ -88,6 +88,9 @@ class CuDNNV51(object):
cudnnBatchNormMode_t = CEnumType(('CUDNN_BATCHNORM_PER_ACTIVATION', 'per-activation'), cudnnBatchNormMode_t = CEnumType(('CUDNN_BATCHNORM_PER_ACTIVATION', 'per-activation'),
('CUDNN_BATCHNORM_SPATIAL', 'spatial'), ('CUDNN_BATCHNORM_SPATIAL', 'spatial'),
ctype='cudnnBatchNormMode_t') ctype='cudnnBatchNormMode_t')
# It was introduced in cudnnv6, but we need to define it with an
# empty list of enum to don't crash with cudnn 5
cudnnReduceTensorOp_t = CEnumType()
class CuDNNV6(CuDNNV51): class CuDNNV6(CuDNNV51):
......
...@@ -1437,7 +1437,7 @@ def dnn_reduction(nd, idtype, acc_dtype, odtype): ...@@ -1437,7 +1437,7 @@ def dnn_reduction(nd, idtype, acc_dtype, odtype):
def test_dnn_reduction_opt(): def test_dnn_reduction_opt():
if not dnn.dnn_available(test_ctx_name): if not dnn.dnn_available(test_ctx_name) or dnn.version(raises=False) < 6000:
raise SkipTest(dnn.dnn_available.msg) raise SkipTest(dnn.dnn_available.msg)
for nd in range(1, 9): for nd in range(1, 9):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论