提交 b65dc027 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

improved error message in test_driver

上级 aa68b41e
......@@ -28,7 +28,10 @@ def test_nvidia_driver1():
profile=False)
topo = f.maker.fgraph.toposort()
assert len(topo) == 2
assert sum(isinstance(node.op, B.GpuCAReduce) for node in topo) == 1
if sum(isinstance(node.op, B.GpuCAReduce) for node in topo) != 1:
msg = '\n\t'.join(['Expected exactly one occurrence of GpuCAReduce ' +
'but got:']+[str(app) for app in topo])
raise AssertionError(msg)
if not numpy.allclose(f(), a.sum()):
raise Exception("The nvidia driver version installed with this OS "
"does not give good results for reduction."
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论