Skip to content

Commit

Permalink
Merge 2d1e8ac into 413363b
Browse files Browse the repository at this point in the history
  • Loading branch information
niboshi committed Mar 15, 2018
2 parents 413363b + 2d1e8ac commit 2d72279
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/source/reference/core/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Note that the default values are set in the global config.
If it is ``False``, :func:`report` does not keep the computational graph when a :class:`Variable` object is reported.
It means that :func:`report` stores a copy of the :class:`Variable` object which is purged from the computational graph.
If it is ``True``, :func:`report` just stores the :class:`Variable` object as is with the computational graph left attached.
The default value is ``False``.
The default value is given by ``CHAINER_KEEP_GRAPH_ON_REPORT`` environment variable (set to 0 or 1) if available, otherwise uses ``False``.
``chainer.config.train``
Training mode flag.
If it is ``True``, Chainer runs in training mode.
Expand All @@ -68,7 +68,7 @@ Note that the default values are set in the global config.
- If it is ``'auto'``, Chainer will use cuDNN only if it is known that the usage does not degrade the performance.
- If it is ``'never'``, Chainer will never use cuDNN anywhere.

The default value is ``'auto'``.
The default value is given by ``CHAINER_USE_CUDNN`` environment variable (set to ``'always'``, ``'auto'`` or ``'never'``) if available, otherwise uses ``'auto'``.
``chainer.config.autotune``
Autotune for convolutional networks flag.
If it is ``True``, Chainer uses the cuDNN autotune feature to find the fastest calculation process for :class:`chainer.links.Convolution2D`, :class:`ConvolutionND`, :class:`Deconvolution2D`, or :class:`DeconvolutionND` links.
Expand Down
65 changes: 48 additions & 17 deletions docs/source/reference/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,51 @@ Environment variables
Here are the environment variables Chainer uses.


+------------------------+--------------------------------------------------------------------------+
| ``CHAINER_CUDNN`` | Set ``0`` to disable cuDNN in Chainer. |
| | Otherwise cuDNN is enabled automatically. |
+------------------------+--------------------------------------------------------------------------+
| ``CHAINER_SEED`` | Default seed value of random number generators for CUDA. |
| | If it is not set, the seed value is generated from Python random module. |
| | Set an integer value in decimal format. |
+------------------------+--------------------------------------------------------------------------+
| ``CHAINER_TYPE_CHECK`` | Set ``0`` to disable type checking. |
| | Otherwise type checking is enabled automatically. |
| | See :ref:`type-check-utils` for details. |
+------------------------+--------------------------------------------------------------------------+
| ``CHAINER_DEBUG`` | Set ``1`` to enable debug mode. It is disabled by default. |
| | In debug mode, Chainer performs various runtime checks that can help |
| | debug user's code at the cost of some overhead. |
| | For details, see :ref:`debug`. |
+------------------------+--------------------------------------------------------------------------+
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_SEED`` | Default seed value of random number generators for CUDA. |
| | If it is not set, the seed value is generated from Python random module. |
| | Set an integer value in decimal format. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_DATASET_ROOT`` | Default directory path to store the downloaded datasets. |
| | See :doc:`datasets` for details. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_CUDNN`` | Set ``0`` to completely disable cuDNN in Chainer. |
| | In this case, cuDNN will not be used regardless of ``CHAINER_USE_CUDNN`` and |
| | ``chainer.config.use_cudnn`` configuration. |
| | Otherwise cuDNN is enabled automatically. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_USE_CUDNN`` | Used as the default value for ``chainer.config.use_cudnn`` configuration. |
| | The value must be any of ``'always'``, ``'auto'`` or ``'never'``. |
| | If ``CHAINER_CUDNN`` is set to ``0``, this environment variable has no effect. |
| | See :ref:`configuration` for details. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_TYPE_CHECK`` | Used as the default value for ``chainer.config.type_check`` configuration. |
| | Set ``0`` to disable type checking. |
| | Otherwise type checking is enabled automatically. |
| | See :ref:`configuration` and :ref:`type-check-utils` for details. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_DEBUG`` | Used as the default value for ``chainer.config.debug`` configuration. |
| | Set ``1`` to enable debug mode. It is disabled by default. |
| | In debug mode, Chainer performs various runtime checks that can help |
| | debug user's code at the cost of some overhead. |
| | See :ref:`configuration` and :ref:`debug` for details. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_KEEP_GRAPH_ON_REPORT`` | Used as the default value for ``chainer.config.keep_graph_on_report`` configuration. |
| | Set ``1`` to let :func:`report` keep the computational graph. |
| | See :ref:`configuration` for details. |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+
| ``CHAINER_PYTHON_350_FORCE`` | Set ``1`` to force using Chainer with Python 3.5.0. |
| | Note that Chainer does not work with Python 3.5.0. |
| | Use Python 3.5.1+ or other supported versions (see :ref:`install-guide`). |
+-------------------------------------------+-------------------------------------------------------------------------------------------------------+

The following environment variables are only effective when running unit tests.

+------------------------------------------+----------------------------------------------------------------------------------------------------------------+
| ``CHAINER_TEST_GPU_LIMIT`` | Number of GPUs available for unit tests. |
| | When running unit test, test cases that require more GPUs than the specified value will be skipped. |
| | Set ``0`` to skip all test cases that require GPU. |
| | See :ref:`testing-guide` for details. |
+------------------------------------------+----------------------------------------------------------------------------------------------------------------+
| ``CHAINER_TEST_RANDOM_NONDETERMINISTIC`` | Set ``1`` to use non-fixed seed for random number generators, even for test cases annotated with `fix_random`. |
+------------------------------------------+----------------------------------------------------------------------------------------------------------------+

0 comments on commit 2d72279

Please sign in to comment.