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