提交 c9bb9b81 authored 作者: slefrancois's avatar slefrancois

add new backend flags to config, set doc version to 0.9 dev

上级 3e3ba8f8
...@@ -60,9 +60,9 @@ copyright = '2008--2016, LISA lab' ...@@ -60,9 +60,9 @@ copyright = '2008--2016, LISA lab'
# other places throughout the built documents. # other places throughout the built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.8' version = '0.9'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.8.0' release = '0.9 dev'
# There are two options for replacing |today|: either, you set today to some # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:
......
...@@ -51,11 +51,11 @@ Environment Variables ...@@ -51,11 +51,11 @@ Environment Variables
.. code-block:: bash .. code-block:: bash
THEANO_FLAGS='floatX=float32,device=gpu0,lib.cnmem=1' python <myscript>.py THEANO_FLAGS='floatX=float32,device=cuda0,lib.cnmem=1' python <myscript>.py
If a value is defined several times in ``THEANO_FLAGS``, If a value is defined several times in ``THEANO_FLAGS``,
the right-most definition is used. So, for instance, if the right-most definition is used. So, for instance, if
``THEANO_FLAGS='device=cpu,device=gpu0'``, then gpu0 will be used. ``THEANO_FLAGS='device=cpu,device=cuda0'``, then cuda0 will be used.
.. envvar:: THEANORC .. envvar:: THEANORC
...@@ -70,7 +70,7 @@ Environment Variables ...@@ -70,7 +70,7 @@ Environment Variables
[global] [global]
floatX = float32 floatX = float32
device = gpu0 device = cuda0
[lib] [lib]
cnmem = 1 cnmem = 1
...@@ -102,22 +102,18 @@ import theano and print the config variable, as in: ...@@ -102,22 +102,18 @@ import theano and print the config variable, as in:
.. attribute:: device .. attribute:: device
String value: either ``'cpu'``, ``'gpu'``, ``'gpu0'``, ``'gpu1'``, String value: either ``'cpu'``, ``'cuda'``, ``'cuda0'``, ``'cuda1'``,
``'gpu2'``, or ``'gpu3'`` ``'opencl0'``, or ``'opencl1'`` ...
Default device for computations. If ``gpu*``, change the default to try Default device for computations. If ``'cuda*``, change the default to try
to move computation to it and to put shared variable of float32 on to move computation to the GPU using CUDA libraries. If ``'opencl*'``,
it. the openCL libraries will be used. To let the driver select the device,
Choose the default compute device for theano graphs. Setting this to a use ``'cuda'`` or ``'opencl'``. If we are not able to use the GPU,
``gpu*`` string will make theano to try by default to move computation to it. either we fall back on the CPU, or an error is raised, depending on the :attr:`force_device` flag.
Also it will make theano put by default shared variable of float32 on it.
``'gpu'`` lets the driver select the GPU to use, while ``'gpu?'`` makes Theano try
to use a specific device. If we are not able to use the GPU, either we fall back
on the CPU, or an error is raised, depending on the :attr:`force_device` flag.
This flag's value cannot be modified during the program execution. This flag's value cannot be modified during the program execution.
Do not use upper case letters, only lower case even if NVIDIA use Do not use upper case letters, only lower case even if NVIDIA uses
capital letters. capital letters.
.. attribute:: force_device .. attribute:: force_device
...@@ -138,11 +134,12 @@ import theano and print the config variable, as in: ...@@ -138,11 +134,12 @@ import theano and print the config variable, as in:
.. attribute:: init_gpu_device .. attribute:: init_gpu_device
String value: either ``''``, ``'gpu'``, ``'gpu0'``, ``'gpu1'``, ``'gpu2'``, String value: either ``''``, ``'cuda'``, ``'cuda0'``, ``'cuda1'``,
or ``'gpu3'`` ``'opencl0'``, or ``'opencl1'`` ...
Initialize the gpu device to use. Initialize the gpu device to use.
When its value is gpu*, the theano flag :attr:`device` must be ``"cpu"``. When its value is cuda* or opencl*, the theano flag :attr:`device` must
be ``"cpu"``.
Unlike :attr:`device`, setting this flag to a specific GPU will not Unlike :attr:`device`, setting this flag to a specific GPU will not
try to use this device by default, in particular it will **not** move try to use this device by default, in particular it will **not** move
computations, nor shared variables, to the specified GPU. computations, nor shared variables, to the specified GPU.
......
...@@ -104,10 +104,9 @@ class DeviceParam(ConfigParam): ...@@ -104,10 +104,9 @@ class DeviceParam(ConfigParam):
AddConfigVar( AddConfigVar(
'device', 'device',
("Default device for computations. If gpu*, change the default to try " ("Default device for computations. If cuda* or opencl*, change the
"to move computation to it and to put shared variable of float32 " "default to try to move computation to the GPU. Do not use upper case"
"on it. Do not use upper case letters, only lower case even if " "letters, only lower case even if NVIDIA uses capital letters."),
"NVIDIA use capital letters."),
DeviceParam('cpu', allow_override=False), DeviceParam('cpu', allow_override=False),
in_c_key=False) in_c_key=False)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论