Commit 34eed33a authored by Leona C's avatar Leona C

Add index for howto section and clarify some example code in the execute doc

parent cbdaab7e
......@@ -18,6 +18,7 @@ Compile MXNet\* with ``libngraph``
If the |nGl| code has not yet been installed to your system, please go back
and return here to finish compiling MXNet with ``libngraph``.
#. Set the ``LD_LIBRARY_PATH`` path to the location where we built the nGraph
libraries:
......
.. execute.rst
#######################
Executing a Computation
#######################
######################
Execute a Computation
######################
This section explains how to manually perform the steps that would normally be
performed by a framework :term:`bridge` to execute a computation. Intel® nGraph
......@@ -12,11 +12,10 @@ to map out how that computation happens. Unfortunately, things that make by-hand
graph construction simpler tend to make automatic construction more difficult,
and vice versa.
Here we will do all the bridge steps manually. The model description we'll write
is based on the :file:`abc.cpp` file in the ``/doc/examples/`` directory.
In order to successfully run a computation, the entity (framework or user) must
be able to do all of these things:
Here we will do all the bridge steps manually. The :term:`model description`
we're explaining is based on the :file:`abc.cpp` file in the ``/doc/examples/``
directory. We'll be deconstructing the steps that an entity (framework or
user) must be able to carry out in order to successfully execute a computation:
* :ref:`define_cmp`
* :ref:`specify_bkd`
......@@ -25,12 +24,14 @@ be able to do all of these things:
* :ref:`initialize_inputs`
* :ref:`invoke_cmp`
* :ref:`access_outputs`
* :ref:`all_together`
The final code is a the end of this page, on :ref:`all_together`.
.. _define_cmp:
Define a Computation
====================
Define the computation
======================
To a :term:`framework`, a computation is simply a transformation of inputs to
outputs. While a *framework bridge* can programmatically construct the graph
......@@ -63,7 +64,9 @@ deallocated when they are no longer needed. A brief summary of shared
pointers is given in the glossary.
Every node has zero or more *inputs*, zero or more *outputs*, and zero or more
*attributes*. For our purpose to :ref:`define_cmp`, nodes should be thought of
*attributes*. The specifics for each :cpp::type:: permitted on a core
``Op``-specific basis can be discovered in :doc:`ops` docs. For our
purpose to :ref:`define a computation <define_cmp>`, nodes should be thought of
as essentially immutable; that is, when constructing a node, we need to supply
all of its inputs. We get this process started with ops that have no inputs,
since any op with no inputs is going to first need some inputs.
......@@ -220,10 +223,14 @@ We can use the ``read`` method to access the result:
.. _all_together:
Putting it all together
=======================
Put it all together
===================
.. literalinclude:: ../../../examples/abc.cpp
:language: cpp
:caption: "The (a + b) * c example for executing a computation on nGraph"
.. _Intel MKL-DNN: https://01.org/mkl-dnn
\ No newline at end of file
.. howto/index:
How to
======
.. note:: This section is aimed at intermediate users of Intel nGraph library.
It assumes a developer has understanding of the concepts in the previous
sections. It does not assume knowledge of any particular frontend framework.
The "How to" articles in this section explain how to do specific tasks with
Intel nGraph. The recipes are all framework agnostic; in other words, any
frontend framework that wishes to access the optimizations inherent in nGraph
will either need to do these things programatically through the framework, or
to provide documentation for the user who has already has decided they want to
performance optimizations available through nGraph's management of custom
backends.
To get started, we've provided a basic example for how to execute a computation
that can runs on an nGraph backend; this is analogous to a framework bridge.
This section is under development; it will eventually contain articles targeted
toward data scientists, algorithm designers, framework developers, and backend
engineers -- anyone who wants to pivot on our examples and experiment with the
variety of hybridization and performance extractions available through the
nGraph library.
.. toctree::
:maxdepth: 1
:caption: How-to
execute.rst
\ No newline at end of file
......@@ -54,7 +54,7 @@ Sections
testing-libngraph.rst
framework-integration-guides.rst
graph-basics.rst
howto/execute.rst
howto/index.rst
ops/index.rst
project/index.rst
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment