提交 4f8afc39 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fixes that Fred suggested

上级 862dd0b4
...@@ -69,9 +69,10 @@ def test_gpualloc(): ...@@ -69,9 +69,10 @@ def test_gpualloc():
def test_gpuspecifyshape(): def test_gpuspecifyshape():
x = theano.shared(numpy.ones(3,dtype='float32'), 'x') x = cuda.shared_constructor(numpy.ones(3,dtype='float32'), 'x')
m = theano.tensor.specify_shape(x + numpy.float32(1), (3,)) m = theano.tensor.specify_shape(x + numpy.float32(1), (3,))
f = theano.function([], updates={x:m * numpy.float32(2)}) f = theano.function([], updates={x:m * numpy.float32(2)},
mode=mode_with_gpu)
l = f.maker.env.toposort() l = f.maker.env.toposort()
assert not numpy.any([isinstance(x.op, cuda.HostFromGpu) for x in l]) assert not numpy.any([isinstance(x.op, cuda.HostFromGpu) for x in l])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论