提交 67064122 authored 作者: Frederic's avatar Frederic

Mark ProfileMode as deprecated at many places

上级 b7db88ac
......@@ -21,7 +21,7 @@ Theano defines the following modes by name:
- ``'FAST_COMPILE'``: Apply just a few graph optimizations and only use Python implementations.
- ``'FAST_RUN'``: Apply all optimizations, and use C implementations where possible.
- ``'DebugMode'``: A mode for debuging. See :ref:`DebugMode <debugmode>` for details.
- ``'ProfileMode'``: A mode for profiling. See :ref:`ProfileMode <profilemode>` for details.
- ``'ProfileMode'``: Deprecated, use the Theano flag :attr:`config.profile`.
- ``'DEBUG_MODE'``: Deprecated. Use the string DebugMode.
- ``'PROFILE_MODE'``: Deprecated. Use the string ProfileMode.
......
......@@ -14,6 +14,10 @@
Guide
=====
.. note::
ProfileMode is deprecated. Use :attr:`config.profile` instead.
To profile a Theano graph, a special mode called ProfileMode, must be passed as
an argument when compiling your graph. Using ProfileMode is a three-step
process.
......
......@@ -258,7 +258,8 @@ import theano and print the config variable, as in:
.. attribute:: mode
String value: 'Mode', 'ProfileMode', 'DebugMode', 'FAST_RUN', 'FAST_COMPILE'
String value: 'Mode', 'ProfileMode'(deprecated), 'DebugMode', 'FAST_RUN',
'FAST_COMPILE'
Default 'Mode'
......
......@@ -137,7 +137,7 @@ Theano defines the following modes by name:
- ``'DebugMode``: Verify the correctness of all optimizations, and compare C and Python
implementations. This mode can take much longer than the other modes, but can identify
several kinds of problems.
- ``'ProfileMode'``: Same optimization as FAST_RUN, but print some profiling information
- ``'ProfileMode'``(deprecated): Same optimization as FAST_RUN, but print some profiling information.
The default mode is typically ``FAST_RUN``, but it can be controlled via
the configuration variable :attr:`config.mode`,
......@@ -150,7 +150,7 @@ short name Full constructor
``FAST_COMPILE`` ``compile.mode.Mode(linker='py', optimizer='fast_compile')`` Python implementations only, quick and cheap graph transformations
``FAST_RUN`` ``compile.mode.Mode(linker='cvm', optimizer='fast_run')`` C implementations where available, all available graph transformations.
``DebugMode`` ``compile.debugmode.DebugMode()`` Both implementations where available, all available graph transformations.
``ProfileMode`` ``compile.profilemode.ProfileMode()`` C implementations where available, all available graph transformations, print profile information.
``ProfileMode`` ``compile.profilemode.ProfileMode()`` Deprecated. C implementations where available, all available graph transformations, print profile information.
================= =============================================================== ===============================================================================
.. Note::
......@@ -180,7 +180,7 @@ c|py_nogc no yes "++" As c|py, but without gc
c no yes "+" Use only C code (if none available for an op, raise an error)
py yes yes "+++" Use only Python code
c&py [#cpy2]_ no yes "+++++" Use C and Python code
ProfileMode no no "++++" Compute some extra profiling info
ProfileMode no no "++++" (Deprecated) Compute some extra profiling info
DebugMode no yes VERY HIGH Make many checks on what Theano computes
============= ========= ================= ========= ===
......@@ -253,6 +253,11 @@ For more detail, see :ref:`DebugMode<debugmode>` in the library.
ProfileMode
===========
.. note::
ProfileMode is deprecated. Use :attr:`config.profile` instead.
Besides checking for errors, another important task is to profile your
code. For this Theano uses a special mode called ProfileMode which has
to be passed as an argument to :func:`theano.function <function.function>`.
......
......@@ -1266,7 +1266,7 @@ def orig_function(inputs, outputs, mode=None, accept_inplace=False,
- FAST_COMPILE (minimal optimization)
- ProfileMode: allow to print a profile mode with mode.print_summary
- ProfileMode(deprecated): allow to print a profile mode with mode.print_summary
- DebugMode: verify many internal conditions that are normally assumed
(slow)
......
......@@ -134,7 +134,7 @@ if rc == 0:
# Keep the default linker the same as the one for the mode FAST_RUN
AddConfigVar('linker',
("Default linker used if the theano flags mode is Mode "
"or ProfileMode"),
"or ProfileMode(deprecated)"),
EnumStr('cvm', 'c|py', 'py', 'c', 'c|py_nogc', 'c&py',
'vm', 'vm_nogc', 'cvm_nogc'),
in_c_key=False)
......@@ -142,7 +142,7 @@ else:
# g++ is not present, linker should default to python only
AddConfigVar('linker',
("Default linker used if the theano flags mode is Mode "
"or ProfileMode"),
"or ProfileMode(deprecated)"),
EnumStr('py', 'vm', 'vm_nogc'),
in_c_key=False)
_logger.warning('g++ not detected ! Theano will be unable to execute '
......@@ -174,7 +174,7 @@ AddConfigVar('allow_gc',
#Keep the default optimizer the same as the one for the mode FAST_RUN
AddConfigVar('optimizer',
("Default optimizer. If not None, will use this linker with the Mode "
"object (not ProfileMode or DebugMode)"),
"object (not ProfileMode(deprecated) or DebugMode)"),
EnumStr('fast_run', 'merge', 'fast_compile', 'None'),
in_c_key=False)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论