提交 230664d8 authored 作者: slefrancois's avatar slefrancois

Updated doc to move gpuarray out of sandbox

上级 4235e6cd
.. _libdoc_gpuarray_dnn:
===========================================
:mod:`theano.sandbox.gpuarray.dnn` -- cuDNN
:mod:`gpuarray.dnn` -- cuDNN
===========================================
.. moduleauthor:: LISA
......
......@@ -2,7 +2,7 @@
.. _libdoc_gpuarray:
=======================================================
:mod:`theano.sandbox.gpuarray` -- The (new) GPU backend
:mod:`gpuarray` -- The (new) GPU backend
=======================================================
.. module:: theano.sandbox.gpuarray
......
.. _libdoc_gpuarray_type:
===================================================
:mod:`theano.sandbox.gpuarray.type` -- Type classes
:mod:`gpuarray.type` -- Type classes
===================================================
.. automodule:: theano.sandbox.gpuarray.type
......
......@@ -14,7 +14,6 @@
:maxdepth: 1
cuda/index
gpuarray/index
linalg
neighbours
rng_mrg
......@@ -393,7 +393,7 @@ into a file and run it.
.. testcode::
from theano import function, config, shared, tensor, sandbox
from theano import function, config, shared, tensor
import numpy
import time
......@@ -461,7 +461,7 @@ the GPU object directly. The following code is modifed to do just that.
.. testcode::
from theano import function, config, shared, tensor, sandbox
from theano import function, config, shared, tensor, gpuarray
import numpy
import time
......@@ -470,7 +470,7 @@ the GPU object directly. The following code is modifed to do just that.
rng = numpy.random.RandomState(22)
x = shared(numpy.asarray(rng.rand(vlen), config.floatX))
f = function([], sandbox.gpuarray.basic_ops.gpu_from_host(tensor.exp(x)))
f = function([], sandbox.gpuarray.basic_ops.GpuFromHost(None)(tensor.exp(x)))
print(f.maker.fgraph.toposort())
t0 = time.time()
for i in range(iters):
......@@ -485,9 +485,10 @@ the GPU object directly. The following code is modifed to do just that.
else:
print('Used the gpu')
Here the :func:`theano.sandbox.gpuarray.basic.gpu_from_host` call
means "copy input to the GPU". However during the optimization phase,
since the result will already be on th gpu, it will be removed. It is
Here the :func:`theano.sandbox.gpuarray.basic_ops.GpuFromHost(None)` call
means "copy input to the GPU", with ``None`` the default GPU context when not
explicitly given. However during the optimization phase,
since the result will already be on the gpu, it will be removed. It is
used here to tell theano that we want the result on the GPU.
The output is
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论