提交 bb289f37 authored 作者: Frederic Bastien's avatar Frederic Bastien

added some fct documentation that can be implemented when we do a c version of an op.

上级 fd28e0a0
......@@ -39,16 +39,30 @@ There are less methods to define for an Op than for a Type:
*Default:* The default behavior is to do nothing.
.. method:: c_compile_args()
.. method:: c_no_compile_args()
.. method:: c_headers()
.. method:: c_header_dirs()
.. method:: c_libraries()
.. method:: c_lib_dirs()
Allows you to specify headers, libraries, and their directories,
.. method:: c_compile_args()
.. method:: c_no_compile_args()
Allows you to specify special g++ arguments to add/exclude
.. method:: c_support_code()
Allows you to specify headers, libraries,
special g++ arguments to add/exclude or
helper functions/structs that the type needs. See :ref:`op`.
Allows you to specify helper functions/structs that the type needs. See :ref:`op`.
.. method:: infer_shape(node, (i0_shapes,i1_shapes,...))
Allow optimization to lift the Shape op over this op.
Example of why this is good is that we compute an op only to take its shape,
we will be able to have the shape without its computation.
must return a tuple with one tuple with the shape of each output.
Example of matrix-matrix product input_shapes will have as input
(node, (x0,x1), (y0,y1)) and should return ((x0, y1).
The ``name`` argument is currently given an invalid value, so steer
away from it. As was the case with Type, ``sub['fail']`` provides
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论