提交 93e573a4 authored 作者: --global's avatar --global

Ensure that the Scan node gets moved on the gpu

上级 2bd5f25d
......@@ -1376,6 +1376,14 @@ class T_Scan(unittest.TestCase):
output, _ = theano.scan(lambda : rs.uniform((3,)), n_steps=3)
cPickle.loads(cPickle.dumps(output))
# Also ensure that, after compilation, the Scan has been moved
# on the gpu
fct = theano.function([], output, mode=mode_with_gpu)
scan_nodes = self.scan_nodes_from_fct(fct)
assert len(scan_nodes) == 1
assert (scan_nodes[0].op.info.get('gpu', False) or
scan_nodes[0].op.info.get('gpua', False))
def test_cuda_gibbs_chain(self):
from theano.sandbox import cuda
if not cuda.cuda_available:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论