提交 74eb33c5 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Better wording for some documentation

上级 a2168c05
...@@ -21,9 +21,10 @@ In this section we will define a couple optimizations on doubles. ...@@ -21,9 +21,10 @@ In this section we will define a couple optimizations on doubles.
.. note:: .. note::
There is the optimization tag `cxx_only` that tell this The optimization tag `cxx_only` is used for optimizations that insert
optimization will insert Op that only have c code. So we should not Ops which have no Python implementation (so they only have C code).
run them when we don't have a c++ compiler. Optimizations with this tag are skipped when there is no C++ compiler
available.
Global and local optimizations Global and local optimizations
============================== ==============================
......
...@@ -410,17 +410,18 @@ import theano and print the config variable, as in: ...@@ -410,17 +410,18 @@ import theano and print the config variable, as in:
.. attribute:: config.cxx .. attribute:: config.cxx
Default: 'g++' if g++ is present. '' Otherwise. Default: 'g++' if g++ is present. Empty string otherwise.
Tell the c++ compiler to use. If empty, don't compile c++ code. Indicates which C++ compiler to use. If empty, no C++ code is compiled.
We automatically detect if g++ is present and disable it if not Theano automatically detects whether g++ is present and disables
present. C++ compilation when it is not.
We print a warning if we detect that g++ is not present. It is We print a warning if we detect that g++ is not present. It is
recommended to run with c++ compilation as Theano will be much recommended to run with C++ compilation as Theano will be much
slower otherwise. slower otherwise.
Currently only g++ is supported, but supporting others is easy. Currently only g++ is supported, but supporting other compilers should
not be too difficult.
.. attribute:: optimizer_excluding .. attribute:: optimizer_excluding
......
...@@ -86,7 +86,7 @@ def register_linker(name, linker): ...@@ -86,7 +86,7 @@ def register_linker(name, linker):
# If a string is passed as the optimizer argument in the constructor # If a string is passed as the optimizer argument in the constructor
# for Mode, it will be used as the key to retrieve the real optimizer # for Mode, it will be used as the key to retrieve the real optimizer
# in this dictionary # in this dictionary
exclude=[] exclude = []
if not theano.config.cxx: if not theano.config.cxx:
exclude = ['cxx_only'] exclude = ['cxx_only']
OPT_FAST_RUN = gof.Query(include=['fast_run'], exclude=exclude) OPT_FAST_RUN = gof.Query(include=['fast_run'], exclude=exclude)
......
...@@ -131,9 +131,10 @@ else: ...@@ -131,9 +131,10 @@ else:
enum = EnumStr("") enum = EnumStr("")
AddConfigVar('cxx', AddConfigVar('cxx',
"The c++ compiler to use. Currently only g++ is" "The C++ compiler to use. Currently only g++ is"
" supported. But supporting more is easy if someone want this." " supported, but supporting additional compilers should not be "
"If it is empty, we don't compile c++ code.", "too difficult. "
"If it is empty, no C++ code is compiled.",
enum, enum,
in_c_key=False) in_c_key=False)
del enum del enum
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论