提交 411b212b authored 作者: Caglar's avatar Caglar

Adding the documentation.

上级 d9fc9d73
......@@ -397,6 +397,17 @@ import theano and print the config variable, as in:
the user and skip this optimization ('warn'), raise the exception
('raise'), or fall into the pdb debugger ('pdb').
.. attribute:: assert_no_cpu_op
String value: 'ignore' or 'warn' or 'raise' or 'pdb'
Default: 'ignore'
If there is a CPU op in the computational graph, depending on its value;
this flag can either raise a warning, an exception or stop the
compilation with pdb.
.. attribute:: on_shape_error
String value: 'warn' or 'raise'
......@@ -407,6 +418,7 @@ import theano and print the config variable, as in:
node, either warn the user and use a default value ('warn'), or
raise the exception ('raise').
.. attribute:: config.warn.ignore_bug_before
String value: 'None', 'all', '0.3', '0.4', '0.4.1', '0.5', '0.6', '0.7'
......
......@@ -295,6 +295,23 @@ Tips:
of type *float64*.
"Why is my GPU function seems to be slow?"
------------------------------------
When you compile a theano function, if you do not get the speedup that you expect over the
CPU performance of the same code. It is oftentimes due to the fact that some Ops might be running
on CPU instead GPU. If that is the case, you can use assert_no_cpu_op to check if there
is a CPU Op on your computational graph. assert_no_cpu_op can take the following one of the three
options:
* ``warn``: Raise a warning
* ``pdb``: Stop with a pdb in the computational graph during the compilation
* ``raise``: Raise an error,
if there is a CPU Op in the computational graph.
It is possible to use this mode by providing the flag in THEANO_FLAGS, such as:
``THEANO_FLAGS="float32,assert_no_cpu_op='raise'" python test.py``
.. _faq_monitormode:
"How do I Step through a Compiled Function?"
......
......@@ -215,6 +215,10 @@ Tips for Improving Performance on GPU
enable all of them with the `nvcc.flags=--use_fast_math` Theano
flag or you can enable them individually as in this example:
`nvcc.flags=-ftz=true --prec-div=false`.
* To investigate whether if all the Ops in the computational graph are running on GPU.
It is possible to debug or check your code by providing a value to `assert_no_cpu_op`
flag, i.e. `warn`, for warning `raise` for raising an error or `pdb` for putting a breakpoint
in the computational graph if there is a CPU Op.
.. _gpu_async:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论