Commit bfb1bd6b authored by Leona C's avatar Leona C Committed by Robert Kimball

Add doc for new backend api (#2425)

parent a275bfcf
.. backend-support/cpp-api.rst:
Runtime Backends
################
Backend APIs
############
.. figure:: ../graphics/backend-dgm.png
:width: 650px
* :ref:`backend-api`
* :ref:`executable-api`
* :ref:`tensor-api`
* :ref:`hosttensor-api`
* :ref:`plaidml-ng-api`
As of version ``0.15``, there is a new backend API to work with functions that
can be compiled as a runtime ``Executable``. Where previously ``Backend`` used a
``shared_ptr<Function>`` as the handle passed to the ``call`` method to execute
a compiled object, the addition of the ``shared_ptr<Executable>`` object has
more direct methods to actions such as ``validate``, ``call``, ``get_performance_data``, and so on. This new API permits any executable to be saved or loaded *into* or
*out of* storage and makes it easier to distinguish when a Function is compiled,
thus making the internals of the ``Backend`` and ``Executable`` easier to
implement.
How to use?
-----------
#. Create a ``Backend``; think of it as a compiler.
#. A ``Backend`` can then produce an ``Executable`` by calling ``compile``.
#. A single iteration of the executable is executed by calling the ``call``
method on the ``Executable`` object.
Various backends are accessible via nGraph core APIs
.. _backend-api:
Backend
=======
.. figure:: ../graphics/backend-dgm.png
:width: 650px
Various backends are accessible via nGraph core APIs
.. doxygenclass:: ngraph::runtime::Backend
:project: ngraph
:members:
.. _executable-api:
Executable
==========
.. figure:: ../graphics/runtime-exec.png
:width: 650px
The ``compile`` function on an ``Executable`` has more direct methods to
actions such as ``validate``, ``call``, ``get_performance_data``, and so on.
.. doxygenclass:: ngraph::runtime::Executable
:project: ngraph
:members:
.. _tensor-api:
Tensor
======
......@@ -26,6 +73,7 @@ Tensor
:members:
.. _hosttensor-api:
HostTensor
==========
......@@ -35,6 +83,7 @@ HostTensor
:members:
.. _plaidml-ng-api:
PlaidML
=======
......
.. backend-support/index.rst
Transformer, CPU, GPU, PlaidML
Transformers, PlaidML
###############################
......@@ -11,8 +11,6 @@ Transformer, CPU, GPU, PlaidML
* :ref:`gpu_backend`
What is a backend?
------------------
......@@ -25,13 +23,12 @@ current and future nGraph Backends are also available; see, for example, the
section on :ref:`plaidml_backend`.
.. _hybrid_transformer:
Hybrid Transformer
==================
Lorem ipsum
Coming soon
.. _cpu_backend:
......@@ -39,7 +36,7 @@ Lorem ipsum
CPU Backend
===========
Lorem ipsum
Coming soon
.. _gpu_backend:
......@@ -47,7 +44,7 @@ Lorem ipsum
GPU Backend
===========
Lorem ipsum
Coming soon
.. _plaidml_backend:
......
......@@ -73,11 +73,11 @@ author = 'Intel Corporation'
# built documents.
#
# The short X.Y version.
version = '0.13'
version = '0.15'
# The Documentation full version, including alpha/beta/rc tags. Some features
# available in the latest code will not necessarily be documented first
release = '0.13-0'
release = '0.15.0-rc0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
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