提交 842732a7 authored 作者: Frederic's avatar Frederic

Fix test caused by new optimization.

上级 db4f55c5
...@@ -80,7 +80,8 @@ def test_gpualloc(): ...@@ -80,7 +80,8 @@ def test_gpualloc():
x = theano.shared(numpy.ones(3, dtype='float32'), 'x') x = theano.shared(numpy.ones(3, dtype='float32'), 'x')
m = (x).dimshuffle(['x', 0]) m = (x).dimshuffle(['x', 0])
v = tensor.alloc(1., *m.shape) v = tensor.alloc(1., *m.shape)
f = theano.function([], v + x, mode=mode_with_gpu) f = theano.function([], v + x,
mode=mode_with_gpu.excluding("local_alloc_elemwise"))
l = f.maker.fgraph.toposort() l = f.maker.fgraph.toposort()
assert numpy.any([isinstance(x.op, cuda.GpuAlloc) for x in l]) assert numpy.any([isinstance(x.op, cuda.GpuAlloc) for x in l])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论