index.rst 2.32 KB
Newer Older
Scott Cyphers's avatar
Scott Cyphers committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
.. ops/index.rst

Core Ops
========

An ``Op``'s primary role is to function as a node in a directed acyclic graph 
dependency computation graph.  

*Core ops* are ops that are available and generally useful to all framework 
bridges and that can be compiled by all transformers. A framework bridge may 
define framework-specific ops to simplify graph construction, provided that the 
bridge can enable every transformer to replace all such ops with equivalent 
subgraphs composed of core ops. Similary, transformers may define 
transformer-specific ops to represent kernels or other intermediate operations. 

If a framework supports extending the set of ops it offers, a bridge may even 
expose transformer-specific ops to the framework user.

Our design philosophy is that the graph is not a script for running kernels; 
rather, our compilation will match ``ops`` to appropriate kernels for the 
backend(s) in use. Thus, we expect that adding of new Core ops should be 
infrequent and that most functionality instead gets added with new functions 
that build sub-graphs from existing core ops.   

It is easiest to define a new op by adapting an existing op. Some of the tasks 
that must be performed are:

- Op constructor:

  * Checking type-consistency of arguments 
  * Specifying the result type for a call 

- Serializer/Deserializer

- Transformer handlers:

  * Interpreter (reference) implementation of behavior. The
    implementation should favor clarity over efficiency.



Alphabetical list of Core ``ops``
----------------------------------

Not currently a comprehensive list.  

L.S. Cook's avatar
L.S. Cook committed
47
.. tabularcolumns:: column spec
Scott Cyphers's avatar
Scott Cyphers committed
48 49 50 51 52 53 54

.. toctree::
   :maxdepth: 1

   abs.rst
   acos.rst
   add.rst
55
   allreduce.rst
56
   and.rst
Scott Cyphers's avatar
Scott Cyphers committed
57 58 59 60
   asin.rst
   atan.rst
   avg_pool.rst
   avg_pool_backprop.rst
61
   batch_norm.rst
62 63
   broadcast.rst
   ceiling.rst
64
   concat.rst
65 66
   constant.rst
   convert.rst
Scott Cyphers's avatar
Scott Cyphers committed
67
   convolution.rst
68 69
   cos.rst
   cosh.rst
70 71 72 73 74 75
   divide.rst
   dot.rst
   equal.rst
   exp.rst
   floor.rst
   function_call.rst
76
   get_output_element.rst
77 78 79 80 81
   greater_eq.rst
   greater.rst
   less_eq.rst
   less.rst
   log.rst
82
   max.rst
83
   maximum.rst
84 85
   max_pool.rst 
   min.rst
86 87 88 89 90
   minimum.rst
   multiply.rst
   negative.rst
   not_equal.rst
   not.rst
91
   one_hot.rst
92
   or.rst
93
   pad.rst
94 95 96 97
   parameter.rst
   power.rst
   product.rst
   relu.rst
98
   sigmoid.rst
99
   softmax.rst
100
   tanh.rst
101 102