提交 4c4327cf authored 作者: Melanie Ducoffe's avatar Melanie Ducoffe

correction of test_gpu_allocempty

上级 f9e0c574
...@@ -162,12 +162,11 @@ def test_gpuallocempty(): ...@@ -162,12 +162,11 @@ def test_gpuallocempty():
l_gpu = f_gpu.maker.fgraph.toposort() l_gpu = f_gpu.maker.fgraph.toposort()
assert numpy.any([isinstance(x.op, basic_ops.GpuAllocEmpty) for x in l_gpu]) assert numpy.any([isinstance(x.op, basic_ops.GpuAllocEmpty) for x in l_gpu])
f_cpu = theano.function([], tensor.AllocEmpty('int32')(2,3), f_cpu = theano.function([], tensor.AllocEmpty('int32')(2,3))
mode=mode_with_gpu) l_cpu = f_cpu.maker.fgraph.toposort()
l_cpu = f_gpu.maker.fgraph.toposort()
assert not numpy.any([isinstance(x.op, basic_ops.GpuAllocEmpty) for x in l_cpu]) assert not numpy.any([isinstance(x.op, basic_ops.GpuAllocEmpty) for x in l_cpu])
class Test_local_elemwise_alloc(test_opt.Test_local_elemwise_alloc): class Test_local_elemwise_alloc(test_opt.Test_local_elemwise_alloc):
dtype = 'float32' dtype = 'float32'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论