提交 dce5ed7b authored 作者: Razvan Pascanu's avatar Razvan Pascanu

test for changeset 4495:cd27beb68a20, ticket 517

上级 c79a35b3
...@@ -48,7 +48,14 @@ def test_int_pow(): ...@@ -48,7 +48,14 @@ def test_int_pow():
#theano.printing.debugprint(f) #theano.printing.debugprint(f)
def test_gpualloc():
x = theano.shared(numpy.ones(3,dtype='float32'), 'x')
m = (x).dimshuffle(['x',0])
v = TT.alloc(1., *m.shape)
f = theano.function([], v+x)
l = f.maker.env.toposort()
assert numpy.any(ininstance(x.op, cuda.GpuAlloc) for x in l )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论